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

总有 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 呢?

天蓬老师
天蓬老师

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

répondre à tous(1)
大家讲道理

你需要指定 X 服务器的位置,也就是 DISPLAY 环境变量。通常,本地的在 :0 上:

DISPLAY=:0 gnome-shell --replace
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!