
It will also ensure that VNC starts when you reboot your server.Ĭreate a new file named symbol will allow us to pass an argument that we can use to configure the service. Next, we will configure the VNC server as a system service that we can start, stop and restart like any other service. Now we can test the remote connection to the system using any VNC client and it should be ok. In order for the VNC server to use the new startup file, we need to make it executable. X-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & The VNC server should start our desktop environment if it is not already running. Now lets create a new xstartup file and open it in a text editor:Ĭommands from this file are automatically executed when starting or restarting the VNC server. The result should look like this, although you will see a different PID:īefore modifying the xstartup file, we should back up the source file: Since we are changing the configuration of the VNC server, we first need to stop the VNC server instance running on port 5901 using the following command: You can run multiple instances of VNC on other display ports, including : 2,: 3, etc. This port is called the display port and is considered by VNC as : 1. When VNC is initially configured, a default server instance is started on port 5901.

The startup script was created when starting vncserver in the previous step, however we will create our own script to start the Gnome desktop. These commands are located in the xstartup configuration file in the. In particular, VNC needs to know which graphical desktop to connect to. The VNC server must know what commands to execute at startup. Starting applications specified in /home/exsentis/.vnc/xstartup Log file is /home/exsentis/.vnc/your_hostname:1.log Xauth: file /home/sammy/.Xauthority does not existĬreating default startup script /home/exsentis/.vnc/xstartup
