转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/20647553
1、配置安装VNC
[root@guodb2 Disk1]# yum install vnc*
4、登录报错如下
5、查VNC端口
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 9748/Xvnc
6、从上面可以看出0号端号被占用了,用1号端号登录
7、正常登录VNC,但图形界面显示如下
8、修改VNC配置文件,注释原来的两行,添加最后两行
vc3lzY29uZmlnL3ZuY3NlcnZlcnM8YnIgLyZndDsjIFZOQ1NFUlZFUlM9JnF1b3Q7MjpteXVzZXJuYW1lJnF1b3Q7PGJyIC8mZ3Q7IyBWTkNTRVJWRVJBUkdTWzJdPSZxdW90Oy1nZW9tZXRyeSA4MDB4NjAwIC1ub2xpc3RlbiB0Y3AgLW5vaHR0cGQgLWxvY2FsaG9zdCZxdW90OzxiciAvJmd0OyBWTkNTRVJWRVJTPSZxdW90OzE6cm9vdCZxdW90OzxiciAvJmd0OyBWTkNTRVJWRVJBUkdTWzFdPSZxdW90Oy1nZW9tZXRyeSAxNDAweDc1MCAtbm9saXN0ZW4gdGNwICZxdW90OzxiciAvJmd0OzxiciAvJmd0OzxiciAvJmd0OzmhotDeuMTNvNDOvefD5izIq7K/16LKzbX0o6zM7bzT1+6689K70NA8YnIgLyZndDtbcm9vdEBndW9kYjEgeXVtLnJlcG9zLmRdIyB2aSAvcm9vdC8udm5jL3hzdGFydHVwPGJyIC8mZ3Q7IyEvYmluL3NoPGJyIC8mZ3Q7PGJyIC8mZ3Q7PGJyIC8mZ3Q7IyBVbmNvbW1lbnQgdGhlIGZvbGxvd2luZyB0d28gbGluZXMgZm9yIG5vcm1hbCBkZXNrdG9wOjxiciAvJmd0OyMgdW5zZXQgU0VTU0lPTl9NQU5BR0VSPGJyIC8mZ3Q7IyBleGVjIC9ldGMvWDExL3hpbml0L3hpbml0cmM8YnIgLyZndDs8YnIgLyZndDs8YnIgLyZndDsjWyAteCAvZXRjL3ZuYy94c3RhcnR1cCBdICZhbXA7JmFtcDsgZXhlYyAvZ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