安装远程桌面,VNC Server on FreeBSD + VNC Viewer on Windows !

王朝system·作者佚名  2006-01-10
宽屏版  字体: |||超大  

一直都在思考*NIX下面如何远程桌面,发现VNC实在是一个很好的东东,在*NIX平台上的性能表现远超过于

Windows平台上面!

下面就以FreeBSD为例子来说明如何建立Remote Desktop:

1) FreeBSD + X-Window(xorg) + Gnome Desktop + VNCServer

2) Windows + RealVNC Viewer Free Edition

安装FreeBSD, xorg, Gnome不作过多叙述了,直入主题!

FreeBSD# cd /usr/ports/net/vnc

FreeBSD# make

FreeBSD# make install

FreeBSD# make clean distclean

完成后,可以用which vncserver查看路径为:/usr/local/bin/vncserver

在自己的home目录下面新建一个目录:

[xport@FreeBSD ~] $ mkdir .vnc

[xport@FreeBSD ~] $ cd .vnc

[xport@FreeBSD ~/.vnc] $

启动vncserver,第一次启动会为你的session设定密码:

[xport@FreeBSD ~/.vnc] $ vncserver

You will require a password to access your desktops.

Password:<--输入密码

Verify: <--确认密码

xauth: creating new authority file /home/xport/.Xauthority

New 'X' desktop is undef.unixathome.org:1

Creating default startup script /home/xport/.vnc/xstartup <--这个文件很重要,接下来会修改它!

Starting applications specified in /home/xport/.vnc/xstartup

Log file is /home/dan/.vnc/xport.localdomain:1.log

如果要关闭vncserver,用下面的方法:

[xport@FreeBSD ~/.vnc] $ vncserver -kill :1

[xport@FreeBSD ~/.vnc] $ ls -al

total 16

-rw-r--r-- 1 xport users 10382 Oct 11 23:20 FreeBSD.localdomain:1.log

-rw------- 1 xport users 8 Oct 11 23:09 passwd

-rwxr-xr-x 1 xport users 184 Oct 11 23:11 xstartup

接下来修改xstartup:

[xport@FreeBSD ~/.vnc] vi xstartup

# 修改成下面的内容

#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

# 下面的2行是vncserver第一次启动的时候产生的,为了使用Gnome,我把它们给

# 注释掉了

# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

# twm &

gnome-session & <--这个是我增加的,不要忘了后面的&

好了,再次启动vncserver吧!

[xport@FreeBSD ~/.vnc] $ vncserver

New 'FreeBSD.localdomain:1 (xport)' desktop is FreeBSD.localdomain:1

Starting applications specified in /home/xport/.vnc/xstartup

Log file is /home/xport/.vnc/FreeBSD.localdomain:1.log

[xport@FreeBSD ~/.vnc] $

好现在我们从Windows下面连接FreeBSD:

输入密码:

进入Gnome,我启动了Eclipse IDE:

哈哈,感觉这样运行比较爽!

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有