搜集网上资料,整理适合自己情况,主要是为了远程等服务器跑cadence。
1. 检查vnc客户端和服务器是否已经安装在你的系统中:
[user@centos ~]$ rpm -q vnc vnc-server
package vnc is not installed
vnc-server-4.0-11
[root@ics-pc ~]# cat /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/vnc/sshvnc.html>.VNCSERVERS="1:username"
VNCSERVERARGS[1]="-geometry 800x600 -alwaysshared -depth 24"
[root@ics-pc ~]# 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" &
gnome-session & #set starting GNOME desktop
#startkde & #kde desktop
#twm & #Text interface
c.
重启VNC即可。
5、客户端登陆
- 用vnc客户端(viewer)登陆:
[centospub@localhost ~]$ vncserver
New 'localhost.localdomain:7 (centospub)' desktop is localhost.localdomain:7
Starting applications specified in /home/centospub/.vnc/xstartup
Log file is /home/centospub/.vnc/localhost.localdomain:7.log
- 用浏览器登陆:
设置vncserver启动变量:
为了使vncserver在每次启动时保持不变的端口号(5801或1)
在/etc/rc.d/rc.local文件中添加命令:
rm -f /tmp/.X11-unix/X*
rm -f /.vnc/*.pid
rm -f /.vnc/*.log
这样,每次启机,系统会先把上次非正常关机时留下的临时文件删除。
附注:
2007-10-12 15:40
今天在服务器上装了 ic5141,配置好环境变量后运行提示:
*ERROR* Failed to find either 24-bit TrueColor or 8-bit PseudoColor Visual .
*WARNING* Failed to find eiher 24-bit TrueColor or 8-bit PseudoColor Visual.在vnc上设置显示模式示果
之后更改vnc设置文件(/usr/bin/vncserver)中depth参数,由$depth = 16;改为$depth=24;
运行后正常。
我自己用的并未成功。直到用了文章中2-a的设置才可以跑cadence。
Useful Links:
庖丁解牛lagvin 写得心得
这个里边有很多技巧问答。
0 评论:
发表评论