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
# .xsession-errors can grow huge... remove it if [ ! -h $HOME/.xsession-errors ] then /bin/rm $HOME/.xsession-errors ln -s /dev/null $HOME/.xsession-errors fi if [ ! -h $HOME/.xsession-errors.old ] then /bin/rm $HOME/.xsession-errors.old ln -s /dev/null $HOME/.xsession-errors.old fi
It verifies if
.xsession-errors is a symbolic link. If not, remove it and replace it with a symbolic link.
Is there a way to lock/unlock the screen from a script?
The answer is “yes”. Lock the screen:
Unlock the screen:
Demo (lock the screen, then unlock it in 5 seconds):
gnome-screensaver-command -l && sleep 5 && gnome-screensaver-command -d
Tip from here.
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.
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: http://relay3.slayradio.org:8000/.
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.
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`'