Restore/Reload/Recover Crashed Gnome 3 Shell From tty1

Posted by on Jan 5, 2012 in LinuxNo 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.



Brunton 26 Watt Foldable Solar Array


Brunton 26 Watt Foldable Solar Array


$539.99


The next generation of Solaris foldable technology is here. CIGS (Copper Indium Gallium diSelenide) is the most efficient thin film solar technology available. By maximizing performance while optimizing portability, it makes the Solaris 26 the most compact high output model available. The built-in blocking diode prevents reverse battery discharge. Provides a lightweight, compact design that includ…

ASUS VG236H 23-Inch 120 Hz 3D Ready Panel Monitor with nVidia 3D Vision Kit - Black


ASUS VG236H 23-Inch 120 Hz 3D Ready Panel Monitor with nVidia 3D Vision Kit – Black


$404.68


Shift into 3D Experience a new, exciting 3D world with the immersive 23-inch VG236H 3D Vision Kit featuring NVIDIA® 3D Vision™ technology that reinvents your movies, videos, and games for the third dimension. This all-inclusive 3D bundle includes four components that provide everything you need to easily connect to a compatible PC1 and start enjoying 3D in brilliant HD splendor. The …

Black USB 2.0 2.5 SATA HARD DISK DRIVE CASE Enclosure


Black USB 2.0 2.5 SATA HARD DISK DRIVE CASE Enclosure


$5.85


Black USB 2.0 2.5 SATA hard disk drive case enclosure…

Seis De Mayo


Seis De Mayo


$5.98


It wasn’t long after the recording of this, Trey Anastasio’s third–and most warmly idiosyncratic–solo album, that the Phish frontman/guitarist announced that his improvisation-fueled, cult-fave band would record no more. Longtime Phish-heads (or admirers of Anastasio’s previous free-form jazz excursions with Les Claypool and Stewart Copeland and more conventional solo work) may find this ambitio…

Sapphire Video Card 100314-3l Hd 6870 1gb Ddr5 256bit Pci Express D-Dvi/Hdmi/Display Port Retail


Sapphire Video Card 100314-3l Hd 6870 1gb Ddr5 256bit Pci Express D-Dvi/Hdmi/Display Port Retail


$222.69


PCI Express based PC is required with one X16 lane graphics slot available on the motherboard.4X75 Watt 6-pin PCI Express power connector is required for CrossFireX system.2X75 Watt 6-pin PCI Express power connector is required.1024MBMinimum of system memory.Installation software requires CD-ROM drive.DVD playback requires DVD drive.Blu-ray/HD DVD playback requires Blu-ray/HD DVD drive.Blu-ray/HD …

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , ,

Leave a comment