Ln -s '/etc/systemd/system/ :3.service' '/etc/systemd/system// :3.service' Start and Enable the VNC Service at boot.Įxecute below commands as root only.
Switch to the user (linuxtechi) and run vncserver command to set the password as shown below : ~]# Step:5 Set the VNC password for the User. ~]# firewall-cmd -permanent -zone=public -add-port=5903/tcp Set the Firewall Rule if firewall is enabled on your linux box. In my case linuxtechi user will able to control and manage its desktop session using remote VNC clients. Replace the “linuxtechi” user as per your requirement.
So while Connecting to the VNC server We can specify port number as or ~]# cp /lib/systemd/system/ /etc/systemd/system/ :3.service Step:4 Update the User’s Information in the Config File In my case i am using port 3, it means VNC will listen on “5903”.
While Copying the VNC config file we can mention the port number on which we want VNC service to be listen.
~]# yum install tigervnc-server xorg-x11-fonts-Type1 Step:3 Setup VNC Server Configuration File.Ĭopy the VNC config file “/lib/systemd/system/ ” to the “/etc/systemd/system/. # doing so through a secure tunnel.~]# yum groupinstall "GNOME Desktop" Step:2 Install Tigervnc and other dependency Package. # Use "localhost" to prevent remote VNC clients connecting except when # Use "nolisten=tcp" to prevent X connections to your VNC server via TCP. # the help of ssh, you end up seeing what hostB makes available on port 590M # You can then point a VNC client on hostA at vncdisplay N of localhost and with # See the ssh man page for details on port forwarding) # (in fact, it ssh-connects to hostB and then connects to localhost (on hostB). # this will open a connection on port 590N of your hostA to hostB's port 590M # whose VNC output you want to view (host B) # the machine you want to view VNC on (host A) to the machine # limit connections to the local host and then tunnel from # untrusted! For a secure way of using VNC, you should Run `systemctl start DO NOT RUN THIS SERVICE if your local area network is I looked at /usr/bin/vncserver_wrapper, decided it looked too complicated to fiddle with parameters - luckily it connected without any need to do so.īut I do feel that this solution won't work for multiple users (I am not really bothered as I am the only user), hence my thought that this is not the "right"/"perfect" solution.Ĭode: Select all ~]# sc cat The vncserver service unit file Once I'd removed the session statement I am now able to connect.
So I copied the file and replaced with peter plus then there was a fault with the "session" statement that the original guide had indicated to add to /etc/tigervnc/vncserver-config-defaults. # parameters in the wrapper script located in /usr/bin/vncserver_wrapper Replace with the actual user name and edit vncserver For the record and anyone else finding this thread:Ĭopy this file to 2. Thanks: got it working, although I don't feel it is working as expected (in that the change I made feels like it would only ever work for one user - for me that is fine though). There is no more help in /var/log/messages and no log file created in my /home/peter/.vnc folder.ĭoes anyone have the answer or can advise how I can diagnose this fault? The error seems to suggest that user peter does not exist, or may be that it is not reading my. Nov 28 13:44:54 Backup systemd: Failed with result 'exit-code'.
Nov 28 13:44:54 Backup systemd: Main process exited, code=exited, status=2/INVALIDARGUMENT Nov 28 13:44:54 Backup vncserver_wrapper: FATAL: 'runuser -l ' failed! Nov 28 13:44:54 Backup vncserver_wrapper: runuser: user does not exist
Nov 28 13:44:54 Backup systemd: Started Remote desktop service (VNC). Nov 28 13:44:54 Backup systemd: Starting Remote desktop service (VNC). Loaded: loaded enabled vendor preset: disabled)Īctive: failed (Result: exit-code) since Sat 13:44:54 GMT 22min ago This is the output of systemctl status - Remote desktop service (VNC) in-rhel-8, section 5.3.3 adding myself as user 2.