解決VNC連接灰屏或黑屏
1.進入vnc組態檔路徑
cd .vnc/
2.修改組態檔 .vnc/xstartup
vim ~/.vnc/xstartup
3.替換組態檔內容如下
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
#gnome-terminal &
sesion-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &
修改完成后重啟vnc
先停止
vncserver -kill :1
#(注意kill后面要有個空格,1為vnc埠)
再啟動vnc
vncserver :2 -geometry 1536x864
#(1536x864為創建的vnc視窗解析度)
vnc連接啟動 ip:vnc埠號

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/209071.html
標籤:其他
下一篇:Linux安裝Nginx步驟
