Steps to set up a VNC server on CentOS 8.3

../

After updating to CentOS8.3, vncserver wasn't working with the traditional procedure. When I run vncserver, I just get the following message: Please read HOWTO.md.

$ vncserver :1
vncserver has been replaced by a systemd unit.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.

Apparently/usr/bin/vncserver is obsolete. The procedure for the new setup is as follows. Eliminates the hassle of manually editing service definitions and killing pre-existing processes.

First, as root, do the following only once.

$ su -
$ echo "session=gnome" >> /etc/tigervnc/vncserver-config-defaults
$ restorecon /usr/sbin/vncsession /usr/libexec/vncsession-start
$ cp -p /usr/lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service

The user and display number to use are described in the following file. In the example below, the user taconana has a display number of 1.

$ vi /etc/tigervnc/vncserver.users
:1=taconana

Edit the config file for each user. Then set a password.

$ su - taconana
$ restorecon -RFv /home/taconana/.vnc

$ vi /home/taconana/.vnc/config
# session=gnome					# vncserver-config-Not required if set to defaults
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
geometry=1360x768				#This is optional
# localhost
# alwaysshared

$ vncpasswd						#Password setting
Password: ***
Verify: ***
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

Go back to root and start the service.

$ systemctl daemon-reload
$ systemctl start vncserver@:1
$ systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-12-13 12:27:52 JST; 27min ago
  Process: 133876 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
 Main PID: 133882 (vncsession)
    Tasks: 1 (limit: 24986)
   Memory: 2.0M
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ? 133882 /usr/sbin/vncsession taconana :1

$ systemctl enable vncserver@:1			#Make it auto-executable.

that's all

../

Recommended Posts

Steps to set up a VNC server on CentOS 8.3
Steps to set up Postfix and Dovecot on CentOS 8.3
Set up a CentOS virtual server with Vagrant
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Set up Gitolite on CentOS 7
[Ubuntu] Set up a Nukkit server
Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Easily set up a Jenkins server on AWS using Bitnami's AMI
Steps to set a favicon in Rails
Set up Docker Registry locally on CentOS 7
Set up Metabase service on Windows Server 2012
How to add a virtual disk to Linux (CentOS7) on VirtualBox to free up space
[Android / Java] Set up a button to return to Fragment
Steps to set up Jenkins on your local Mac, create one job and succeed
Build VNC Server on Ubuntu 20.04
Set up ansible-playbook on Ubuntu 20.04
How to install GNOME as a desktop environment on CentOS 7
How to set up a proxy with authentication in Feign
How to deploy Laravel on CentOS 7
Steps to run docker on Mac
Steps to install samba on CentOS 8 and connect from Windows 10 Explorer
Build a Minecraft server on AWS
A story of connecting to a CentOS 8 server with an old Ansible
[Wire Mock] I want to set up a stub / mock server in Java and perform E2E tests.
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
How to install MariaDB 10.4 on CentOS 8
How to create a web server on an EC2 instance on AWS
Steps to build a Ruby on Rails development environment with Vagrant
Try to set up Stanford CoreNLP Server for Windows (shortest guide)
Notes on what to do when EC2 is set up with t2.micro
Volume of trying to create a Java Web application on Windows Server 2016
Set up a Java GUI in a separate thread to keep the main
A memorandum on how to use Eclipse
How to redo a deployment on Heroku
How to set up and use kapt
I tried to build AdoptOpenjdk 11 on CentOS 7
Steps to register Java files on GitHub
Connect with VS Code from a Windows client to Docker on another server
How to build a Jenkins server with a Docker container on CentOS 7 of VirtualBox and access the Jenkins server from a local PC
Command to install nginx / PHP7 / php-fpm on CentOS7
A memorandum to clean up the code Ruby
How to deploy a container on AWS Lambda
Write a dockerfile to start jupyter-lab on ubuntu
Gachi beginners set up containers on Kubernetes? Until···
Set the time of LocalDateTime to a specific time
Ssh login to the app server on heroku
Build a streaming server on your iOS app
How to set up and operate jEnv (Mac)
Use CarrierWave to set a user's profile picture
How to set up JavaED Full Edition (pleiades)
[Java] 4 steps to implement splash screen on Android
How to build a Pytorch environment on Ubuntu
I tried to implement a server using Netty
Run autossh as a systemd service on CentOS
Set up a webhook in Shopify's custom app
Rspec: I want to test the post-execution state when I set a method on subject
Adding a network device to CentOS 8 on Hyper-V does not automatically create a virtual network interface
What to do if you get a port error when docker-compose up on Mac