22

I am fairly new to Ubuntu and I was wonder what a good way is to debug when something crashes?

For example: I installed 11.04 and the default media player banshee makes my laptop crash after a few minutes of playing music. Since the system completely freezes and there is not error message it's hard to find out what is wrong.

Second problem I have is that sometimes the system crashes to login. I am suspecting it to be a Chromium or Flash but I am not 100% sure.

So anybody got some tips on how to debug stuff like this?

muru
  • 207,228
Pickels
  • 505

2 Answers2

14

Do not login using the login GUI after such a crash. Switch to a text-based login by pressing Ctrl + Alt + F1. Login with your username and password. Errors during a X session are appended to ~/.xsession-errors, but this file is overwritten every login. Make a backup of this file by executing:

mv ~/.xsession-errors{,.1}

This will rename the .xsession-errors file to .xsession_errors.1. Replace the .1 if you want a different suffix. You can now logout from this shell by executing exit.

Check the system logfiles in /var/log. The most interesting files are:

/var/log/kern.log
/var/log/Xorg.0.log (for the current session)
/var/log/Xorg.0.log.old (for previous session)
/var/log/?dm.log (gdm for gnome, kdm for KDE)
Lekensteyn
  • 178,446
2

All you have to do is to look at the log directory (/var/log/). You can find any crash or regular logs in there.

Some applications can create crash logs in their own directories. For example, ~/.banshee in your home directory.

Coldfish
  • 1,790