现在的位置: 首页 > 综合 > 正文

win7系统远程桌面链接linux系统

2018年03月20日 ⁄ 综合 ⁄ 共 1933字 ⁄ 字号 评论关闭

windows系统一般自带了远程桌面链接工具(开始-附件-远程桌面链接)用于远程桌面windows系统,但是如果亲们想要远程桌面linux系统此工具就失效了。

最近有由于工作需求,搭建了win7远程桌面ubuntu的环境,特此分享。

host端系统配置:win7,32bit

server端系统配置:ubuntu10.04.4 LTS

远程桌面工具:VNC

一、在ubuntu中配置VNC server

1.安装vnc4server

两种方法:

命令行: sudo apt-get install vnc4server

图形界面:在System -> Administration -> Synaptic Package Manager中安装

$ sudo apt-get install vnc4server

 

2.设置vnc4passwd

$ vnc4passwd

在$HOME/.vnc目录下面生成一个passwd文件。

 $HOME/.vnc是一个vnc4server的关键目录。

隐藏目录,需要show hide files

 

3.启动vnc4server

$ vnc4server

在./vnc目录下生成下列文件:

###-desktop:1.log

###-desktop:1.pid

xstartup

desktop的名称在客户端连接的时候用到。

如果是desktop:1,在客户端连接的时候就填写:ip:1;

如果是Desktop 2,在客户端的时候填写:ip:2....

首次运行vnc4server会提示生成了xstartup文件,这个文件里面包含着登录启动X时的一些配置。

 

4.重启vnc4server

$ vnc4server -kill :1
$vnc4server

注意:“-kill”和“:1”之间有空格

 

5.额外的重要配置

网上查到资料从UltraVNC登录,可能得到一个比较简单的窗口,因为VNC4Server缺省启动的WM是twm,如果希望启动gnome,需要改动.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 & 
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"& 
x-window-manager & 
复制代码

修改后:

复制代码
#!/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 & 
# x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"& 
# x-window-manager & 
复制代码

这两篇blog不错,特此引用:

http://blog.csdn.net/huaciom/article/details/6198414

http://blog.csdn.net/fisher_jiang/article/details/4192482

 

6.多客户端配置

只需多次运行vnc4server,产生多个desktop id可供多个客户端使用

 

7.vnc4server设置成开机自启动

在etc/profile里面加入vnc4server命令

 参考http://wenku.baidu.com/view/56f7b05f804d2b160b4ec0da.html

二、在win7中配置VNC Client

1.下载UltraVNC并安装

链接地址:http://www.uvnc.com/component/jdownloads/summary/4/44.html

 

2.填入ubuntu的ip地址及你想使用的desktop pid,如图,点击connect

在弹出的输入密码框中输入vnc4passwd中设置的密码,即可登录,远程桌面之旅就此开始

有个问题:有些应用程序无法同时被使用

抱歉!评论已关闭.