linux - 怎样通过 SSH 正确重启 GNOME Shell?
天蓬老师
天蓬老师 2017-04-17 11:33:01
0
1
844

总有 gnome-shell 卡死的时候, 只好通过 SSH 或 tty2 进入, 或者 tty2 都进不去,,

可如果我直接杀掉进程想起动, 每次都会提示无法打开:

#➤➤ kill -9 2136
#➤➤ eval `gnome-shell --replace`
Window manager error: Unable to open X display
#➤➤ gnome-shell
Window manager error: Unable to open X display
#➤➤ gnome-shell --replace
Window manager error: Unable to open X display

如果重启整个 Window Manager 的话, 桌面上已经开启的应用是不会保存的, 单独重启 gnome-shell 倒是可以, 课我怎样才能单独重启 gnome-shell 呢?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
大家讲道理

You need to specify the location of the X server, which is the DISPLAY environment variable. Usually, local on :0:

DISPLAY=:0 gnome-shell --replace
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template