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?


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/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)
  • why not mention /var/crash/? This is where /var/log/apport.log sent me. – David LeBauer Jun 12 '12 at 17:08
  • /var/crash does not really contain human-readable error messages, but a file named like _usr_bin_Xorg.0.crash that can be submitted using Apport. – Lekensteyn Jun 12 '12 at 17:14
  • That is what I meant apport.log told me a specific *.crash file to check; ls -ltrh /var/crash/ confirmed that it was generated during the previous crash; but I was thinking that next time I might start with ls -ltrh /var/crash/. – David LeBauer Jun 12 '12 at 21:27

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.

  • Crash is a vague term. What exactly do you do if the system freezes completely and nothing out of the ordinary is in the logs? – mikewhatever Aug 23 '11 at 3:46
  • @mikewhatever Necro but found this looking for same type issues. Is 2018 and I'm on Ubuntu 18 and is stable until I debug my application. The whole system freezes and crashes. – Celess Aug 31 '18 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.