How do I restart a frozen screen in Ubuntu without losing any open windows?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles
--
Chapters
00:00 How Do I Restart A Frozen Screen In Ubuntu Without Losing Any Open Windows?
00:32 Accepted Answer Score 13
02:08 Answer 2 Score 0
02:28 Thank you
--
Full question
https://superuser.com/questions/570194/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ubuntu #xorg
#avk47
ACCEPTED ANSWER
Score 13
DISCLAIMER: According to Brenden's comment, this might be outdated and not work anymore with newer versions of Ubuntu. Also please be prepared that you might lose your open windows.
Now I got it for Unity (I just replaced my GNOME shell with unity without logging out or closing windows):
- Go to tty1 [Ctrl]+[Alt]+[F1]
- Type in
DISPLAY=:0
so that programs know on what port to find the X-Server export DISPLAY
unity --replace
orgnome-shell --replace
(you can also replace GNOME-Shell by unity or Unity by the GNOME-Shell)
This only works if not the X-Server or GNOME is frozen but only Unity or the GNOME-Shell.
How it works: The communication between programs and the X-Server for displaying their UI is working over a network socket. This normally is at "localhost:0" short ":0". By setting the DISPLAY variable, the programs know where to find the X-Server to communicate with it, so programs are displayed on the X-Server on tty7 even if the program is running on tty1.
The content of windows is managed by the X-Server whereas the position and borders of the windows is managed by the window manager integrated in unity or the GNOM-shell so there is a way to replace only them without restarting the applications on the X-Server.
PS: I'm just describing what I understand it to be, so please edit and correct me if I'm wrong in some points.
EDIT:
For the GNOME-Shell, there is another way to restart it. After changing to tty simply type in pkill -HUP gnome-shell
, I don't know if there's something similar for Unity.
ANSWER 2
Score 0
If your screen is frozen, but mouse is still moving (however no result on left-click) - try
- close suspicious (in terms of locking too much memory) apps;
You can use keyboard alt-tab to select and alt-f4 to close.
- right-click anywhere.
Dunno why it happens and why right-click works, but at least it works.