Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I restart Gnome Shell after a crash? Alt+F2 and restart won't work as the prompt crashed with the shell. Since windows focus is gone along with the shell as well, I can't type gnome-shell --replace in a terminal, either. The Ctr+Alt+F1 command line can't open the X display. So I'm left with killing X, thus loosing all open applications. Is there a keyboard shortcut for restarting Gnome Shell?

share|improve this question

I found that all the other ways did not work for me (i.e. those based around gnome-shell --replace).

First, switch to tty1 with ctrl+alt+1, then log in. Use top or htop (or pkill?) to kill gnome-shell (you will probably need to kill with sigkill 9). (You might need to run DISPLAY=:0 gnome-shell, although I usually don't.)

Switch back to the GUI with ctrl+alt+7. (Normally gnome-shell will automatically restart for me.)

share|improve this answer

I will assume you are running 3.2 Currently due to the obvious bugs the best thing to do is 1 of the following.

The first thing to do is create a seperate profile in whatever terminal you have as default, or whichever it would be if you opened a terminal from your file browsers right click menu. Try to name this profile something you will notice like Restart Shell. In this new profile you want to set it to 'Run a custom command instead of my shell', you would find this in Gnome Terminal under Edit>Profile Preferences>Title and Command. Check the box and insert

gnome-shell --replace

Next do one of the follwing when you run into a crash. Always remember to keep the terminal running once it's open.:

a) Keep a browser open. Example, Firefox is open, no Title Bars and you can't restart, close anything that might be blocking the focus of Firefox. In FF click Tools>Downloads and find a recent download, right click on it and click Open Containing Folder. Now right click and Open in Terminal. It will now either open your default profile or you will right click and select the Restart Shell profile and open a new tab, thus automatically starting a new shell. You must now keep the terminal open.

b) always keep a terminal open. Then when you crash, you just select the alternate profile, and open a new tab which should launch that profile and the command to start a new shell.

c) In empathy and pidgin, perhaps other IM clients as well, type file:/// and hit enter. This will allow you to click the link and should open your file browser(Nautilus). If not, try right clicking on it and selecting the appropriate action. From the browser you open the terminal by right clicking.

All of these options can come in handy and help prevent a lot of frustration. One thing to remember is sometimes to get to the window you need, i.e Firefox, since everything might be blocking focus; File>Exit, should normally do the trick.

share|improve this answer

Have you tried

DISPLAY=:0 gnome-shell --replace

from a console prompt (see also this answer)?

  • Hit Ctr+Alt+F1
  • Log in
  • Execute DISPLAY=:0 gnome-shell --replace
  • Hit Ctr+Alt+F7
share|improve this answer

There is not a keyboard shortcut for restarting Gnome Shell.
But you can assign a shortcut for gnome-shell --replace command.
This will be very useful, but sometimes killing X is the only solution about Shell crash.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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