List local bluetooth devices
# hcitool dev
Scan for bluetooth devices around
# hcitool scan
Bluetooth ping
# l2ping AA:BB:CC:DD:EE:FF
Browse services provided by this computer
# sdptool browse local
Browse services provided by another device
# sdptool browse --raw AA:BB:CC:DD:EE:FF
Connect /dev/rfcomm0 to another device channel 3
# rfcomm connet 0 AA:BB:CC:DD:EE:FF 3
If you ever experience following error "Parse error: syntax error, unexpected T_STRING, expecting ')' in /proto/SxM_webui/ctcs/ctcs.db on line 7", just login to mybook world via ssh, open /proto/SxM_webui/ctcs/ctcs.db and make it valid PHP script. You will probably need to escape " with \" in some file names. You may need to reboot MyBook afterwards.
Udev rule for changing selected USB configuration descriptor:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="12*", ATTRS{bConfigurationValue}!="2", \ ATTR{bConfigurationValue}="2"
Udev rule for creating link and setting permissions for easier access from own application:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="12*", KERNEL=="hidraw*", \ MODE="0666", SYMLINK+="myDeviceLink"
remember to execute
$ sudo service udev restart
Ubuntu 10.04 still ships with wmii-3.6. New extensions, which are implemented in the latest wmii, are required to run gnome-panel.
I have prepared the following packages for you:
If it does not fit you, please use the following script to build latest wmii from source code.
#!/bin/bash WORKDIR="/tmp/wmii" URL="http://dl.suckless.org/wmii/wmii+ixp-3.9b1.tbz" FILE=wmii+ixp-3.9b1.tbz DIR=wmii+ixp-3.9b1 # prepare working directory rm -rf $WORKDIR mkdir -p $WORKDIR cd $WORKDIR # install necessary dependencies - sudo make deb-dep miss some dependencies sudo aptitude install build-essential debhelper libxext-dev x11proto-xext-dev \ libx11-dev libxrandr-dev libxinerama-dev fakeroot quilt gcc make dpkg-dev \ libixp libxft-dev mercurial txt2tags hg clone http://hg.suckless.org/wmii cd wmii dpkg-buildpackage -rfakeroot -uc -us -b
You can found working package in /tmp/wmii and install it using following command
$ sudo dpkg -i wmii-hg_hg2550_i386.deb
Gnome's registry also needs a little bit of tweaking in order for it to play nicely with wmii. Next fire up the gconf-editor:
$ gconf-editor
And unmark the checkbox at apps>nautilus>preferences and untick show_desktop
Next go to desktop>gnome>background and untick draw_background + empty picture_filename.
This step is the step that was the most difficult to find. Simply run this command:
$ echo export WINDOW_MANAGER=`which wmii` >> ~/.gnomerc
This'll create a .gnomerc which will then run wmii.
cp -r /etc/X11/wmii-hg/ ~/.wmii-hg/
In order for "MOD-a" -> quit to work properly, you need to modify ~/.wmii-hg/wmiirc in the following way
$ gnome-control-center
Click on "Appearance" and select your theme of choice - the first one (custom) works fine.
Above steps has been based on info from Ryan Kraay's page. He provides even more tips, which I did not found necessary myself.
Recently I have bought Western Digital MyBook world. I planned to use it for backups over network. SSH access can be easily enabled using MyBook web interface. Rsync version 3.0.2 was already pre-installed on it, so it was an ideal choice. Hard links are used for keeping multiple snapshots without wasting disk capacity.
I am using the following two scripts on my PC:
backupToMyBook.sh - for regular backup.
#!/bin/bash rsync -axve 'ssh -c arcfour -m hmac-md5-96' --delete --link-dest=../root.1/ \ / root@MyBookWorldIP:'`/DataVolume/RadekBackup/PrepareBackupRoot.sh`'
backupToMyBookResume.sh - for case backup was interrupted during copying files and it needs to be resumed.
#!/bin/bash rsync -axve 'ssh -c arcfour -m hmac-md5-96' --delete --link-dest=../root.1/ \ / root@MyBookWorldIP:/DataVolume/RadekBackup/root.0/
The third script is located on the MyBook in /DataVolume/RadekBackup/PrepareBackupRoot.sh
#!/bin/sh rm -rf /DataVolume/RadekBackup/root.3 mv /DataVolume/RadekBackup/root.2 /DataVolume/RadekBackup/root.3 mv /DataVolume/RadekBackup/root.1 /DataVolume/RadekBackup/root.2 mv /DataVolume/RadekBackup/root.0 /DataVolume/RadekBackup/root.1 echo /DataVolume/RadekBackup/root.0/
Rotate all pictures based on EXIF orientation info:
jhead -autorot *
Add 1h30m to all jpegs EXIFs time info:
jhead -ta+1:30 *
Rename all pictures according to EXIF time info:
jhead -n%Y%m%d-%H%M%S *
Re-size all the jpg files in the current directory - keep aspect ratio and set maximal width/height to 1024 pixel:
mogrify -resize 1024x1024 *.jpg
Scale all jpgs in the current directory by 50%:
mogrify -resize 50% *.jpg
#!/bin/bash git init for dir in `find . | grep 'CVS/Entries$' | sed -e 's/CVS\/Entries//g'` do for file in `cat "$dir/CVS/Entries" | grep '^/' | cut --delimiter=/ -f2` do git add $dir$file done done
rd@radekdostal.com
+43 681 815 945 10
skype: radekdostal
www.mimo-domov.cz - Czech and Slovak people abroad