一、Ubuntu16.04安装x11VNC远程桌面

2017年06月04日 11:44:39 小林书店副编集 阅读数 9249

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/songbaiyao/article/details/72858087

1. 安装x11vnc

sudo apt-get install x11vnc

2. 设置密码

x11vnc -storepasswd

3. 修改配置文件

sudo vim /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/<USERNAME>/.vnc/passwd -rfbport 5900 -shared[Install]
WantedBy=multi-user.target
  • 4.启动服务
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo systemctl start x11vnc.service

附录:Ubuntu使能桌面共享服务

# 允许桌面共享   sudo vino-preferences

二、Windows远程桌面连接ubuntu

https://askubuntu.com/questions/592537/can-i-access-ubuntu-from-windows-remotely/592544#592544

Yes, you can access Ubuntu from Windows remotely.

Taken from this article.

Follow these steps :

Step 1 – Install xRDP

Open Terminal (Crtl+Alt+T) and execute the following commands:

sudo apt-get update
sudo apt-get install xrdp

Step 2 – Install XFCE4 ( Unity doesn't seem to support xRDP in Ubuntu 14.04; although, in Ubuntu 12.04 it was supported ). That's why we install Xfce4.

sudo apt-get install xfce4

Step 3 – Configure xRDP

In this step, we modify two files to make sure xRDP uses Xfce4. First we need to create, or edit, our .xsession file in our home directory. We can either use nano or simply redirect an echo statement (easier):

echo xfce4-session > ~/.xsession

The second file we need to edit is the startup file for xRDP, so it will start Xfce4.

sudo nano /etc/xrdp/startwm.sh

The content should look like this (pay attention to the last line and ignore . /etc/X11/Xsession):

#!/bin/shif [ -r /etc/default/locale ]; then. /etc/default/localeexport LANG LANGUAGE
fistartxfce4
#. /etc/X11/Xsession

对于Ubuntu 16.04使用默认的“/etc/X11/Xsession”可以正常工作。

#!/bin/shif [ -r /etc/default/locale ]; then. /etc/default/localeexport LANG LANGUAGE
fi#startxfce4
. /etc/X11/Xsession

Step 4 – Restart xRDP

To make all these changes effective, restart xRDP as such:

sudo service xrdp restart

Testing your xRDP connection

On the computer that will remotely control your Ubuntu machine, start you RDP client. Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories). Or Search 'remote' in start (Windows 7) Or 'remote' in search box in Windows 8.

Whichever client you use, most will work with either the computer network name or IP address of your Ubuntu machine.

To find the IP address on your Ubuntu box, type:

hostname -I

(note: this is a capital “i”)

Enter IP address of your Ubuntu machine. For example:

Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen. Here we enter our Ubuntu username and password and click “OK”

You are done,enjoy

PS: There are some good points mentioned in comments, so I thought to sum them up.

  • If you want to access Ubuntu from outside network, you'll need your Ubuntu at work to have it's own, proper, internet IP address - a fairly unlikely scenario. To work it otherwise, you need the externally visible address of work, AND have port forwarding set to direct incoming RDP requests to your work computer on the router. (Mark Williams)

  • To use the Ubuntu MATE desktop meta-session, replace last line startxfce4 in startwm.shwith mate-session. (Frank N)

  • You can use your actual machine name (by typing hostname) rather than your IP as it might be more stable on dynamic IPs in future sessions. (Frank N)

附录:MobaXterm

http://mobaxterm.mobatek.net/

Freeware implementation the X server on windows.

No need to install anything on Ubuntu.

After you connect, you start out with a shell.

Then, if you start a program from the shell, e.g.:

xeyes

xeyes opens as a separate native Windows window.

It just worked out of the box between Windows 10 and Ubuntu 16.04 through a VPN.

三、ubuntu远程桌面

2017年10月30日 00:09:29 IceBear6 阅读数 15004

(一)

可视化界面远程访问Linux服务器(这里以Ubuntu为例),最常见的是通过xrdp和vnc这两种远程桌面协议来进行可视化远程操作。
1.关于xrdp协议和vnc协议之间区别
参考自:http://www.linuxidc.com/Linux/2017-09/147112.htm
1)xrdp协议
  rdp有两种,remote,remotefx
  适用系统:windows、linux
  网络流量:较小,正常使用100-200k左右
  适用场景:由于在色彩、音频、usb及本地磁盘映射方面较好,非常适用于虚拟桌面
2)vnc协议
  适用系统:windows、linux
  网络流量:较小,常用100k左右
  适用场景:主要用于linux的服务器的管理,由于无声音和usb传输,不满足于虚拟桌面的使用
备注:vnc是大部分Linux发行版默认的基于RFB协议的远程桌面程序,但对于普通用户来说,vnc的用户体验并不好,比较慢,还需要安装客户端。个人推荐使用xrdp,并且Windows的远程桌面也是基于RDP协议,兼容性也很好。并且vnc只支持一个桌面,xrdp可以支持多个桌面,所有如果存在多人同时连接Linux的话,xrdp完全是可以支持的,vnc则不行。
2. Windows通过远程桌面访问Ubuntu
参考自:http://www.cnblogs.com/findumars/p/5410914.html
               http://blog.csdn.net/qq_21057881/article/details/71976586
Ubuntu端
1)安装所需软件包

 
  1. sudo apt-get install xrdp

  2. sudo apt-get install vnc4server tightvncserver

2)配置
系统-》首选项-》桌面共享进行如下设置。
    允许其他人查看您的桌面
    允许其他用户控制您的桌面
    要求远程用户输入此密码
    显示通知区域图标:只有在其他人链接时

3)安装dconf-editor取消权限限制

sudo apt-get install dconf-editor

搜dconf系统配置编辑器,在设置里修改org下的gnome下的desktop下的remote-access,取消“requlre-encryption”即可
4)执行以下命令(该命令的作用是buntu12.04中同时存在多个桌面管理器,指定一个启动,不然即使远程登录验证成功以后,也只是背景,其他什么也没有)

 
  1. cd /home/badmushroom  (badmushroom是用户名)

  2. echo"Unity" > .xsession  (在.xsession中写入Unity)

重启服务

sudo service xrdp restart

5)

sudo gedit/etc/xrdp/startwm.sh

在 . /etc/X11/Xsession 一行前面插入一行:

echo"Unity" > .xsession

重启服务

sudo service xrdp restart

(这段操作是远程桌面必须要的,如果没有这个操作,就会出现用 windows的mstsc连接ubuntu 的 xrdp 时,仅显示墙纸。但是我自己尝试没有这种情况)
Windows端
Windows端可以通过两种方式访问:
1)Windows自带的远程桌面(Xvnc),这个很简单
说明:
从Ubuntu13.10开始,据说是由于由于xrdp、gnome和unity之间的兼容性问题,在Ubuntu中无法使用xrdp登陆gnome或unity的远程桌面,现象是登录后只有黑白点为背景,无图标也无法操作。
解决办法是:使用xrdp登录xfce的远程桌面,或者也可以使用xrdp登录Mate的远程桌面。

输入在Ubuntu系统的用户名和密码(Ubuntu端系统的用户名和密码)

2)使用window自带的远程桌面,也可以使用VNCViewer,(VNC-any)

这个地方选择Ubuntu端机器的IP,密码则输入在Ubuntu端远程桌面设置时,允许访问的访问密码

1)通过xvnc方式访问远程桌面式时,其实相当于Windows端在Ubuntu机器上新登录一个用户桌面;Ubuntu端是看不到电脑桌面上有什么变化和操作的,而且这种方式,Widows端用户访问速度很快,延迟时间很短,几乎感觉不出来。

2)通过vnc-any方式访问远程桌面时,用户在Windows端的操作同步到ubuntu端,ubuntu端桌面实时看到Windinws端用户的操作。相当于QQ的远程控制桌面。

(二)

参考 https://www.cnblogs.com/xuliangxing/p/7642650.html

1.设置Ubuntu 16.04 允许进行远程控制

设置Ubuntu的远程控制,将其设置为允许被远程连接。

系统-》首选项-》桌面共享,或者直接搜索桌面共享,如图:

允许其他人查看您的桌面
    允许其他用户控制您的桌面
    要求远程用户输入此密码
    显示通知区域图标:只有在其他人链接时

2.安装vncserver

终端输入以下命令:

sudo apt-get install xrdp vnc4server xbase-clients

3.安装dconf-editor(取消权限限制)

需要取消掉请求加密的功能,否则无法远程上。这时需要安装dconf-editor工具进行配置。

输入以下命令:

sudo apt-get install dconf-editor

4.远程连接Ubuntu 16.04

1)通过VNC Viewer客户端进行访问

到VNC官网下载最新的版本的VNC Viewer。

输入远程控制的主机的IP和第一步设置的密码即可连接成功。

2)通过Windows自带远程桌面控制(mstsc)进行访问(推荐)。

可以直接使用Windows自带的远程桌面控制工具进行远程访问,这样就可以不用安装VNC Viewer。

打开自带远程桌面控制,输入目标PC的IP地址,点击连接。

然后选择vnc-any模式,输入IP地址和密码进行登录(其中端口号默认为5900,保持不变),即可连接。

ubuntu远程桌面及VNC相关推荐

  1. 烂泥:学习ubuntu远程桌面(一):配置远程桌面

    本文首发于烂泥行天下 公司服务器目前安装的都是ubuntu 14.04系统,而且由于业务需要,需要使用到ubuntu的远程桌面功能.所以本篇文章都是围绕ubuntu的远程桌面来介绍. 一.远程桌面连接 ...

  2. Windows远程桌面(xrdp+vnc)连接Ubu…

    Windows远程桌面(xrdp+vnc)连接Ubuntu 分类: linux 2011-11-25 16:55 38人阅读 评论(0) 收藏 举报 Ubuntu自带了一个远程桌面,使用的是vpn模式 ...

  3. ubuntu远程桌面win10,ubuntu远程桌面ubuntu(亲测有效)

    想要知道怎么远程的,首先得要了解两种远程桌面协议(如果不想了解的,可以直接跳过第一节). 一.远程桌面协议 目前主流的实现远程桌面连接的有两种协议:远程帧缓存协议(RFB:Remote Frame B ...

  4. Ubuntu远程桌面修改

    Ubuntu远程桌面修改 问题 解决办法之一 ubuntu中的远程桌面组成 那么如何切换呢? 总结 问题 xfce属于轻量级的远程桌面.但是在使用的过程中,一段时间未使用后,之前在里面启动的进程都被杀 ...

  5. Ubuntu 远程桌面配置

    Ubuntu 远程桌面配置 远程端配置 这里的远程端指的是服务端,也就是被远程访问的那一端 安装xrdp(用于协议支持) sudo apt-get install xrdp 安装xface4(用户界面 ...

  6. ubuntu远程桌面连接windows

    ubuntu远程桌面连接windows 1:使用ubuntu自带软件remmina 2:打开该软件后,点击长方形 3: 服务器:windows电脑内网ip 用户名:电脑用户名 密码:电脑用户名的登陆密 ...

  7. Windows如何通过VNC访问Ubuntu远程桌面?

    前言:我们都知道Window系统之间如何远程桌面连接,那么Windows如何远程桌面连接访问Linux系统如Ubuntu的桌面呢?下文将讲述这一问题. (一)Ubuntu系统中打开Setting,点击 ...

  8. ubuntu 远程桌面及Qt安装

    环境: ubunut14 x64 目标:通过vnc远程桌面,在ubuntu 上编写qt程序 1.安装远程桌面 apt-get install xrdp vnc4server xbase-clients ...

  9. [转]Ubuntu远程桌面登陆

    原文地址:http://www.cnblogs.com/xdzone/archive/2011/03/10/1979644.html 1.xp下默认的远程桌面协议是rdp,默认端口3389,而ubun ...

最新文章

  1. etcd 启动分析_grpc-go基于etcd实现服务发现机制
  2. Bzoj4817:[SDOI2017]树点涂色
  3. boost::tuple用法的测试程序
  4. LeetCode MySQL 1661. 每台机器的进程平均运行时间
  5. oracle字段去重查询,oracle怎么去重查询
  6. 【OFDM通信】基于matlab OFDM通信系统仿真【含Matlab源码 315期】
  7. Bootstrap视频教程百度云盘免费下载地址-CSDN免费下载
  8. 【QT学习之路】QThread的简单使用
  9. 计算机组成原理课程设计
  10. 联想集团杨元庆:联想携手SAP解决用户云计算应用痛点
  11. 麟龙指标通达信指标公式源码_通达信仿麟龙决策曲线指标公式(选股公式/源码)...
  12. 动态链表头插法 和 动态尾插法
  13. 点桌面计算机一直在加载,Win7系统在桌面点右键一直转圈的解决方法
  14. Stream流、方法引用知识梳理
  15. CTF线下赛AWD总结
  16. 牛客_求将一个数组分割为两个差值最小的部分
  17. 华为云FusionInsight MRS容灾:大数据两地三中心的容灾也可以如此省心
  18. postgresql 遍历参数_《go语言从入门到入坟》json操作、文件操作
  19. 猫眼5万条评论告诉你《飞驰人生》值不值得看?!
  20. Dart中类的静态方法,继承,重写父类方法

热门文章

  1. 站长必装软件之火孤插件
  2. 翻译软件中输入安卓很卡顿 或 苹果很卡顿 结果很强!!!
  3. c语言删除字符常数组的某一个元素,C语言实现删除数组中某个元素
  4. IDEA几个设置:设置空格显示成小点、显示行数、 Ctrl + 鼠标滚轮 快捷键来控制代码字体大小显示、护眼背景色
  5. 工厂模式:优雅地生成多种类型对象
  6. 怎么给锋云服务器打无线网卡驱动,高手教你怎么安装和使用usb无线网卡
  7. AMIS:这是让前端失业的一个框架
  8. 用html和css做一个旋转的正方体
  9. 本地搭建svn服务器-VirtualSVN server
  10. 【JAVASE】NIO