connect to ubuntu 16.04 from windows 10 using x11vnc

本文介绍了如何通过x11vnc从Windows 10远程访问Ubuntu 16.04,并保持Unity桌面的原貌。内容包括设置VNC密码、配置开机启动、使用PuTTY创建SSH隧道以及在Windows上使用VNC Viewer进行连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

以前ubuntu上不但装过vnc,还配置成功过一次,但是登陆之后桌面会变成gnome一个奇奇怪怪的样子。所以这次重新搞。主要是通过x11vnc,使得远程访问能够完美还原unity桌面。

最近升级18.04,全gnome了,于是follow: http://c-nergy.be/blog/?p=11187 搞定了。

1. terminal:

sudo apt-get install x11vnc

2. set password:

sudo x11vnc --storepasswd /etc/x11vnc.pass

3. 对14.04及以下的ubuntu可以这样设置开机启动,而不是登陆ubuntu后才启动

sudo vi /etc/init/x11vnc.conf

content (4 lines):

start on login-session-start
script
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
end script

reboot the computer to start the service. 

但是对于用systemd而不是init的ubuntu15.04我还没有尝试成功,所以就每次执行下一个步骤。

4. I want to check it by now, so I just use this command:

sudo /usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log

5. 为了更安全的连接ubuntu, following the instruction of this. 但是最后几步不可以仿照,所以我只把需要仿照的步骤列一下

- 5.1 download the normal stand-alone version of PuTTY

- 5.2 Under “Host Name”, enter the IP address or host name of the computer you want to connect to and the port that the SSH server is on (22 by default). 

- 5.3 Then go to the “Connection>SSH>Tunnels” category. You need to create a tunnel from port 5900 to 127.0.0.1:5900. You can then save these settings back on the main screen so you don’t have to configure PuTTY every time. Click open and log in.

6. 接下来在windows下载vncviewer,建立一个连接,地址写:127.0.0.1::5900 搞定。

 

参考:https://blog.youkuaiyun.com/lijiecong/article/details/50750879

http://seb.so/vnc-from-boot-without-logging-in-ubuntu-lubuntu-xubuntu-and-mint-lmde/

http://tombuntu.com/index.php/2007/06/27/remote-access-from-windows-x11vnc/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值