Windows通过VNC连接并显示Linux桌面(Ubuntu16.04)
vvull 人气:0
> 用的是阿里云轻量应用服务器,由于远程连接(阿里云自带、putty都不能显示出来),采取VNC连接。
[toc]
# Linux中安装VNC服务
1. `sudo apt-get update`
2. `sudo apt-get install vnc4server`
3. `vncserver`
4. 输入的时候控制台上不会有任何显示,但实际上是输入了
![](https://img2020.cnblogs.com/blog/1635494/202003/1635494-20200318161741363-18355803.png)
5. `sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal`
6. `vim ~/.vnc/xstartup`
7. 按i进入编辑模式,清空内容,修改为
```
#!/bin/sh
#Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
```
按ESC-->输入`:wq`回车
> ESC退出编辑,:wq保存。
# Linux中安装桌面环境
1. `sudo apt-get install x-window-system-core`
2. `sudo apt-get install gdm`
3. `sudo apt-get install ubuntu-desktop`
4. 选择gdm3
![](https://img2020.cnblogs.com/blog/1635494/202003/1635494-20200318162317580-996561129.png)
5. 重启服务器
# Windows中安装VNC Viewer
1. 下载[VNC Viewer](https://www.realvnc.com/en/connecthttps://img.qb5200.com/download-x/download/viewer/)
2. 连接Linux服务器`ip:5901`
![](https://img2020.cnblogs.com/blog/1635494/202003/1635494-20200318162649892-1013402124.png)
3. 输入密码(在Linux中VNC服务设置的密码)
> [参考](https://blog.csdn.net/qq_28284093/articlehttps://img.qb5200.com/download-x/details/80166614)
加载全部内容