Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Cinnamon on my Ubuntu 12.04, and it works well, but sometimes it just freezes for no reason. I can move my mouse but can't click on anything.

So I want to restart Cinnamon from tty, like I used to do with gnome shell. How do I do that?

I tried killall cinnamon and nothing happened.

Then I tried export DISPLAY=:0.0 , cinnamon --replace and still nothing.

I guess the command cinnamon is not valid. I don't want to restart the whole X server because then all of my windows will get closed. I just want to restart the window manager cause I believe it is causing the problem.

share|improve this question

6 Answers 6

This happens to me a lot, too, and this thread is one of the top results when googling for "restart cinnamon". Unfortunately, the instructions don't work for me (only because the display number is wrong!). For future visitors, here's what I do that always helps me.

  1. Cinnamon freezes
  2. Switch tty. I usually go to tty6, Ctrl+Alt+F6
  3. If you need to login first, do so.
  4. Type w (yes, just the letter) and press enter. This commands does a lot of different things, but you need it to figure out the number of the display you are using. The display number is in the column FROM. Mine is :0 (yes, including the colon).
  5. Assuming that cinnamon is already dead (which you would notice by the windows lacking titles and that you can't move different windows around, and perhaps even not being able to use the keyboard), you type export DISPLAY=:0; cinnamon &, and don't forget the colon. I add the ampersand (&) only not to keep that tty busy.

This always works for me, and I don't lose open windows. Also, I keep these instructions in a file called restartcinnamon, which is just a text file. I keep the file in my Dropbox folder, so no matter what machine I am on I can just type cat ~/Dropbox/restartcinnamon if I need to be reminded of how to do it.

share|improve this answer
    
After doing this, my 3 screens (3 monitors) become like one. Any advice? –  justingordon Jan 23 '13 at 23:31
    
The fix then is to open up the displays panel and then click OK. Any way around this? Multi-monitor support has always been flakey on Linux. –  justingordon Jan 23 '13 at 23:44
    
Also worth noting: the TTY doesn't take the current Num-lock state. Had some confusing time figuring out why my password was incorrect... –  GeenHenk Jul 21 at 21:42

Hit Alt+F2, type r and hit enter.

share|improve this answer
    
This is the correct answer. Worked for me (Deb.7) –  Stichoza Jan 8 at 23:38
2  
In my case, Cinnamon is completely frozen and doesn't respond to Alt+F2. –  levesque Mar 29 at 22:09
1  
this is simply wrong since the question is "[...] from the tty?" –  Lucas Jun 1 at 22:33

When you kill cinnamon, check if it hasn't stopped writing killall cinna and pressing Tab. If the rest of the word appears, make it die with killall -9 cinnamon, and then restart it, using what you tried but without --replace:

export DISPLAY=:0.0; cinnamon
share|improve this answer

The easiest sulution would be:

killall -HUP cinnamon
share|improve this answer

The following combination of the above comments worked for me:

  1. Ctrl-Alt F1 to switch to terminal 1. Log in if necessary
  2. $ w (yes, single letter "w" is a command) to see your display # in the FROM column). For me it was :0 (includes the colon). Also, the TTY column will have the terminal # of your cinnammon session (for me it was tty8).
  3. $ cinnammon --replace --clutter-display=:0 2> /dev/null &

    Notes on this last command:

    • :0 was my display #.
    • & returns control of the terminal
    • the --clutter-display, if not entered, uses the DISPLAY, variable, which is why some of the prior suggestions did EXPORT first. But you can just pass the argument directly to cinnamon. See cinnamon --help for more.
    • 2> /dev/null redirects stderr to nowhere so my terminal does not get cluttered with messages.
  4. Ctrl-Alt-F8 to return to my window cinnamon environment (F8 for me since my terminal was tty8 per the w command above. For you it may not be F8.)

Net result: this restarted cinnamon in my terminal (tty8) without losing my windows.

share|improve this answer

Try to "soft-restart" cinnamon by sudo kill -USR1 <PID of your cinnamon process>. @Daniel's answer is correct but will kill X server while SIGUSR1 won't, at least on my machine... It turns out, as well, that all the windows preserve content and remain usable after that. Wondering if this is true for the others.

share|improve this answer

Your Answer

 
discard

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.