CentOS自带的VNC服务器,第一次连接时显示灰色背景以及一些很难看的GUI

CentOS自带的VNC服务器,第一次连接时显示灰色背景以及一些很难看的GUI
解决方案:
Configuring Desktop Environment

The user specific configuration files of vncviewer resides in ‘.vnc’ directory in user’s home directory. (e.g. ‘/home/saini/.vnc/’). Open ‘/root/.vnc/xstartup’ in your favorite editor and edit as below

For Gnome
The ‘xstartup’ file shout look like this

#!/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 &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startx &

使用vncpasswd命令设置vnc密码

service vncserver start

vncserver :4 -geometry 1300x700

原文地址:https://www.cnblogs.com/jinguodong/p/3023031.html