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.
19 Answers
Hit Alt+F2, type r and hit enter.
10The cinnamon --replace process can be sent the HUP signal which will trigger it to restart, thus preserving your open window and running applications.
$ pkill -HUP -f "cinnamon --replace"This will take care to send the HUP signal to a process that matches the pattern, "cinnamon --replace". The signal HUP (SIGHUP) tells the process to "Hang Up".
6This 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.
- Cinnamon freezes
- Switch tty. I usually go to tty6, Ctrl+Alt+F6
- If you need to login first, do so.
- 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 columnFROM. Mine is:0(yes, including the colon). - 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.
Cinnamon has a direct keyboard-shortcut to restart the desktop without restarting any of the running applications:
ctrl+alt+esc
Which will probably still work in some cases when the alt+f2 Method does not work anymory
3The easiest sulution would be:
killall -HUP cinnamon 3 You can restart Cinnamon by:
pressing Alt+F2, type
r, and press Enter,Ctrl+Alt+Backspace (restart Xorg),
in TTY use command:
sudo service mdm restart
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 The following combination of the above comments worked for me:
- Ctrl-Alt F1 to switch to terminal 1. Log in if necessary
- $
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 wastty8). $
cinnammon --replace --clutter-display=:0 2> /dev/null &Notes on this last command:
:0was 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. Seecinnamon --helpfor more. 2> /dev/nullredirects stderr to nowhere so my terminal does not get cluttered with messages.
Ctrl-Alt-F8to return to my window cinnamon environment (F8 for me since my terminal was tty8 per thewcommand above. For you it may not be F8.)
Net result: this restarted cinnamon in my terminal (tty8) without losing my windows.
try this
- pressing Ctrl + Alt + F2
export DISPLAY=:0.0; cinnamon --replace
You can try the w -ous command and check if there is number for DISPLAY. If there isn't a number just use startx and Alt+F7 to go back to GUI.
After you have switched to tty Try this killall -HUP cinnamon.
Press Ctrl + Alt + F7.
Cinnamon will ask you if you want to restart cinnamon.
I have this problem periodicaly due to gfx driver for HP Envy.
I need to do one or both of the following depending on the circumstancel;
- As the top answer, and others, suggest - restart cinnamon - Press ALT + F2, press R, and then hit ENTER. (Do this if the taskbar becomes unresponsive, or windows do not actually have focus, on-click etc. eg, you may be clicking or typing in the window that seems to have focus, but the one behind is receiving the event - this can even he hidden completely behind the window you THINK is active)
- Switch to a virtual console, then back to X - Press CTRL + ALT + F1, to go to the console, then press ALT + F8 to return back to X. - (Do this if the WHOLE screen is unresponsive - at least you don't SEE anything happening - this fixes things for me at least.)
This problem exists for me still - Linux Mint 17.x - hope it helps!
I sometimes have that problem when locking the screen: the lock screen doesn't appear and my system seems frozen, with no input working, and I can't log back in.
My solution is to kill the cinnamon-screensaver process.
% pkill cinnamon-screenpkill uses the info in /proc/PID/stat, and Linux only stores the first 15 characters of the command name, so using "pkill cinnamon-screensaver" won't work.
Now my system is unlocked, input works again and I have not lost any of my windows. To make the system lockable again, I restart the screensaver.
% nohup cinnamon-screensaver > /dev/null 2>&1 &I redirect to /dev/null to avoid the creation of the nohup.out file.
1Try 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.
I tried Ctrl+Alt+Backspace (Kill x server),
That seemed to work for me.
(However I had started a second cinnamon session (cinnamon &) doing so caused only the wallpapaer to be shown. I then did the Kill x server keystroke. That appeared to restarted the remaining cinnamon shell, and killed it again, I think thats how I got back to normal. It did the login zoom to desktop thing, so I was satisfied at that point; (LM 17.1 Rebecca))
I've tried all previous solutions, but none of them works.
The solution that works for me is killall cinnamon-sessionHope this helps.
P/s: My linuxmint version is cinnamon 18.3
Once I had an unusual problem, just after a laptop was in standby. There was nothing but a black screen, but the mouse was working. In TTY2 I tried the following command several times:
pkill -HUP -f "cinnamon --replace"but nothing happened.
Then in tty2, I killed the cinnamon screensaver and it worked:
killall cinnamon-screensaverThen the black screen disappeared and then by restarting the cinnamon everything became okay.
I sometimes do experiments with my cinnamon desktop and this problem happens a lot. I solve this problem by logging in to a tty terminal and issuing the command sudo systemctl restart gdm.service.
STRG + ALT + ESC helps me to restart Cinnamon 4.8.6 under Linux Mint 20.1 to restart the Cinnamon Session