Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of opening vnc remote Desktop with ubuntu

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Concept

Ubuntu is an open source GNU/Linux operating system based on desktop applications. Ubuntu is based on Debian GNU/Linux, supports x86, amd64 (x64) and ppc architecture, and is built by a global professional development team (Canonical Ltd).

VNC (Virtual Network Computer) is the abbreviation of virtual network computer. It is a remote control tool software developed by Olivetti & Oracle laboratory, which was merged into AT&T in 1999. Through the network, VNC can transmit keyboard and mouse movements and real-time screen pictures. In Linux, VNC includes the following four commands: vncserver,vncviewer,vncpasswd and vncconnect. In most cases, users only need two of these commands: vncserver and vncviewer.

Demand:

There is a ubuntu 19.10 with a graphical interface installed. Now you need to turn on vnc remote Desktop.

Analysis:

Because of the customized gnome desktop system that comes with ubuntu desktop, vnc4server and tightvncserver cannot be used directly under this desktop system.

In fact, Ubuntu Desktop has a desktop sharing feature, which needs to be installed separately if the installation is minimized.

Ubuntu desktop sharing uses vino.

Ubuntu desktop sharing uses vino.

Ubuntu desktop sharing uses vino.

Do not use vnc4server and tightvncserver in ubuntu's default gnome environment, use vino.

Resolve:

1. Open ssh and allow root password to log in

Apt install openssh-server ssh

Vi / etc/ssh/sshd_config

UsePAM yes

PermitRootLogin yes

PasswordAuthentication yes

# modify the above configuration

Systemctl enable ssh & & systemctl restart ssh

# you can log in to ssh with your root password at this time

two。 Turn on screen sharing

Open Settings-- > Screen Sharing-- > activate and set the password

# if there is no Screen Sharing option, vino may not be installed. Try apt install vino installation

# after activation, use netstat-tulp | grep 59 to see if the port listens to 590X

# if normal, you can try to connect with vnc, and a "no security type suitable for RFB3.3" error may occur. The third step is to solve this problem.

3. Turn off encryption

Gsettings set org.gnome.Vino require-encryption false

# disable encryption, and vnc can connect normally

4. Enable users to automatically log in to the desktop

Vino must be logged in before it can be started, so configure the user to log in automatically to the desktop environment

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

[Seat:*]

User-session=ubuntu

Greeter-show-manual-login=true

Allow-guest=false

# allow root to log in to desktop environment

Autologin-user=root

# users who log in automatically

Vi / etc/pam.d/gdm-autologin

# auth required pam_succeed_if.so user! = root quiet_success

# comment this line

Vi / etc/pam.d/gdm-password

# auth required pam_succeed_if.so user! = root quiet_success

# comment this line

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

# configure automatic login

Vi / root/.profile

# mesg n | | true

Tty-s & & mesg n | | true

# modify the behavior tty of mesg

5. Modify screen sharing port

The default is 5900, but due to business needs, it will be changed to 5901

Apt-get install dconf-editor

# install dconf-editor

Log in to the graphical interface, execute dconf-editor, select / org/gnome/desktop/remote-access/alternative-port to turn off the default value, and manually change it to 5901

Some data say that it is necessary to re-Again Right Click on alternative_port and click on Set as Default (this is important), but in the actual test, this step will be reduced to 5900. It is not clear whether it is necessary.

Then open use-alternative-port, which is very important.

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

Netstat checks whether the port has been modified and can log in with the new port.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report