您的位置:首页 > 其它

Windows通过vnc4server+xfce4远程连接Ubuntu桌面

2017-12-19 20:39 633 查看
配置环境:Win 10 + Ubuntu 14.04

一、Ubuntu端配置

1. 安装vnc4server

sudo apt-get install vnc4server


2. 设置vnc4passwd

vnc4passwd


在~/.vnc目录下生成passwd文件

3. 开启一个桌面

vnc4server -geometry 1920x1080 :1


其中,1表示桌面号,-geometry可以指定分辨率。

检查是否启动成功:在~/.vnc目录下查看是否有*:1.pid及*:1.log生成。

4. 关闭一个桌面

如果需要关闭某个桌面号,采用如下命令:

vnc4seerver -kill :1


5. 安装xfce4系统桌面:

sudo apt-get install xfce4
6. 修改~/.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 &
sesion-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &


二、Windows端配置
下载vnc viewer客户端(https://www.realvnc.com/en/connect/download/viewer/windows/

安装成功后,在菜单栏点击【file】->【new connection】

其中VNC Server填:ip:桌面号(ip为linux主机的ip,桌面号为上文中开启桌面时冒号后面的数字)。

注意:采用vnc远程桌面连接,当linux重启后,需要重新开启桌面号。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu windows vnc