Archive
.xsession-errors can grow HUGE
Problem
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?
Solution
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 ]
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.
MC: get the same folder in the other panel
Problem
In Midnight Commander, you want to see the same folder in the other panel.
Solution
Alt + i
It can also be a good idea to run through the manual for more tricks: “man mc” :)
Download files with wget from sites that verify your user-agent
Problem
You want to download a file from a given site with your favourite wget utility but you get a “403 Forbidden” error in your face. Of course, everything works from your browser. What to do?
Solution
If it works from the browser but it fails with wget, then the site must check your user-agent. If it sees “User-Agent: Wget/1.12 (linux-gnu)” (version may vary), then it simply blocks you.
But don’t fear for a second. Simply fake a different user agent with wget and continue downloading.
Solution 1:
wget --user-agent "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0" http://host/file.jpg
Solution 2:
If you don’t want to provide a user agent each time, put the following your ~/.wgetrc file:
# custom .wgetrc file user_agent = Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Then:
wget http://host/file.jpg
Open Firefox with lots of tabs in an instant
Problem
You open Firefox with tabs from the last time. However, reloading these tabs takes lots of time and thus Firefox starts slowly. What to do?
Solution
Go to Preferences -> General, and check “Don’t load tabs until selected”.
Diablo 1 strategy guides
I decided to play some with Diablo 1 again. Here are some useful strategy guides:
- Freshman Diablo (list of guides)
- warrior strategy – Diablo – GameSpot Forums
- level up strategy
- Diablo 1 strategy guide
- Diablo
- Wolfslayer’s warrior guide
Troubleshooting
Under Windows 7 I had some problems with Diablo 1: the colors looked strange. The fix is very simple: just kill the process explorer.exe and Diablo works fine. Here is a batch script for launching the game correctly:
@echo off taskkill /f /im explorer.exe diablo.exe pause start explorer.exe exit

