peace love linux logo

Ubuntu Linux Notes


show recent log messages
tail -f /var/log/messages


gconf editor (sudo apt-get install gconf)
gconf-editor


set/check the default java version
sudo update-alternatives --config java


restart networking
sudo /etc/init.d/networking stop && sudo /etc/init.d/networking start


convert wma to mp3 (all files in one directory)
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "$i" && lame -m j -h --vbr-new -b 160 audiodump.wav -o "`basename "$i" .wma`.mp3"; done; rm audiodump.wav


mplayer: record a mms stream
mplayer -dumpfile filename_output.wmv -dumpstream mms://some.stream.here


mencoder: index video file to enable forward and rewind in mplayer
mencoder -forceidx input.avi -oac copy -ovc copy -o output.avi


list attached usb devices
lsusb


write extended usb device information to a file
sudo lsusb -v > ~/lsusb.txt


reload the udev rules (multiple solutions)
sudo udevcontrol reload_rules
sudo /etc/init.d/udev reload


reconfigure the graphic card
sudo dpkg-reconfigure xserver-xorg


gnome: autostart programmes
gnome-session-properties


gnome: login (ubuntu 5.04 hoary): session aborted because it was shorter than 10 seconds
sudo chown USERNAME /home/USERNAME/.ICEauthority