Now start the VNC server by running the vncserver command as a normal user. This action will create the initial configuration stored in the $HOME/.vnc directory and it will also prompt you to set up a login password.Įnter a password (which must be at least six characters length) and confirm/verify it. Then set a view-only password if you wish, as follows. Next, we need to configure the DE to work with the VNC server. So, stop the VNC server using the following command, in order to perform some configurations. To configure GNOME or whatever desktop you have installed, create a file called xstartup under the configurations directory using your favorite text editor. $ vi ~/.vnc/xstartupĪdd the following lines in the file. These commands will be automatically executed whenever you start or restart the TigerVNC server. #!/bin/shĭbus-launch -exit-with-session gnome-session & Note that the commands may vary depending on the DE you installed. Save the file and set the appropriate permission on the file so it can be executed. Next, start the VNC server by running the following command as a normal user. Set your own values for the display geometry. In addition, use the -localhost flag to allow connections from the localhost only and by analogy, only from users authenticated on the server. In addition, VNC by default uses TCP port 5900+N, where N is the display number. $ vncserver :1 -localhost -geometry 1024x768 -depth 32 In this case, the :1 means that the VNC server will run on display port number 5901. ![]() To list VNC server sessions on your system, run the following command. ![]() Verify VNC Running Ports Connecting to VNC Server via VNC Client Once the VNC server has started, check the port it is running on with the netstat command. In this section, we will show how to connect to the VNC server, but before we go into that, you need to know that by default VNC is not secure by default (it is not an encrypted protocol and can be subject to packet sniffing). This problem can be fixed by creating a tunnel from the client to server connection through SSH. Using SSH tunneling, you can securely forward traffic from your local machine on port 5901 to the VNC server on the same port. On Linux client machine, open a new terminal window and run the following command to create an SSH tunnel to VNC server. $ sudo zypper install tigervnc-viewer #OpenSUSE $ sudo yum install tigervnc-viewer #Fedora 22+ $ sudo yum install tigervnc-viewer #CnetOS/RHEL $ sudo apt install tigervnc-viewer #Ubuntu/Debian Next install vncviewer client such as TigerVNC Viewer as follow s(you can install any other client of your choice).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |