Restore/Reload/Recover Crashed Gnome 3 Shell From tty1

Posted by on Jan 5, 2012 in Linux14 commentsPrint This Post

I switched over to Linux Mint – a very nice Ubuntu derivative – a few releases back, and have just updated to “Lisa”, aka Linux Mint 12. The latest release uses Gnome 3, which is vastly different from Gnome 2 in pretty much every way. As much as I loved Gnome 2, I have to say, I don’t hate Gnome 3. In fact, I rather like it, despite its quirks, and my unfamiliarity concerning customising and tweaking. Besides, learning is half the fun of a new system.

One annoyance I have found to be somewhat of a show-stopper is that the Shell seems to crash on a fairly regular basis. I’m still trying to work out what is causing the crash – it could be one of the few extensions I have installed and modified to get the system looking and feeling the way I want, or some other bug related to the Shell, ATI Graphics driver, Xserver…

Unfortunately, when the shell crashes, the application windows remain, but all the panels and shell related stuff vanishes. It’s also not possible to use Alt-F2 to bring up the Run command widget, from which it’s possible to simply run “r” to reload the shell. Instead, I have had to find a couple of alternative methods to reload the shell. One is particularly drastic, and involves killing the whole Gnome session – not good if you have work to save etc. The other just replaces the shell.

The “Nice” Method

This method will replace the Gnome shell using tty1. As a result, all output from the gnome-shell command will be output to standard output on tty1, although this can be redirected to /dev/null or somewhere else if desired. To use this method, press Ctrl-Alt-F1 to change the display to tty1, and login if necessary. Then run:

DISPLAY=:0 gnome-shell --replace

This effectively tells the system to redirect the gnome-shell –replace command to tty7, i.e. the Xserver.

Once done, press Ctrl-Alt-F7 to return to Gnome.

The more aggressive method

This method will completely restart the Gnome session, killing any open applications in the process. This really is a last resort, and rather horrible method. Once again, press Ctrl-Alt-F1 to change the display to tty1. Once there, run:

ps aux | grep 'gnome-session'

You should see a few lines of output. What you’re looking for is (most likely the first line) the line similar to this:

username 4321 0.0 0.1 00000 00000 ? Ssl 09:48 0:00 /usr/bin/gnome-session --session=gnome

Where “username” is your username. Look specifically for “/usr/bin/gnome-session –session=gnome”. The number in the second column (after the username) is the value we’re after – in this case “4321″. This is the PID (Process ID) for gnome-session, and the value required to kill the session:

sudo kill -9 4321

This should kill the crashed Gnome Shell session, and start a new one. The display should also be returned to tty7, and the Login screen (if not, press Ctrl-Alt-F7).

If anyone else has any alternative, or better methods, please feel free to comment below.


Something not quite right? Inaccuracies or invalid code? Didn’t work for you? Don’t like me using Ss instead of Zs? Add a comment below! All comments are welcome. Except spam, because spam is a bit crap.





















Dragon Touch A1X 10.1 Quad Core Google Android 4.4 KitKat Tablet PC, 1GB RAM, 16GB Nand Flash, Bluetooth, Dual Camera, HDMI, Google Play Pre-installed, 3D Game Supported, 2014 Newest Model [ by TabletExpress ]


Dragon Touch A1X 10.1 Quad Core Google Android 4.4 KitKat Tablet PC, 1GB RAM, 16GB Nand Flash, Bluetooth, Dual Camera, HDMI, Google Play Pre-installed, 3D Game Supported, 2014 Newest Model [ by TabletExpress ]


$109.99


Need a keyboard case ? Please search “B00EZAX2LA” on Amazon Brilliant PerformanceEquipped with a Quad-Core CPU and Octa Core GPU, this tablet ensures everything running smoothly. Enjoy yourself with stream videos, smooth-flowing gaming, web surfing and more!Newest Android 4.4 KitKatThe newly released system enables faster multitasking, optimizes user interface with more convenience and simplity a…

Dragon Touch® 7'' Black Dual Core Y88 Google Android 4.3 Tablet PC, Dual Camera, HD 1024x600, 4GB, Google Play Pre-load, HDMI, 3D Game Supported (enhanced version of A13) [By TabletExpress]


Dragon Touch® 7” Black Dual Core Y88 Google Android 4.3 Tablet PC, Dual Camera, HD 1024×600, 4GB, Google Play Pre-load, HDMI, 3D Game Supported (enhanced version of A13) [By TabletExpress]


$54.99


Brilliant PerformanceEquipped with a Dual-Core CPU and Quad Core GPU, this tablet ensures everything running smoothly. Enjoy yourself with stream videos, smooth-flowing gaming, web surfing and more!Android 4.3 Jelly BeanGoogle Android 4.3 (Jelly Bean) OS reveals tons of new adventures to your Dragon Touch tablet. Get access to thousands of useful apps and fun games to download and install on you t…

Tags: , ,