本次安装是redhat 下配置vnc,一般redhat操作系统已经安装了vnc 1. 检查vncserver是否已经安装 $ rpm -qa|grep vnc vnc-server-4.1.2-14.el5_3.1 2.启动vncserver # pwd /root # vncserver
You will require a password to access your desktops.
Password: Verify: xauth: creating new authority file /root/.Xauthority
New 'redhat:1 (root)' desktop is aiwm157:1
Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/redhat:1.log 这时候在 /root 下面有个隐藏文件夹 #ls -a .vnc/ . .. redhat:1.log redhat:1.pid passwd xstartup 3.修改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 &
请修改为: # more 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" & startgnome& DISPLAY=:1 gnome-session& 红色字体为修改后的内容 4.检测进程 # ps -ef|grep vnc root 11704 1 0 10:06 pts/7 00:00:00 Xvnc :1 -desktop redhat:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn root 11711 1 0 10:06 pts/7 00:00:00 vncconfig -iconic root 11754 11596 0 10:18 pts/7 00:00:00 grep vnc 5.杀掉进程 这里的1,代表的是之前启动的桌面号。 6.启动进程 启动桌面号1的vncserver
New 'redhat:1 (root)' desktop is aiwm157:1
Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/redhat:1.log 7.windows客户端安装vnc 在连接服务器地址输入类似以下格式 IP地址:桌面号 这里例子如:10.3.3.111:1 成功连接后,需要输入之前设置的密码,才允许访问。 注意:请关闭redhat的防火墙,否则会连接不上。 |
linux 安装 vnc
最新推荐文章于 2024-08-24 15:46:50 发布
下载URL:
http://www.realvnc.com/products/download.html
2010年08月13日 星期五 08:58