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就可以连接看到桌面了。

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