Linux下怎样启动vncserver(HOWTO - Linux VNCserver)

自己有台FC4(Fedora Core 4)的桌面后免不了要从别的地方登过来

于是我就在自己机器上起了个vnc server

/etc/rc.d/init.d/vncserver start

发现用vncviewer用ip连不了

查了些文档才搞明白

vi /etc/sysconfig/vncservers

让里面有这么两句:

VNCSERVERS="2:root"

VNCSERVERARGS[2]="-geometry 1024×768"

这里因为我的桌面本来就用了个x显示所以这里用2

后面的"root"代表是用root用户启

第二句的"1024×768"本来一般都是800×600

我嫌分辨率太小自己改了

然后services vncserver restart

接着用vncpasswd设置vnc连过来的密码

再用vncviewer用ip:2(如10.0.0.1:2)来连

输入密码

OK

能连上

只不过现在只能显示很简陋的twm窗口

怎样才能登上来显示得就像我本机的一样是kde呢

也有办法

vi ~/.vnc/xstartup

将本来注释掉的这两句的前面的注释符"#"去掉(文件头里有提示)

变成这样

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc

注意:后面的不变

就行了

service vncserver restart

再登上去就完全可以了

Discussion Area - Leave a Comment




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word