Wednesday, January 2, 2013

Getting rid of the GNOME "Oh No! Something has gone wrong." dialog

In some error cases, GNOME will display a full-screen window with only a single button. The window claims that "Oh no! Something has gone wrong." and "A problem has occurred and the system can't recover. Please log out and try again." The button merely allows a user to log-out and thus quit the current session. Killing that window with xkill also quits the session.

Most of the crashes I get is from experimental code crashing gnome-settings-daemon. Certainly not something fatal, certainly not something that should prevent me from continuing to work in my current session. After all, the menu key still works, the hot corner works, everything works, but closing the dialog will throw me out of my session. And because that pesky dialog is always on-top, I'm down to one monitor. Luckily, the dialog can be disabled.

Update Jan 3: As Jasper points out in the comments, Alt+F4 will close the window. Though I tried Ctrl+W and Ctrl+Q, I haven't used Alt+F4 in ages. Sometimes the right solution is so much simpler :)

The dialog is displayed by gnome-session and it's named the fail whale (code). It's triggered only for required apps and those can be configured.

$ cat /usr/share/gnome-session/sessions/gnome.session | grep Required
RequiredComponents=gnome-shell;gnome-settings-daemon;
Drop g-s-d from the required components, restart the session, and you won't see the error anymore. Try it by sending SIGABRT to g-s-d.
$ kill -ABRT `pidof gnome-settings-daemon`
Doing so twice (g-s-d restarts once) will trigger the error unless g-s-d is dropped from the required components.

It should go without saying, but the above will only display the error message, it won't fix the actual error that causes the message to be displayed.

5 comments:

  1. You can just use Alt+F4 when it comes up with no harm.

    Or Alt+Space to bring up the window menu, then choose "Close"

    ReplyDelete
  2. Removing items from RequiredComponents isn't good advice. If you remove gnome-shell from the gnome session, then gnome-shell won't autostart.

    Ubuntu has shipped a patch for a while that kills the fail whale because it was especially annoying in previous releases. It needs updating for 3.7 but it works for the 3.6 series.

    ReplyDelete
  3. Haha, awesome. I haven't used Alt F4 in years and didn't even think of that. Thanks, post updated.

    ReplyDelete
  4. Quote:
    You can just use Alt+F4 when it comes up with no harm.
    Unquote

    But you have to set the focus on the window by clicking on it before !

    Log out may not be grey.

    ReplyDelete
  5. No luck getting it closed with Alt-F4, but anyhow, the problem is how to find what the error is. There aren't any useful logs left by GNOME at all. X server thinks it works fine.

    ReplyDelete

Comments are moderated thanks to spammers