Accessing the GUI using VNC Serverĭownload and install any VNC viewer on your client PC to access the VNC Server. This will enable the auto start on system boot # systemctl start systemctl enable 5. Reload systemd’s configuration # systemctl daemon-reloadĬonfigure the VNC password for user oracle # vncpasswd oracle
By default VNC server listens on 5900, but if you setup port-offset for VNC we can run a service on a sub-port of the default port 5900. While copying, you can mention which port it should listen. This will also enable autostart on system boot. Copy the VNC server configuration file to /etc/systemd/system/ for configuring the system service. Switch to root user and enable the vncserver service for oracle user on port 5902. Starting applications specified in /home/oracle/.vnc/xstartup New 'ol7-dev:2 (oracle)' desktop is ol7-dev:2 Xauth: file /home/oracle/.Xauthority does not exist Remove this file if there is no X server ol7-dev:1 Warning: ol7-dev:1 is taken because of /tmp/.X11-unix/X1 Switch to Oracle user and start the VNC Service # vncserver Or you may use sed command to replace the string, # sed -i 's//oracle/g' 3. # Clean any existing files in /tmp/.X11-unix environmentĮxecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'ĮxecStart=/usr/bin/vncserver_wrapper oracle %iĮxecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' In the below example I have replaced with oracle # vi
Manually edit the copied file and replace to your username # cp I have mentioned port 2, so that the VNC Desktop will be accessible on port 5902. Configure VNC ServerĬopy the VNC configuration file / to /etc/systemd/system directory and mention the port which has to connect. Note: Before installing the VNC server, Make sure the OS is installed with GNOME Desktop.įor configuring VNC Server, the following packages has to be installed. VNC Server Prerequisites and rpm installation