Here's a fun Ubuntu exercise:
- In a running terminal, restart GNOME using
gnome-shell --replace
. - Realize that it's going to be running your GUI shell out of the foreground of a terminal, decide not to worry about it.
- Forget about that terminal for a while, then come back to it.
- Wonder what's producing all this weird output about GTK, whatever, it's probably not important
- Ctrl-C
So from here, your goal is to get the gnome-shell going again without losing the windows you had open.
Okay, ya got me, this is actually just a screw-up I made that was somewhat interesting to fix.
The key steps, in Ubuntu Desktop 18.04, are...
- Use
ctrl + alt + F<#>
to switch TTY. This produced some bizarre visual glitches, but after switching back and forth a few times, they resolved into a nice command-line login prompt. - Enter your username and password
- Execute
gnome-shell --replace
- GNOME is probably running again, somewhere. Go find it (with
ctrl + alt + F<#>
). Log in. - Now that you've recovered the windows you were working on, save and close everything and restart your computer. Your nice new GNOME shell might get screwed up by something like the system suspending (mine did).