search

Home  >  Q&A  >  body text

linux - 怎样通过 SSH 正确重启 GNOME Shell?

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

天蓬老师天蓬老师2877 days ago851

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 11:35:01

    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
    

    reply
    0
  • Cancelreply