easystroke is a wonderful program that lets you record mouse gestures and executes
commands based on them.
In conjunction with a special definition in .fvwm2rc you can specify any action
to be executed. For example to switch to a special window on the desktop:
in .fvwm2rc:
Key Pause A N FocusWindowNumber 8
-> switches to the window remembered on position 8
PipeRead 'for i in `seq 0 9`; do echo Key $i A MC AssignNumberToCurrentWindow $i; done'
->remembers the window and stores it on position 8
in easystroke define key "Pause" to a gesture of your choice.
If executing that gesture the window 8 is switched to.
Mittwoch, 2. Dezember 2009
Mittwoch, 18. November 2009
tell mplayer which sound device to use
mplayer -ao oss:/dev/dsp *.mp3
mplayer -ao alsa:device=hw=0.0 *.mp3
or
mplayer -ao oss:/dev/dsp1 *.mp3
mplayer -ao alsa:device=hw=1.0 *.mp3
mplayer -ao alsa:device=hw=0.0 *.mp3
or
mplayer -ao oss:/dev/dsp1 *.mp3
mplayer -ao alsa:device=hw=1.0 *.mp3
Dienstag, 10. November 2009
wacom bamboo stops working after unplugging
to solve this (to get it working as a graphic tablet again without restarting X) just switch from X11 to Console (press Ctrl + Alt + F1 together then release them) and then switch back to X11 (press Ctrl + Alt + F7 together then release them).
Then the graphic tablet works as before unplugging!
Then the graphic tablet works as before unplugging!
Dienstag, 27. Oktober 2009
Tethering of iPhone 3GS with 3.1.2 and use it as bluetooth modem in linux
1) go to Cydia and install "Enable tethering on 3GS..."
2) go to "Setttings->General->Network->Internet Tethering"
and switch tethering on. Press "Turn on Bluetooth"
3) on your linux machine establish a pairing of the iphone with the pc
in SuSe 11.2 you can do this with bluetooth-applet or bluetooth-wizard
4) on your iphone (with Settings->General->About->Bluetooth) or on your pc
(with "sdptool search DUN") find out the MAC address of your iphone's bluetooth
5) on the pc call "pand -c MACADDRESS -n" where MACADDRESS is the MAC address
discovered in step 4) (something like 00:01:02:03:04:05)
6) Set up your network on YaST2: "Network Devices->Network Settings->Add->Device Type=Bluetooth->
Next->Next->Ok
7) adjust your /etc/resolve.conf to contain
nameserver 81.3.216.100
nameserver 194.24.128.100
search 194.24.128.118
that's it.
2) go to "Setttings->General->Network->Internet Tethering"
and switch tethering on. Press "Turn on Bluetooth"
3) on your linux machine establish a pairing of the iphone with the pc
in SuSe 11.2 you can do this with bluetooth-applet or bluetooth-wizard
4) on your iphone (with Settings->General->About->Bluetooth) or on your pc
(with "sdptool search DUN") find out the MAC address of your iphone's bluetooth
5) on the pc call "pand -c MACADDRESS -n" where MACADDRESS is the MAC address
discovered in step 4) (something like 00:01:02:03:04:05)
6) Set up your network on YaST2: "Network Devices->Network Settings->Add->Device Type=Bluetooth->
Next->Next->Ok
7) adjust your /etc/resolve.conf to contain
nameserver 81.3.216.100
nameserver 194.24.128.100
search 194.24.128.118
that's it.
Freitag, 11. September 2009
set up firewall to allow only one ip address
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -L -v
iptables -A INPUT -s 111.111.111.111 -j ACCEPT # change the IP address as appropriate
iptables-save
rcSuSEfirewall2 restart
do not forget to start firewall automatically
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -L -v
iptables -A INPUT -s 111.111.111.111 -j ACCEPT # change the IP address as appropriate
iptables-save
rcSuSEfirewall2 restart
do not forget to start firewall automatically
Samstag, 27. Juni 2009
iphone tunnel suite 2.7 does not work any more with iPhoen firmware 3.0
take i-funbox which is very good: http://www.i-funbox.com/
get information about devices
To get information about devices attached to a computer run the command:
blkid
blkid
Mittwoch, 24. Juni 2009
tethering
Follow this steps and you can connect your laptop to the
internet through your iphone
http://help.benm.at/help.php
internet through your iphone
http://help.benm.at/help.php
Samstag, 6. Juni 2009
convert flv to mpg
ffmpeg -i test.flv -ar 22050 -ab 56 -r 25 -f flv -b 400 -qmin 3 -qmax 6 -s 320x240 test.mpg
Freitag, 5. Juni 2009
convert AVI to DVD format
1) -> (mencoder -o out.avi -noidx -oac copy -ovc copy ccmovie.avi)
-> ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg
-> dvdauthor --title -o dvd -f out.mpg
-> dvdauthor -o dvd -T
-> mkisofs -dvd-video -o dvd.iso dvd/
-> growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvd dvd/*
OR
2) devede
-> ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg
-> dvdauthor --title -o dvd -f out.mpg
-> dvdauthor -o dvd -T
-> mkisofs -dvd-video -o dvd.iso dvd/
-> growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvd dvd/*
OR
2) devede
Mittwoch, 13. Mai 2009
show MAC address
To see the MAC address of a host in the network do the following:
a) ping host
b) arp -a or arp -a host
a) ping host
b) arp -a or arp -a host
Donnerstag, 16. April 2009
cvs commands
To restore the contents of any day before the given day use:
chris@korbi:~/workspace/ospdir-twopass> cvs -d /home/cvs update -Pd -r twopass_mocoresampling_pband -D now
for the latest version before 1.4.2009:
chris@korbi:~/workspace/ospdir-twopass> cvs -d /home/cvs update -Pd -r twopass_mocoresampling_pband -D 20090401
chris@korbi:~/workspace/ospdir-twopass> cvs -d /home/cvs update -Pd -r twopass_mocoresampling_pband -D now
for the latest version before 1.4.2009:
chris@korbi:~/workspace/ospdir-twopass> cvs -d /home/cvs update -Pd -r twopass_mocoresampling_pband -D 20090401
Mittwoch, 11. Februar 2009
shift complex array by applying a ramp in frequency domain
tam=size(vector)
w=findgen(tam(1))/float(tam(1))
shifted_vector=(fft(fft(vector)*exp(complex(0,-w*s)),/inverse))
s is der shift in pixels
w=findgen(tam(1))/float(tam(1))
shifted_vector=(fft(fft(vector)*exp(complex(0,-w*s)),/inverse))
s is der shift in pixels
Mittwoch, 4. Februar 2009
mount iphone in linux via usb
1) get package ifuse-0.9.5-2.3.i586.rpm
libplist1-1.2-2.1.i586.rpm
usbmuxd-1.0.0-23.2.i586.rpm
libiphone0-0.9.5-4.1.i586.rpm
libusbmuxd1-1.0.0-23.2.i586.rpm
from http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page
2) install these packages
3) sudo ifuse --root /mnt/iPhone/ in order to mount root filesystem of the iphone
3) sudo ifuse /mnt/iPhone/ in order to mount user filesystem of the iphone
4) unmount the iphone with sudo fusermount -u /mnt/iPhone
libplist1-1.2-2.1.i586.rpm
usbmuxd-1.0.0-23.2.i586.rpm
libiphone0-0.9.5-4.1.i586.rpm
libusbmuxd1-1.0.0-23.2.i586.rpm
from http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page
2) install these packages
3) sudo ifuse --root /mnt/iPhone/ in order to mount root filesystem of the iphone
3) sudo ifuse /mnt/iPhone/ in order to mount user filesystem of the iphone
4) unmount the iphone with sudo fusermount -u /mnt/iPhone
Mittwoch, 14. Januar 2009
grub
Error 18: Selected cylinder exceeds maximum supported by BIOS
-> the bios is too old and the kernel is byond the 8 Gbyte limit
Install the grub from rescue disc:
mount /dev/sda? /mnt/sysimage
mount --bind /dev /mnt/sysimage/dev
chroot /mnt/sysimage
grub-install /dev/sda
IF the partitions are as follows:
/dev/sda1 windows
/dev/sda2 extended
/dev/sda5 swap
/dev/sda6 /
/dev/sda7 /home
then you need to set /dev/sda2 as the boot partition with fdisk /dev/sda a 2
in the menu.lst of grub needs to be written: root (hd0,5)
-> the bios is too old and the kernel is byond the 8 Gbyte limit
Install the grub from rescue disc:
mount /dev/sda? /mnt/sysimage
mount --bind /dev /mnt/sysimage/dev
chroot /mnt/sysimage
grub-install /dev/sda
IF the partitions are as follows:
/dev/sda1 windows
/dev/sda2 extended
/dev/sda5 swap
/dev/sda6 /
/dev/sda7 /home
then you need to set /dev/sda2 as the boot partition with fdisk /dev/sda a 2
in the menu.lst of grub needs to be written: root (hd0,5)
Abonnieren
Posts (Atom)