Fri 13 Apr 2007
虽然大部分情况下我们只要用ssh登录linux服务器就好了,但是有时候我们的程序需要在图形界面下运行,这时我们就要用到vnc server这个软件了。在Debian下安装vnc server很简单的,只要几步就可以了:
1. 安装软件
apt-get install tightvncserver tightvnc-java
2. 配置每个用户自己的vnc server。
启动命令:
vncserver -depth 24 -name aru_desktop -httpport 9001 -geometry 1024×768 :1
参数解释:
1. -depth 24 使用24位颜色,这里一般用16或者24
2. -name aru_desktop 桌面名字,这个参数并非必要,可以随便起个喜欢的名字
3. -httpport 9001 使用浏览器连接的端口,请用1024以上的端口,如果是多个用户都开vnc server,那每个用户要使用不同的端口
4. -geometry 1024×768 桌面分辨率,根据要求调整
5. :1 会话数字,同3
第一次运行会要求你输入一个密码,这个密码和你的ssh登录密码是分开的,当然你也可以用同样的密码
关闭命令:
vncserver -kill :1
:1 是会话数字,和启动的会话数字一致
3. 输入法和桌面环境
每个用户的vnc server启动脚本是 ~/.vnc/xstartup
下面是我的启动脚本:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
#gnome-session &
xfce4-session &
scim -d
里面有3个窗口管理服务器:
#x-window-manager &
#gnome-session &
xfce4-session &
最上面两个是被注释掉的,选择自己喜欢的窗口管理就好了,将其余的窗口管理器注释掉。
scim -d
打开scim输入法.
4. 连接vnc server
打开vnc server后,可以通过http方式或者用专用客户端连接
http方式,在浏览器输入 http://ip:9001/
专用客户端,在地址输入 ip:1
飞天的梦想 is proudly powered by
January 9th, 2008 at 9:27 pm
[…] http://blog.csdn.net/Mariachi/archive/2007/07/30/1716253.aspx 字體太小問題 ko ! 參考 : http://hiei.yeax.com/archives_156.html <<可用 合 http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:VNC&variant=zh-tw […]