Mandriva上安装VNC

1. 安装

#urpmi vnc-server

显示
          Preparing...                ########################################### [100%]
    说明安装成功,如有缺失的packet,需要提前安装。


2. 此时可以 运行 vncserver, vncviewer, vncconfig, vncpassword 命令

直接运行vncserver即可启动服务
#vncserver

如果此时显示:
    vncserver: couldn't find "Xvnc" on your PATH
运行命令:
    #urpmi x11-server-xvnc
即可解决

正常显示:
            New 'linux6:3 (root)' desktop is linux6:3(注意这个3,暂时称之为登录号)

            Starting applications specified in /root/.vnc/xstartup
            Log file is /root/.vnc/linux6:3.log


第一次运行需要设置client登录server所需要的password,输入两次即可。
其中 #vncpassword 可以修改密码,#vncviewer 和 #vncconfig需要在图形界面配置。


3. 登录方式

a. 用vncviewer登录:
    在linux或者window下运行vncviewer,输入serverip+上面显示的登录号
    例如: 192.168.0.1:3
    点击确定输入密码即可登录

4. 问题

如果完成上述步骤能登录,但是只有命令行模式,需要修改文件:

#vi /root/.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" & twm &


文件内容如上述蓝色字体所显示。 重新启动vncserver,即可登录桌面系统

你可能感兴趣的:(linux)