最近经常使用linux的xwindows,发现xdmcp和系统有很大关系,不如vnc好用。
yum groupinstall Desktop
yum install gnome-core xfce4 firefox
yum install tigervnc-server
chkconfig vncserver on
useradd srijan
su - srijan
vncpasswd
ls /home/srijan/.vnc
会有passwd文件
设置Xstarup Resolution
vi /etc/sysconfig/vncservers
添加
VNCSERVERS="1:srijan"
VNCSERVERARGS[1]="-geometry 1024x768"
5901 & 1024x768 resolution for the VNC client
从2向后递增,
## Multiple Users ##
VNCSERVERS="2:ravi 3:navin 4:avishek"
VNCSERVERARGS[2]="-geometry 1280x1024"
VNCSERVERARGS[3]="-geometry 1280x1024"
VNCSERVERARGS[4]="-geometry 1280x1024"
By Default VNC runs on Port 5900 and ID:0 (which is for root user). In our scenario I’ve created tecmint, ravi, navin and avishek. So, the ports and id’s are used by these users as follows
User's Port's ID's
5900 root :0
5901 srijan :1
5902 ravi :2
5903 navin :3
5904 avishek :4
VNC给浏览器的端口是5800+N,给vncviewer的端口是5900+N,N是设置的display号。
service vncserver restart
检查服务器端VNC Server是否正常运行中:
执行:ps -ef|grep vnc
打开防火墙
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
多用户
iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp -m multiport --dports 5902:5904 -j ACCEPT
service iptables save
service iptables restart
/etc/X11/xorg.conf 设置屏幕分辨率
查看/root/.vnc/下的log日志,有没有报错;有可能是xstartup权限不够。“chmod xstartup 777”更改下权限,重启后再进。
阅读(2027) | 评论(0) | 转发(0) |