вторник, 26 января 2016 г.

Portable Drive Re-Partitioning for FreeBSD

10

Attach the device and find its geom using the next command
% camcontrol devlist
The command shows something like this:
<Optiarc DVD RW AD-5280S 1.01>     at scbus0 target 0 lun 0 (pass0,cd0)
<ST1500DM003-9YN16G CC4B>          at scbus1 target 0 lun 0 (pass1,ada0)
<Multi Flash Reader 1.00>          at scbus6 target 0 lun 0 (da0,pass2)
<WD My Passport 0828 1012>         at scbus7 target 0 lun 0 (da1,pass3)
<WD SES Device 1012>               at scbus7 target 0 lun 1 (ses0,pass4)

20

Check out the existing partitioning scheme:
% gpart show da1
The command will show you current partitioning for the device specified by geom (da1 in the example).

30

Destroy the existing scheme using
# gpart destroy -F da1
The -F key is not required, but the last time I used it.
The command replies: da1 destroyed.

40

Create new scheme:
# gpart create -s GPT da1
da1 created

50

Add a partition using the next command.
# gpart add -t freebsd da1
da1s1 created

60

Grow file system on the recently created partition:
% newfs -L passport -U -o time /dev/da1s1
You may have to detach and attach the device back before newfs'ing to avoid an I/O error while formatting.

понедельник, 25 января 2016 г.

Update. January, 2015 - fix for a libmatemixer problem

I updated my system and its software packages. It was easy.

The only problem: output volume slider was broken. The symptom: movement of the slider does not change volume of the output signal.
I fixed this problem using only the next command:
% cd /usr/ports/audio/libmatemixer ; sudo make config reinstall clean
Checked the ALSA option.
(Re-login to your system after the command finished of executing)

воскресенье, 27 декабря 2015 г.

I solved the problem with gone shutdown button (MATE desktop)

In the September 2015 I have found a problem in MATE desktop environment.
The problem was: shutdown button gone from the MATE's main menu.
exec ck-launch-session mate-session

To fix this quickly I created the shuter project.

Today I suddenly found a solution. I fixed the problem by replacing the next line
exec ck-launch-session mate-session
with the another one:
exec mate-session
in the ~/.xinitrc file.
exec mate-session
 Start sessions of MATE properly!

пятница, 18 декабря 2015 г.

Update from December, 18

I've just updated software packages on my FreeBSD 10.1.
Read this post if you wish to know what's new.
(I'll update this post during solving problems.)

Font

Yes. Default font in MATE was updated. It became thinner.

GIMP

Goodbye gimp. It was updated to 2.8.16.
Opening and saving JPEGs was broken (file-jpeg plugin clash).
Darla plugin was broken (script-fu plugin clash).
The plugin-browser and procedure-browser plugins are broken too.
Something else... may be.

The solution for all the problems is
# cd /usr/ports/graphics/gimp-app ; make config reinstall clean
I ticked the options with JPEG word in the description. In other words I ticked all the options of the gimp-app configuration :)

For the possible future

I'm considering to replace alsa with pulse. I wonder if this will repair volume control slider (for now: it just does not work: the volume level does not change when I'm moving the slider)

суббота, 24 октября 2015 г.

FreeBSD upgrade. October 2015

Update the operating system

# freebsd-update fetch
# freebsd-update install
# shutdown -r now

Upgrade binary packages

# pkg update
# pkg updating | $PAGER
# pkg upgrade
# portupgrade -fr ffmpeg
# portupgrade -fr icu
# pkg autoremove
# pkg clean
# portsclean -C

Major improvements and bug fixes

MATE Desktop

[Bug 202984] x11/mate desktop version 1.10, Trash does not work has been fixed. May be accidentally? ;)

Implementing the patches

For gnome-mount

Patch

MATE still does not mount DVDs and SD cards because gnome-mount is still broken. Therefore I suggest to allow users to mount devices. To do this...
# cd /etc
# #   tune the kernel
# cp sysctl.conf sysctl.conf.orig
# echo 'vfs.usermount=1' >> sysctl.conf
#  we should use devfs.rules instead of devfs.conf
#  to be able to work with devices plugged in
#
  after the system is in multi user mode
# cp devfs.rules devfs.rules.orig
# echo 'add path 'da*'        mode 0660 group operator' >> devfs.rules
# shutdown -r now
Ensure that rules set is enabled in /etc/rc.conf. For example, when the /etc/devfs.rules has the next content
[system=10]
add path 'usb/*'    mode 0660 group operator
add path 'da*'        mode 0660 group operator
then the /etc/rc.conf must has the next line
devfs_system_ruleset="system"

For user


First approach
First time: create an mnt/ at your home
% mkdir -p ~/mnt
Every time:
To mount...
% mount_msdosfs /dev/da0s1 ~/mnt
Then you can find the card in the mnt/ subdirectory inside your home directory.
If you do not know the name of the card device:
Run the next command to find out all the devices you can plug in to your system
% camcontrol devlist
Tip: If device did not mount, you should try to mount it again.
To unmount...
% umount ~/mnt
:-D
In my case the problem was a typo in the PolicyKit.conf ))
But this approach to allow users to mount devices really works !

Bibliography 

  1. FreeBSD: Allow Normal Users To Mount CDROMs / DVDs / USB Devices. NixCraft (cyberciti.biz), http://www.cyberciti.biz/faq/freebsd-allow-ordinary-users-mount-cd-rom-dvds-usb-removabledevice/.
  2. devfs. FreeBSD (http://freebsdguide.ru), http://freebsdguide.ru/_8/_16/.



четверг, 15 октября 2015 г.

Themes settings for DuckDuckGo

You can find here settings URLs for theming the https://duckduckgo.com/ site.

Style your DDG according the favorite operating system or distro.

  • var settings_string = "l=ru-ru; ad=ru_RU; n=1; aj=m; ae=c; ah=ru-ru; s=l; w=n; u=1; ak=-1; t=n; 7=FFFFFF; j=F0F0F0; a=u; 9=900; aa=900; x=000; y=EEEEEE; af=-1; f=w; ai=-1"
JavaScript snippet to copy settings from settings URL to cookies:
var settings_string = "l=ru-ru; ad=ru_RU; n=1; aj=m; ae=c; ah=ru-ru; s=l; w=n; u=1; ak=-1; t=n; 7=FFFFFF; j=F0F0F0; a=u; 9=900; aa=900; x=000; y=EEEEEE; af=-1; f=w; ai=-1"

var settings_array = settings_string.split('; ')

for (var cindex in settings_array)
{ document.cookie = settings_array[cindex]
}

четверг, 1 октября 2015 г.

Обновление до MATE 1.10.2

Так уж получилось, что не делал полного обновления всего софта аж 9 месяцев. А вчера вспомнил пароль от личной почты и сразу захотелось поставить Thunderbird в качестве почтовика и, за одно, заменить им Pidgin. В принципе, синяя птичка стала намного умнее за несколько лет. Например, она сама настроилась на почту от M$ по протоколу IMAP, избавив меня от гемора с поиском URL'ов серверов и номеров портов. Как клиент для XMPP/IRC - тоже приемлемо. Надо только немного обвыкнуть там. Законнектиться с онлайн-календарем и списком задач чего-то неполучилось. Потом поразбираюсь с этом.

Обновление

Обновляем дерево портов
# portsnap fetch update
Читаем сопровидительную документацию (мне пришлось читать за весь 2015 год) и мотаем на ус.
% pkg updating

1. ffmpeg

Обновление через пакеты косячит, поэтому нас просят пересобрать все пакеты, которые зависят от ffmpeg.
# portupgrade -fr multimedia/ffmpeg

2. devel/icu

Аналогично

3. И т.п...

А вообще, нужно регулярно, например, ежемесячно, обновляться, читая перед этим `pkg updating | $PAGER`.

А теперь, собственно, о проблемах, появившихся после обновления.


1. Пропал пункт для выключения или перезагрузки компьютера

Пропал соответствующий аплет панели.

Обойти можно многими способами. Например, выключать через терминал, xterm или mate-terminal; через выполнение программы [Alt-F2]; можно создать ярлык на панель, рабочий стол, меню приложений; привычный, во всяком случае для меня, [Ctrl-Alt-Del].

Решено (~/: I solved the problem with gone shutdown button (MATE desktop)): exec mate-session вместо exec ck-launch-session mate-session. Вот кажется мне, что я пробовал это, сразу после обнаружения проблемы, однако тогда это не сработало. А вот в конце декабря 2015, случайно выяснил, что это решает проблему. Видимо, фряшечные портеры MATE (а, может, и линуксовые разработчики этой столешницы) что-то таки сделали хорошее.

2. Перестал работать аплет "касса символов"

И все тут. Ну да и ладно. Есть же гномовская прилага "таблица символов". Можно ей пользоваться.

3. Пропал микшер

А штатный слайдер регулировки громкости никак не влияет на громкость.
Кроме того, пропал volume applet.

4. Файлы и директории стали удаляться мимо корзины

Bug 202984 – x11/mate desktop version 1.10, Trash does not work

5. Пропала максимизация окна при "ударе" заголовком об верхнюю панель. Аналогично - пропала "половинная" максимизация при наезде окном на левый или правый борт.



Если в каком-то из пунктов нет достойного ответа, значит я его еще не нашел...