Skip to main content


Showing posts from January, 2007

Replacing xscreensaver with gnome-screensaver in Xfce

By default, xfce screensaver requires xscreensaver. You have the _option_ to remove xscreensaver using the following command (as privileged):

apt-get remove xscreensaver

To install the gnome-screensaver use the following command (as privileged):

apt-get install gnome-screensaver

To auto-start the gnome-screensaver, add it as an Autostarted Application:

Xfce menu > Settings > Autostarted Applications

The command for starting the gnome-screensaver daemon is:


To be able to use the action button "Lock screen" to start gnome-screensaver immediately and lock your screen, modify the file /usr/bin/xflock4:

#xscreensaver-command -lock || xlock $*
gnome-screensaver-command --lock exit 0

Note that the original xscreensaver command is now commented. Backup the original copy of xflock4 (as privileged):

cp /usr/bin/xflock4 /usr/bin/xflock4.orig

Hope that helps.

If you have questions, post them at:
and leave a comment.

File renaming in BASH via string handling


#remove spaces
for i in *.wma; do
mv "$i" `echo $i | tr ' ' '_'`;

#remove uppercase
for i in *.[Ww][Mm][Aa]; do
mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`;

#convert file names
for i in *.wma; do
mv "$i" "`basename "$i" .wma`.mp3";

#rename test1a, test2a, test3a
#to t1a, t2a, t3a
for i in test*a; do
mv $i $substring1$substring2'a'