banner



How To Install Tigervnc On Centos 7

In that location is a new version of this tutorial available for CentOS 8.

This tutorial exists for these Os versions

  • CentOS viii
  • CentOS 7
  • CentOS six.five

On this page

  1. VNC-Server installation on CentOS vii
    1. 1 Preliminary Notation
    2. 2 Installation
    3. three Adding VNC user
    4. 4 VNC Client

VNC-Server installation on CentOS 7

Version 1.0
Author: Srijan Kishore

This guide explains how to configure VNC-server in CentOS seven.0 server. It is a very convinient fashion of administrating the CentOS seven.0 with the aid of GUI(Graphics User Interface). The GUI can exist admission whatsoever where with the help of the VNC-client on any Os. The basic condition is that the connecting Bone must have VNC-clients installed in it.

1 Preliminary Note

This tutorial is based on CentOS seven.0 server, so you should gear up upward a basic CentOS seven.0 server installation before you go along with this tutorial. The organization should accept a static IP address. I use 192.168.0.100 every bit my IP accost in this tutorial and server1.example.com as the hostname.

IP address 192.168.0.100
Gateway 192.168.0.ane
DNS eight.viii.viii.eight    8.8.iv.4
Hostname server1.example.com VNC-server benefits

  • Remote GUI administration makes piece of work easy & convenient.
  • Clipboard sharing between host CentOS server & VNC-client car.
  • GUI tools tin be installed on the host CentOS server to make the assistants more powerful
  • Host CentOS server can be administered through whatsoever Bone having the VNC-customer installed.
  • More reliable over ssh graphics.
  • More reliable over RDP connections.

2 Installation

I am logged in my arrangement with root, & now I will be installing the VNC-server.
yum groupinstall "GNOME Desktop"

Further install

 yum install tigervnc-server

3 Calculation VNC user

In my case I am using user=srijan information technology volition differ in your case. You can utilise whatever username for the same.

useradd srijan

In CentOS 7.0 there is alter in the vncserver configuration file. Earlier ContOS 7.0 information technology was /etc/sysconfig/vncservers and at present information technology have changed in /lib/systemd/system/[email protected]. Next I will apply the original file and create the configuration file as shown:

cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]:1.service


Now we will edit the file equally follows:

vi /etc/systemd/arrangement/[electronic mail protected]:1.service

Replace the cord <USER> with advisable vncuser's username.  In my case I volition be using the user srijan merely created above:

                  [...]
[Service] Blazon=forking # Clean whatever existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -impale %i > /dev/null ii>&one || :' # ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i" # PIDFile=/home/<USER>/.vnc/%H%i.pid ExecStart=/sbin/runuser -l srijan -c "/usr/bin/vncserver %i" PIDFile=/dwelling house/ srijan /.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/cypher 2>&1 || :'

If you wish to add more users y'all would create a new [e-mail protected]:#.service file and change the <USER> cord to the new users.

Firewall settings:

firewall-cmd --permanent --zone=public --add-service vnc-server
firewall-cmd --reload

Now switch to the vncuser just created above and showtime the vnc service equally:

su - srijan
vncserver
[[email protected] ~]$ vncserver

Yous will require a password to access your desktops.

Password: <--yourvncpassword
Verify: <--yourvncpassword
xauth:  file /home/srijan/.Xauthority does not exist

New 'server1.case.com:i (srijan)' desktop is server1.instance.com:1

Creating default startup script /home/kishore/.vnc/xstartup
Starting applications specified in /home/kishore/.vnc/xstartup
Log file is /home/srijan/.vnc/server1.instance.com:ane.log

[[email protected] ~]$

Now make the service enabled on after every reboot with root credentials:

su -
systemctl daemon-reload
systemctl enable [electronic mail protected]:1.service
reboot
systemctl outset [email protected]:1.service

iv VNC Client

At client finish my Os is Ubuntu xiv.04 with vino installed on my client motorcar. Otherwise you tin install any VNC-customer of your pick. In case other Bone say Windows-vii yous can install Realvnc-client or any other of your selection.

At present I am going to connect with the VNC server through my VNC-client at 192.168.0.100:5901

It will prompt for the password, give the vnc password just created higher up equally follows:

Put yourvncpassword the same which you gave at the time of adding the user srijan.

Now you are connected with the CentOS vii.0 Server. In case you want to add together more users to access the vnc-console you demand to add :

cp /lib/systemd/system/[electronic mail protected] /etc/systemd/system/[email protected]:ii.service
vi /etc/systemd/system/[email protected]:2.service
For example I am using user kishore, entries will exist like this
                  [...]
[Service] Blazon=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -impale %i > /dev/null 2>&1 || :' # ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i" # PIDFile=/home/<USER>/.vnc/%H%i.pid ExecStart=/sbin/runuser -l kishore -c "/usr/bin/vncserver %i" PIDFile=/dwelling/ kishore /.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'


Now switch to the vncuser only created above and offset the vnc service as:

su - kishore
vncserver
[[email protected] ~]$ vncserver

You lot will require a password to access your desktops.

Countersign: <--yourvncpassword
Verify: <--yourvncpassword
xauth:  file /home/kishore/.Xauthority does not be

New 'server1.instance.com:2 (kishore)' desktop is server1.example.com:ii

Creating default startup script /abode/kishore/.vnc/xstartup
Starting applications specified in /home/kishore/.vnc/xstartup
Log file is /habitation/kishore/.vnc/server1.example.com:2.log

[[e-mail protected] ~]$


At present  start the service on afterwards every reboot for second user as follows: Advertisement

systemctl daemon-reload
systemctl enable [email protected]:two.service
reboot
systemctl kickoff [email protected]:2.service
This will enable user kishore to get the access to the VNC-server with the port 5902 every bit 192.168.0.100:5902 . In the aforementioned mode you can add the root user also.

Congrats you accept configured the VNC-server in CentOS seven.0 successfully :)

Suggested articles

Source: https://www.howtoforge.com/vnc-server-installation-on-centos-7

Posted by: richardsonprisay.blogspot.com

0 Response to "How To Install Tigervnc On Centos 7"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel