opensuse 11.2 .xsession-errors

Hi guys
i recently installed opensuse 11.2 onto my brother’s computer. Despite a minor glitch i’m working on slow boot in opensuse 11.2 due to a hdd issue ( >4min ) - openSUSE Forums ]]] , it’s been a fantastic distribution.

The thing is that, on-and-off his system ocassionally hangs after login, and only shows the cursor and the green desktop. I’ve been looking into it to try to reproduce the failure and it has come to my attention that the cause for the hang is the .xsession-errors hidden file located in /home/user…

¿Is there a way to instruct the system to relocate this file, i mean, instead of being stored in /home/user it goes to /tmp ?
as i have a cron job to delete temp files on every boot, i can guarantee a newly created & fresh .xsession-errors file.

or, ¿can i point .xsession-errors to /dev/null ? … is this possible? how?
what are the consequences of doing this?

thanks in advance for your replies.


iirc, xsession-errors is hardcoded so you can’t provide a custom place for it

and yes, you can make a symlink to /dev/null (been using one myself for quiet some time as I usually don’t look into/need xsession-errors file). Note that under kde4, each time you login, it’ll remove that symlink so better creat a tiny script and place it in .kde4/Autostart so it’ll get executed each time you login and restore the link

I have something like:
ln -sf /dev/null $HOME/.xsession-errors

Consequences of pointing to /dev/null? All messages that belong into xsession-errors will land in /dev/null instead :wink:

Hello MicroChip,
thanks for your reply. However, I have some more questions:

  • ¿how do i create the script you talk about? (steps to make it real)

  • i’m using the gnome desktop, ¿how do i make gnome run the script at start-up (autostart in gnome)?

*¿is there a way i can tell the system through a cron job at boot time to delete this file?

thank you for sharing your knowledge, especially to the last question, which might be the most interesting for me to apply in both his and my system…


Fairly simple :wink:

Create a plain text file… let’s call it “mknull”

open mknull in your favorite text editor and place this inside it:

ln -sf /dev/null $HOME/.xsession-errors

Save it and make mknull executable, then place it where GNOME executes such files on login (I’ve no idea how GNOME does that so can’t help much on that, sorry)

About bootup stuff, you can place the commands in /etc/init.d/boot.local but instead of using $HOME, you should use the full path to your home directory, eg

ln -sf /dev/null /home/ofvergara/.xsession-errors

thanks microchip, ¡¡IT WORKED!!

i added to boot.local the commands and saved the file:

terminal as root: gedit /etc/init.d/boot.local

then i added the commands:
*rm /home/my-username/.xsession-errors
rm /home/my-username/.recently-used.xbel
and that was it!!!

my salute to you for sharing this great tip…