How to restart gdm in ubuntu without being logged out
How can I restart gdm or the xserver without logging out? Sometimes, there is a freeze and I just need to redraw. It rarely happens but when it does. My only options are
- /etc/init.d/gdm restart
- ctrl+alt+backspace 开发者_运维百科
- switch to tty and restart
all those options force my session to end.
Any suggestions?
Thanks
You can start at 3rd runlevel (or whichever is the multiuser without X one on Ubuntu) (set it in /etc/inittab) and then manually use startx
, then when your xserver freezes, you only have to kill it, use startx
again, but you don't have to log in, because you're already logged.
It still kills the session, but you don't have to log in again.
sudo pkill -9 ^gnome-shell
and sudo killall -3 gnome-shell
These are ones I use (not simultaneously though), hope they can be of help.
精彩评论