我是新来的使用Linux,并希望设置VNC – 它曾经工作,但我不知道发生了什么,现在似乎并没有工作。 任何build议将不胜感激。 谢谢。
编辑
我已经添加到“/ etc / sysconfig / vncservers”
VNCSERVERS="1:admin" VNCSERVERARGS[1]="-geometry 800x600"
和我的/home/admin/.vnc/xstartup文件看起来像
#!/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" & gnome-session & /usr/sbin/ss5 -m -t & env LC_CTYPE=zh_TW.utf8 WINEPREFIX="/home/admin/.wine" wine "C:\ \Program Files\\uTorrent\\uTorrent.exe" &
但是,当我尝试连接,我得到
替代文字http://i35.tinypic.com/295y16p.jpg
而/home/admin/.vnc/inverses:1.log文件看起来像
Sat Sep 26 17:44:15 2009 vncext: VNC extension running! vncext: Listening for VNC connections on port 5901 vncext: Listening for HTTP connections on port 5801 vncext: created VNC server for screen 0 error opening security policy file /usr/lib/xserver/SecurityPolicy Could not init font path element /usr/share/X11/fonts/TTF/, removing from list! Could not init font path element /usr/share/X11/fonts/OTF, removing from list! Could not init font path element /usr/share/X11/fonts/CID/, removing from list! Could not init font path element /usr/share/X11/fonts/100dpi/, removing from list! Could not init font path element /usr/share/X11/fonts/75dpi/, removing from list! sh: /home/admin/.vnc/xstartup: Permission denied
您也可以通过在Xconfiguration中启用vnc.so模块来将VNC设置为XVNC启动的一部分,如下所示:
编辑位于此处的XF86conig文件:
的/etc/X11/xorg.conf
修改模块部分以启用VNC,如下所示:
“模块”
…
…
加载“vnc”
结束部分
然后,您可以通过将以下内容添加到屏幕部分来启用安全性
“屏幕”
…
…
选项“安全types”“VncAuth”
选项“UserPasswdVerifier”“VncAuth”
选项“PasswordFile”“/root/.vnc/passwd”
EndSection
最后以root身份使用sulogin,并使用以下命令创build您的VNC密码:
来设置密码
重新启动X或机器,这应该让你VNC访问X-Windows。
资源
您需要以root用户身份运行/etc/init.d/vncserver restart命令,请尝试:
$ sudo /etc/init.d/vncserver restart