Windows XP 远程连接 Redhat 桌面
[root@localhost ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Kernel \r on an \m
[root@localhost ~]# rpm -qa|grep vnc
vnc-server-4.1.2-9.el5
vnc-4.1.2-9.el5
没有上面的软件包则安装之。
一、VNCServer 配置
1. vi /etc/sysconfig/vncservers (as root):
去掉最后两行注释并改为如下设置:
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
(或者VNCSERVERS="1:root"
VNCSERVERARGS[1]=默认原文 )
说明:
可以在这里添加个多用户,使用户能够使用 vnc 客户端连接 vnc 服务器,如:
VNCSERVERS="1:root 2:oracle"
VNCServer 的默认端口是 5801(http 连接),5901(桌面应用连接)和 6001,这
里的"1:root 2:oracle"表示为系统用户 root 开启 5801,5901 和 6001 端口,1
为桌面号或者终端号,为系统用户 oracle 开启 5802、5902 和 6002 端口,2 为
桌面号,依此类推。"1024x768"为屏幕分辨率。为了安全起见,不要在这里设置
root 用户登录。
2、vncserver 的配置
su – oracle
vncserver (as oracle)
第一次启动还要修改登录密码,
#vncpasswd
启动后,再停止运行 vncserver
vncserver -kill :1
vi /home/oracle/.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
#startkde
#twm &
2、启动 VNCServer
然后使用系统启动脚本启动 VNCserver:
#vncserver (as oracle)
然后使用 netstat 查看是否监听了相应端口,每个终端监听 3 个端口
[oracle@113 ~]# netstat -an |grep tcp
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:654 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN
tcp 0 0 :::6001 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
改变防火墙策略,允许远程访问 VNC 服务器(TCP:5801,5901)
[root@localhost ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Kernel \r on an \m
[root@localhost ~]# rpm -qa|grep vnc
vnc-server-4.1.2-9.el5
vnc-4.1.2-9.el5
没有上面的软件包则安装之。
一、VNCServer 配置
1. vi /etc/sysconfig/vncservers (as root):
去掉最后两行注释并改为如下设置:
VNCSERVERS="2:oracle"
VNCSERVERARGS[2]="-geometry 800x600"
(或者VNCSERVERS="1:root"
VNCSERVERARGS[1]=默认原文 )
说明:
可以在这里添加个多用户,使用户能够使用 vnc 客户端连接 vnc 服务器,如:
VNCSERVERS="1:root 2:oracle"
VNCServer 的默认端口是 5801(http 连接),5901(桌面应用连接)和 6001,这
里的"1:root 2:oracle"表示为系统用户 root 开启 5801,5901 和 6001 端口,1
为桌面号或者终端号,为系统用户 oracle 开启 5802、5902 和 6002 端口,2 为
桌面号,依此类推。"1024x768"为屏幕分辨率。为了安全起见,不要在这里设置
root 用户登录。
2、vncserver 的配置
su – oracle
vncserver (as oracle)
第一次启动还要修改登录密码,
#vncpasswd
启动后,再停止运行 vncserver
vncserver -kill :1
vi /home/oracle/.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
#startkde
#twm &
2、启动 VNCServer
然后使用系统启动脚本启动 VNCserver:
#vncserver (as oracle)
然后使用 netstat 查看是否监听了相应端口,每个终端监听 3 个端口
[oracle@113 ~]# netstat -an |grep tcp
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:654 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN
tcp 0 0 :::6001 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 48 ::ffff:77.204.2.113:22 ::ffff:77.204.2.102:1979 ESTABLISHED
改变防火墙策略,允许远程访问 VNC 服务器(TCP:5801,5901)