ubuntu18远程桌面

18 篇文章 0 订阅
3 篇文章 0 订阅

内网远程桌面

MobaXterm(必备)

https://mobaxterm.mobatek.net/
推荐使用,牛逼软件
直接使用ssh登录,同时也可以远程桌面

XRDP(推荐)

刚装了Ubuntu 18.04,因新版的Ubuntu自带了屏幕共享的功能,故尝试打开setting–>sharing中的screen sharing,发现无法打开sharing.
原因:screen sharing实际是一个vnc-server,我在安装系统的时候选择的是minimal安装,可能功能没装全,可安装vino vnc server

sudo apt-get install vino
reboot

xrdp连接太多后,连接不上的解决方法
xrdp远程登录恢复上一次登陆会话

重要的事情说三遍:
退出远程桌面时请使用logout方式关闭远程桌面
退出远程桌面时请使用logout方式关闭远程桌面
退出远程桌面时请使用logout方式关闭远程桌面

成功案例
mate
xfce4


#安装系统时安装软件更新+update+upgrade+drivers

sudo apt update 
sudo apt install xrdp
#sudo systemctl enable xrdp

#Run the following command(二选一): 
echo mate-session> ~/.xsession   #mate远程桌面配置
echo xfce4-session> ~/.xsession   #xfce4远程桌面配置

#Run the following command(二选一): 
sudo apt-get install mate-core  #mate远程桌面图标
sudo apt-get install mate-desktop-environment mate-notification-daemon

sudo apt-get install xfce4 xfce4-terminal #xfce4远程桌面图标
sudo apt install tango-icon-theme

#Restart xRDP
sudo service xrdp restart

#Allow RDP traffic through UFW Firewall
sudo ufw allow 3389/tcp
#sudo /etc/init.d/xrdp restart
#sudo service xrdp restart   #stop/status
#sudo systemctl status xrdp 
#sudo systemctl restart xrdp   #start xrdp

#Reboot the Device
sudo reboot

#Test RDP by connecting through RDP
On Windows PC, use mstsc to connect to the ubuntu server

mate远程桌面
mate登录界面
xfce4远程桌面(个人推荐使用此方案:轻桌面,画面流畅)
在这里插入图片描述

重新启动ubuntu,不要登录!
在Windows上进行连接
打开windows的远程桌面连接,输入Ubuntu的IP地址,并点击连接。
点击连接之后会进入登录页面,选择Xorg,并填写在Sharing中设置的账户和密码,即可登录。

gnome远程桌面
参考ultralinux
参考csdn博客
参考脚本

sudo apt-get install xrdp 
#sudo apt-get install xorgxrdp-hwe-18.04 #早期18.04版本需要
#晚期18.04版本install xorgxrdp-hwe-18.04会导致xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-libinput卸载,需要重新安装
#sudo apt install xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-libinput


sudo systemctl status xrdp #check status

sudo systemctl enable xrdp
sudo ufw allow 3389/tcp # open up the port 3389
#sudo systemctl restart xrdp   #start xrdp
#sudo service xrdp restart   #stop/status
sudo systemctl restart xrdp # restart xrdp

sudo apt-get install gnome-tweaks
sudo apt install gnome-shell-extensions gnome-shell-extension-dash-to-panel # 可以美化成windos风格
# 该软件包使用Ubuntu 18.04重命名为gnome-tweaks,但它继续提供gnome-Tweak-tool作为过渡软件包。

# Run tweak, 必须如下配置,否则远程连接时会出现icon图标不正常现象(文件夹/文件都是blank white模式)
# Appearance -> Themes -> Applications ->  Ambiance
# Appearance -> Themes -> Cursor->  DMZ-White
# Appearance -> Themes -> Icons->  Humanity or Humanity-dark
# Extersions-> Ubuntu Dock -> On
# Extersions-> Dash to panel -> On
# Extensions -> User themes -> On
# Desktop ->Icons on desktop -> On   #解决显示右键terminal菜单

## option
## firefox登录 https://extensions.gnome.org/  安装相关插件
## -> Click here to install browser extension
## sudo apt install chrome-gnome-shell
## 刷新浏览器 -> User Themes

# 配置
echo gnome-session> ~/.xsession   #gnome远程桌面配置
#例如~/.xsession内容可以如下配置
#mate-session      #xfce4远程桌面配置
#xfce4-session     #mate远程桌面配置
gnome-session      #gnome远程桌面配置

sudo reboot
#6.Windows7 运行=>输入mstsc,输入ubuntu ip ,输入用户密码即可登录到ubuntu.

gnome远程桌面
在这里插入图片描述

参考:https://blog.csdn.net/zhayushui/article/details/94402844

登录界面反复弹出输入密码窗口解决办法:
参考:https://c-nergy.be/blog/?p=12073
解决问题的文件配置参考:http://c-nergy.be/blog/?p=12043
在这里插入图片描述
If the version of the PolKit is < 0.106,
在这里插入图片描述

#Save the file as /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
#内容如下
polkit.addRule(function(action, subject) {
if ((action.id == “org.freedesktop.color-manager.create-device” || action.id == “org.freedesktop.color-manager.create-profile” || action.id == “org.freedesktop.color-manager.delete-device” || action.id == “org.freedesktop.color-manager.delete-profile” || action.id == “org.freedesktop.color-manager.modify-device” || action.id == “org.freedesktop.color-manager.modify-profile”) && subject.isInGroup(“{group}”))
{
return polkit.Result.YES;
}
});

thinclient_drives问题
Xrdp creates a strange directory called thinclient_drives
In Ubuntu 18.04, Bionic Beaver, if you are using xrdp for remote access, you may notice a directory called “thinclient_drives” appearing in your home directory. In the permissions it may show a bunch of question marks, which looks scary.

There seems to be a bug in xrdp code which attempts to share drives, clipboard and other things. It is creating this directory and not mounting it correctly. Here is how to get rid of it.

Edit /etc/xrdp/xrdp.ini. Update the allow_channels setting to say allow_channels=false.

After saving the change, remove the spurious thinclient_drives directory. If the system will not allow you to remove it, first unmount it with
sudo umount $HOME/thinclient_drives

You will not be able to use shared drives, clipboard, and so on, but those do not seem to be working anyway.

解决方法

sudo umount $HOME/thinclient_drives
sudo rm -rf $HOME/thinclient_drives
sudo vim /etc/xrdp/xrdp.ini
#找到 allow_channels=true 修改成false即可
allow_channels=false

运行一段时间后,出现xrdp_mm_process_login_response: login failed
https://my.oschina.net/chaoshu/blog/677139

tweaks shell theme disabled问题
参考

VNC(推荐使用,操作简单,ubuntu18自带的screen share功能)

推荐参考
参考2:各种vnc方法

sudo apt update 
sudo apt install xrdp
#sudo systemctl enable xrdp
sudo service xrdp restart
sudo ufw allow 3389/tcp
#sudo /etc/init.d/xrdp restart
#sudo service xrdp restart   #stop/status
#sudo systemctl status xrdp 
#sudo systemctl restart xrdp   #start xrdp

#sudo apt-get install vino  #打开setting–>sharing, 如果没有screen sharing选项,需要先安装vino
sudo apt-get install dconf-editor
applications -> Sundry -> dconf Editor
#选择: org->gnome->desktop->remote access->require encrytion 关闭
# settings-> Sharing->Screen Sharing:设置:
# Allow connections to control the screen 打钩
# Require a password: 设置远程登录密码
# Screen Sharing: On
sudo reboot
#Windows 运行=>输入mstsc,输入ubuntu ip ,输入用户密码即可登录到ubuntu.

remote from windows

  1. vnc-any
  2. ip
  3. port: 5900
  4. password

remote from ubuntu18

https://www.howtogeek.com/429190/how-to-set-up-remote-desktop-on-ubuntu/
主要使用Remminan通过vnc协议进行远程访问

远程服务器配置如下:
Settings->Sharing->Screen Sharin:

  1. Off —> activate
  2. Require a Password
  3. Networks —> On

本地机:打开应用程序Remmina

#如果没有安装remmina,使用命令安装
sudo apt install remmina
  1. 选择VNC
  2. 填入远程服务器ip地址:xxx.xxx.xxx.xxx:0

xrdp远程桌面连接声音重定向

参考:https://c-nergy.be/blog/?p=12469

pulseaudio --version
sudo apt-get install xrdp-pulseaudio-installer
sudo xrdp-build-pulse-modules
cd /tmp
sudo apt source pulseaudio
cd /tmp/pulseaudio*
sudo ./configure
cd /usr/src/xrdp-pulseaudio-installer
sudo make PULSE_DIR="/tmp/pulseaudio-11.1"
sudo install -t "/var/lib/xrdp-pulseaudio-installer" -D -m 644 *.so

远程桌面声音设置
在这里插入图片描述
在这里插入图片描述

外网远程桌面

AnyDesk(免费)

windows

官网下载

ubuntu18

安装步骤参考

sudo apt update
sudo apt -y upgrade
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -
echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk-stable.list
sudo apt update
sudo apt install anydesk
anydesk

sudo anydesk-global-settings  #进行设置选项配置,建议设置自主访问密码

使用tweaks进行管理anydesk开机自启动

TeamViewer

 sudo apt-get install teamviewer   #安装
 teamviewer #启动
  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿尔发go

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值