VNC遠程連接灰屏無法顯示gnome桌面

按照默認配置文件只會出現灰屏和一個終端,經過百度查詢大多數文章都說是要把最後兩行註釋,新增gnome-session &。可是我修改後用vnc view連接直接灰屏了。
查看日誌主要報錯如下:

vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5902
vncext: created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
Internal error: Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server

解決方案爲在~/.vnc/xstartup文件最後新增如下內容

export XDG_SESSION_TYPE=x11
exec dbus-launch gnome-session
xsetroot -solid grey -cursor_name left_ptr
vncconfig -iconic &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

然後通過vnc view就可以連接看到桌面了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章