In this tutorial, we learned how to install VNC on Ubuntu 20.04/18.04 LTS. Then reload the systemd manager and enable the sudo systemctl daemon-reload Unit]ĭescription=Start VNC Server at startup With Desktop ID 1.ĮxecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'ĮxecStart=/usr/bin/vncserver :%i -geometry 1366x768 -depth 24 To create a systemd unit, create a file named inside the /etc/systemd/system directory and add the following configuration ( Change User=your_username to your Linux username). The following example will create a new systemd unit with desktop ID 1. We need to create a systemd unit file to start the VNC server automatically when the Ubuntu server reboot. To change the VNC password, run the following command: vncpasswd Automatically Start the VNC Server on Startup To manually stop the VNC Server on Ubuntu, run the kill command followed by the desktop ID: vncserver -kill :1 For example, the following command will start a VNC session with desktop ID 2: vncserver :2 -geometry 1366x768 -depth 24 Multiple users can connect the Ubuntu system and work simultaneously, But you have to start multiple VNC sessions with different desktop IDs. For Microsoft Windows, you can use the RealVNC Viewer.Įnter your Ubuntu server IP address and the VNC desktop number to be connected. Ubuntu users can use the tigervnc-viewer or Vinagre remote desktop viewer. The user needs a VNC Viewer to connect to Ubuntu from their local computer. The remote session will use the 1366x768 resolution, and the desktop ID is 1. Vncserver :1 -geometry 1366x768 -depth 24
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |