time find -name "." -type f -not -path "/proc/" -not -path "/sys/" -not -path "/dev/" -not -path "/run" -exec md5sum "{}" + > /root/checklist.chk
Category Archives: OS
mpd in userspace with pulseaudio
create config for mpd:
vi ~/.config/mpd/mpd.conf
bind_to_address "172.16.254.254"
music_directory "/home/jasiu/Music"
playlist_directory "/home/jasiu/Music"
#db_file "/var/lib/mpd/mpd.db"
#log_file "/var/log/mpd.log"
user "jasiu"
audio_output {
type "pulse"
name "My Pulse Output"
server "localhost"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
}
modify configuration of pulseaudio to allow play through tcp from localhost
# vi /etc/pulse/default.pa
add this line to config:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
If you do not want to restart your X session load desired module manually
$ pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
and finally start mpd in userspace
$ mpd –no-daemon –verbose
To play not in user space:
Add user mpd to pulse access and modify global config /etc/mpd.conf
audio_output {
type "pulse"
name "My Pulse Output"
server "localhost"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
}
modify /etc/pulse/default.pa
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
restart pulseaudio
$ pulseaudio -k
Try to play using yours favourite mpd player:
for example MPDroid for mobile phone or Sonata for non Windows environment
Problems installing mate-icon-theme on FreeBSD
[Update]
Try to rebuild mapping util
# pkg which /usr/local/libexec/icon-name-mapping
/usr/local/libexec/icon-name-mapping was installed by package icon-naming-utils-0.8.90_1
# portmaster -D icon-naming-utils
Just in case mount yours ports tree on /usr/ports
# mount -t nullfs /usr/jails/ports /usr/ports
Build and install package
# make install
===> Installing for mate-icon-theme-1.18.2
===> Checking if mate-icon-theme already installed
===> Registering installation for mate-icon-theme-1.18.2
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/appointment.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/back.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmark_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bookmarks_list_add.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/bottom.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/centrejust.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/down.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editclear.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/mate/16x16/actions/editcopy.png:No such file or directory
(snip)
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/gnome-netstatus-txrx.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-adhoc.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wired.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-device-wireless.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/nm-no-connection.png:No such file or directory
pkg-static: Unable to access file /usr/ports/x11-themes/mate-icon-theme/work/stage/usr/local/share/icons/menta/48x48/status/stock_open.png:No such file or directory
*** Error code 74
Stop.
make: stopped in /usr/ports/x11-themes/mate-icon-theme
Create text file with output and create not existing files then finally install package
# make install > & output.txt
# cat output.txt | grep Unable | awk '{print $6}' | cut -d ':' -f 1 | xargs touch
# make install
===> Installing for mate-icon-theme-1.18.2
===> Checking if mate-icon-theme already installed
===> Registering installation for mate-icon-theme-1.18.2
Installing mate-icon-theme-1.18.2...
Debian postinstall
Stop avahi
# systemctl disable avahi-daemon
Enable rc.local capability/compatibility
# echo $'#!/bin/sh -e\nexit 0'
convert text in command line
more sometext | iconv -f iso8859-2 -t utf8 |more
where iso8859-2 is orginal encoding and utf8 is desired encoding of the text file
slow graid mirror rebuild
Setting kern.geom.raid.idle_threshold to lower value increases speed of rebuilding graid mirror and transfer on ada1 disk
https://www.freebsd.org/cgi/man.cgi?graid(8)
root@thirdeye:/usr/ports # sysctl kern.geom.raid.idle_threshold=1000000
kern.geom.raid.idle_threshold: 10000 -> 1000000
root@thirdeye:/usr/ports # iostat 1 -1
tty ada0 ada1 ada2 cpu
tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id
0 3 59.55 18 1.06 114.09 7 0.80 6.10 2 0.01 2 0 1 0 97
0 533 86.86 14 1.18 128.00 8 0.99 0.00 0 0.00 0 0 0 0 100
0 374 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 194 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 193 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 1 0 0 0 99
0 190 80.00 16 1.23 128.00 8 0.99 0.00 0 0.00 1 0 1 0 99
0 197 32.00 2 0.06 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 188 32.00 4 0.12 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
0 199 32.00 6 0.19 0.00 0 0.00 0.00 0 0.00 0 0 0 0 99
0 194 96.00 12 1.14 128.00 8 1.01 0.00 0 0.00 3 0 0 0 97
0 186 35.56 9 0.30 0.00 0 0.00 0.00 0 0.00 5 0 1 0 94
0 195 108.80 20 2.16 128.00 16 2.03 0.00 0 0.00 0 0 0 0 100
0 200 32.00 4 0.13 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100
^C 3 294 32.00 3 0.09 0.00 0 0.00 0.00 0 0.00 1 0 1 0 99
root@thirdeye:/usr/ports # sysctl kern.geom.raid.idle_threshold=10000
kern.geom.raid.idle_threshold: 1000000 -> 10000
root@thirdeye:/usr/ports # iostat 1 -1
tty ada0 ada1 ada2 cpu
tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id
0 3 59.57 18 1.07 114.09 7 0.80 6.10 2 0.01 2 0 1 0 97
0 536 126.54 478 59.02 127.74 473 58.95 0.00 0 0.00 7 0 2 0 91
0 373 126.37 427 52.75 127.26 425 52.88 0.00 0 0.00 11 0 1 0 88
0 196 127.16 459 56.94 128.00 448 56.06 0.00 0 0.00 2 0 1 0 97
0 188 126.36 451 55.60 128.00 446 55.72 0.00 0 0.00 2 0 1 0 97
0 205 126.31 387 47.78 127.34 386 48.04 0.00 0 0.00 0 0 1 0 99
0 196 127.15 451 55.97 128.00 440 54.97 0.00 0 0.00 0 0 0 0 99
0 196 126.73 456 56.40 128.00 457 57.09 0.00 0 0.00 0 0 0 0 100
0 197 126.09 434 53.39 128.00 423 52.83 0.00 0 0.00 0 0 0 0 99
0 197 126.67 433 53.58 128.00 425 53.14 0.00 0 0.00 0 0 0 0 100
0 198 126.91 441 54.69 127.78 441 55.07 0.00 0 0.00 0 0 0 0 99
0 196 127.24 420 52.20 127.70 417 52.02 0.00 0 0.00 0 0 0 0 99
0 193 126.75 453 56.13 128.00 441 55.08 0.00 0 0.00 0 0 0 0 99
0 199 127.14 452 56.16 128.00 454 56.79 0.00 0 0.00 0 0 3 1 96
0 196 125.17 427 52.19 126.96 421 52.19 0.00 0 0.00 6 0 1 1 93
0 195 125.48 417 51.09 128.00 398 49.75 0.00 0 0.00 15 0 3 0 82
0 193 126.76 460 56.89 128.00 458 57.20 0.00 0 0.00 5 0 1 0 94
0 198 126.66 434 53.62 128.00 428 53.56 0.00 0 0.00 0 0 0 0 99
0 194 126.51 447 55.19 127.79 444 55.38 0.00 0 0.00 5 0 2 0 92
0 200 127.11 441 54.70 128.00 433 54.07 0.00 0 0.00 0 0 0 0 100
0 193 127.14 435 54.04 128.00 429 53.67 0.00 0 0.00 0 0 0 1 99
^C 2 227 127.02 450 55.80 128.00 449 56.08 0.00 0 0.00 0 0 0 0 100
root@thirdeye:/usr/ports # graid status
Name Status Components
raid/r0 DEGRADED ada0 (ACTIVE (ACTIVE))
ada1 (ACTIVE (REBUILD 46%))
raid/r1 OPTIMAL ada2 (ACTIVE (ACTIVE))
ada3 (ACTIVE (ACTIVE))
benchmark for Linux/FreeBSD
In Linux:
# git clone https://github.com/kdlucas/byte-unixbench.git # cd byte-unixbench/UnixBench/ # ./Run
Modifications on FreeBSD:
comment out in Makefile
#OSNAME:=$(shell uname -s)
modify ./Run
#!/usr/bin/perl -w
#!/usr/local/bin/perl -w
my $make = $ENV{MAKE} || "make";
my $make = $ENV{MAKE} || "gmake";
then
./Run
Python packages on FreeBSD
how to build package against specified python version
/usr/ports/textproc/py-html2text # make PYTHON_PKGNAMEPREFIX=py35- USES=python:3.5 package
https://www.freebsd.org/doc/en/books/porters-handbook/using-python.html
MATE – Change DPI from command line
If You accidentally changed DPI to very high value and cannot revert to previous settings from GUI, use command line:
$ gsettings list-schemas | grep mate| grep font
$ gsettings list-keys org.mate.font-rendering
rgba-order
antialiasing
dpi
hinting
$ gsettings get org.mate.font-rendering dpi
500.0
$ gsettings set org.mate.font-rendering dpi 96
Thinkpad T500 trackpoint under Linux
Sensitivity and Speed
# echo -n 250 > /sys/devices/platform/i8042/serio1/serio2/sensitivity
# echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed
For startup add this to script locted in /etc/X11/xinit/xinitrc.d
Press to Select
# echo -n 1 > /sys/devices/platform/i8042/serio1/serio2/press_to_select
Frontend
# pacman -S gpointing-device-settings
Emulate wheel, create file /etc/X11/xorg.conf.d/20-trackpoint.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkP
ad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection