Archive for January, 2013

.xsession-errors can grow HUGE

January 31, 2013 1 comment

Something funny happened to me today. I logged in to my desktop machine at my workplace when a warning message told me that “disk space is low”. A quick “df -h” indicated that it’s true, my HDD is at 100%! How is it possible, I should occupy no more than 30%. After hunting for 10 minutes for the guilty file/directory, it turned out that the file .xsession-errors in my HOME directory grew more than 200GB! WTF?

I removed this file and under the name .xsession-errors I put a link on /dev/null. However, after a reboot the symbolic link was gone and .xsession-errors became a regular file again. Tricky :) So I added the following lines to the end of my .bashrc file:

# .xsession-errors can grow huge... remove it
if [ ! -h $HOME/.xsession-errors ]
    /bin/rm $HOME/.xsession-errors
    ln -s /dev/null $HOME/.xsession-errors

if [ ! -h $HOME/.xsession-errors.old ]
    /bin/rm $HOME/.xsession-errors.old
    ln -s /dev/null $HOME/.xsession-errors.old

It verifies if .xsession-errors is a symbolic link. If not, remove it and replace it with a symbolic link.


Lock and unlock the screen from command line

January 30, 2013 Leave a comment

Is there a way to lock/unlock the screen from a script?

The answer is “yes”. Lock the screen:

gnome-screensaver-command -l

Unlock the screen:

gnome-screensaver-command -d

Demo (lock the screen, then unlock it in 5 seconds):

gnome-screensaver-command -l && sleep 5 && gnome-screensaver-command -d

Tip from here.

How to disable the HUD’s use of the Alt key?

January 30, 2013 Leave a comment

Pressing the Alt key brings up the HUD. How to get rid of it?


Launch System Settings, then Keyboard -> Shortcuts -> Launchers. On Key to show the HUD, press Backspace to disable it.

Categories: ubuntu Tags: , , ,

Rip streamed audio

January 30, 2013 Leave a comment

You want to rip a streamed radio.


  • fetch StreamRipStar, which is a frontend for streamripper
  • install streamripper (via apt-get)
  • configure StreamRipStar, specify the audio stream’s URL and start ripping

If you want to rip Slay Radio (best Commodore 64 tunes!), use this address:

Make room! Make room!

January 29, 2013 Leave a comment

Under Gnome/Unity, you want to increase the number of virtual workspaces.

Start CompizConfig Settings Manager (ccsm), then General -> General Options -> Desktop Size tab. Here adjust the horizontal and vertical virtual size.

The title of this post is a reference to a novel of Harry Harrison.

Categories: ubuntu Tags: , , ,

VLC gets stuck

January 29, 2013 Leave a comment

On my Linux box, VLC gets stuck sometimes and only the good old “kill -9” can shoot it out. Is there a single command to kill it?


alias killvlc='kill -9 `ps ux | grep vlc | grep -v grep | tr -s " " | cut -d" " -f2`'
Categories: bash Tags: ,

Online Convert(er)

January 27, 2013 Leave a comment

I wanted to convert a PDF with Calibre but it failed. I tried with Online Convert(er) too and it succeeded…

Categories: Uncategorized Tags: , , , ,