ubuntu19.10desktop配置远程vnc-创新互联

需求:
有一台ubuntu 19.10,已安装图形界面,现需开启vnc远程桌面。
分析:
由于ubuntu desktop 自带的定制了的gnome桌面系统,在该桌面系统下vnc4server和tightvncserver等均不可直接使用。
实际上Ubuntu Desktop是有桌面共享功能的,如果是最小化安装就需要单独安装它。
Ubuntu桌面共享使用的是vino。
Ubuntu桌面共享使用的是vino。
Ubuntu桌面共享使用的是vino。
在ubuntu默认的gnome环境下不要使用vnc4server和tightvncserver,使用vino。

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:主机域名雅安服务器托管、营销软件、网站建设、古雷港网站维护、网站推广。

解决:

1。开启ssh,并允许root密码登录

apt install openssh-server ssh

vi /etc/ssh/sshd_config

UsePAM yes

PermitRootLogin yes

PasswordAuthentication yes

#修改以上配置

systemctl enable ssh && systemctl restart ssh

#此时可以用root 密码登录ssh

2。开启屏幕共享

打开Settings --> Screen Sharing -->激活并设置密码

ubuntu 19.10 desktop 配置远程vnc

#如果没有Screen Sharing选项,可能是vino没有安装,尝试apt install vino 安装

#激活后,用netstat -tulp | grep 59,查看端口是否监听590X

#如果正常,可以尝试用vnc连接,可能会出现“no security type suitable for RFB3.3”的错误。第3步就是解决这个问题。

3。关闭加密

gsettings set org.gnome.Vino require-encryption false

#关闭加密,此时vnc能正常连接

4。开启用户自动登录桌面

vino必须登录后才能启动,所以还要配置用户自动登录桌面环境

vi /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

[Seat:*]
user-session=ubuntu
greeter-show-manual-login=true
allow-guest=false

#允许root登录桌面环境

Autologin-user=root

#自动登录的用户

vi /etc/pam.d/gdm-autologin

#auth   required        pam_succeed_if.so user != root quiet_success

#注释此行

vi /etc/pam.d/gdm-password

#auth   required        pam_succeed_if.so user != root quiet_success

#注释此行

vi /etc/gdm3/custom.conf

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
# Enabling automatic login
AutomaticLoginEnable = true
AutomaticLogin = root

#配置自动登录

vi /root/.profile

#mesg n || true
tty -s && mesg n || true

#修改mesg这行为tty

5。重启测试

6。修改屏幕共享端口

默认是5900,但由于业务需要,改成5901

apt-get install dconf-editor

#安装dconf-editor

登录图形界面,执行dconf-editor,依次选择/org/gnome/desktop/remote-access/alternative-port 关闭默认值,手动修改为5901;

有资料说要再Again Right Click on     alternative_port and click on Set as Default (this is important),但实际测试时这步会还原成5900,不清楚是否必要。

然后打开use-alternative-port,这步很重要。

参考:https://ubuntuforums.org/showthread.php?t=1297290

netstat 检查端口是否修改,就可以用新端口登录。

本文标题:ubuntu19.10desktop配置远程vnc-创新互联
本文链接:https://www.cdcxhl.com/article12/csiogc.html

成都网站建设公司_创新互联,为您提供商城网站网站营销网站设计公司网站内链动态网站Google

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站制作