解决linux上VNC安装好后登录出现黑屏、灰屏、鼠标是大黑叉情况
安装系统支持包组
服务器(Centos,rhel)在安装字符界面操作系统时默认是不会安装相关图形包组的。
# yumgroupinstall "GNOME Desktop Environment"(CentOS 5.x安装 GNOME桌面环境)
# yumgroupinstall "X Window System" "Desktop"(CentOS 6.x安装 GNOME桌面环境)
# yum -yinstall gnome*
# yumgroupinstall Xfce(CentOS安装Xfce桌面环境,可选)
# yuminstall vnc-server vnc* (CentOS 5.x里)
# yuminstall tigervnc-server tigervnc (CentOS 6.x里)
这里的方法选择执行就可以了,我这里是执行了第二句,第三句就可以了,
原因是系统在安装的时候没有安装桌面元素包
1.安装VNC-server
yum -yinstall vnc *vnc-server*
2.修改VNCServer主配置文件
#vim /etc/sysconfig/vncservers
复制最后两行并去掉行首注释符,
修改为如下:
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry1024x768"
3.设置VNCServer远程连接密码
命令行界面键入
#vncpasswd
输入两次相同的密码