Virtual Network Computing (VNC) is a technology which allows remote control of another computer using the Remote Frame Buffer protocol (RFB). In this guide, we’ll cover how to Install and Configure VNC Server on Ubuntu 18.04 LTS.VNC works in a client/server model. The VNC client is installed on the local computer while the VNC server is installed on the remote system to be managed. The server transmits a duplicate of the remote computer’s display screen to the viewer(client). Install and Configure VNC Server on Ubuntu 18.04 LTSInstall VNC server on Ubuntu 18.04 by running the commands below in your terminal. Sudo apt updatesudo apt -y install vnc4server Step 2: Install Desktop EnviromentEnsure you have a Desktop Environment installed on your Ubuntu 18.04.
For this guide, we’ll install Xfce desktop environment. Sudo apt install xfce4 xfce4-goodiesYou can choose to use other Desktop environments. Step 3: Configure VNC ServerOnce you’ve finished the installation of Desktop environment and VNC server. Configure VNC server on Ubuntu 18.04 LTS as follows. 1. Set a secure access passwordRun the vncpasswd command to set password for your VNC server. $ vncpasswdPassword:Verify:When prompted, enter and verify your password to set.
2. Start VNC serverStart VNC Server on Ubuntu 18.04 using the command: $ vncserver:1New 'ubuntu-01:1 (computingforgeeks)' desktop is ubuntu-01:1Creating default startup script /home/computingforgeeks/.vnc/xstartupStarting applications specified in /home/computingforgeeks/.vnc/xstartupLog file is /home/computingforgeeks/.vnc/ubuntu-01:1.log 3. Kill VNC ServerKill VNC Server using the command: $ vncserver -kill:1Killing Xvnc4 process ID 20842 4. Set VNC Server Desktop EnvironmentVNC configuration file is located on /.vnc/xstartup. Edit it with your favorite text editor.
Sudo vim /.vnc/xstartupAdd the following line at the end of the file. Exec /usr/bin/startxfce4 &Finally start VNC Server with;. Display number 1.
Screen resolution 800×600. Color depth 24$ vncserver:1 -geometry 800x600 -depth 24New 'ubuntu-01:1 (computingforgeeks)' desktop is ubuntu-01:1Starting applications specified in /home/computingforgeeks/.vnc/xstartupLog file is /home/computingforgeeks/.vnc/ubuntu-01:1.log Step 4: Connect to the VNC DesktopYou can connect to remote desktop using a VNC client and SSH tunneling. Create an ssh tunnel to VNC server using the following command. Ssh @ -C -L 5901:127.0.0.1:5901Then install vncviewer client sudo apt install tigervnc-viewerOn Arch Linux, install it with: sudo pacman -S tigervncOnce your SSH tunnel is running, connect to localhost:5901 using VNC client. When prompted for password, enter the password created during the VNC server configuration.Once connected, you’ll see the default Xfce Desktop environment Step 5: Configure SystemdStop the current VNC server instance: vncserver -kill:1Create a systemd service unit file for managing VNC Server. Sudo vim /etc/systemd/system/Add: UnitDescription=Start TightVNC server at startupAfter=syslog.target network.targetServiceType=forkingUser= computingforgeeksGroup= computingforgeeksWorkingDirectory=/home/ computingforgeeksPIDFile=/home/ computingforgeeks/.vnc/%H:%i.pidExecStartPre=-/usr/bin/vncserver -kill:%i /dev/null 2&1ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800:%iExecStop=/usr/bin/vncserver -kill:%iInstallWantedBy=multi-user.targetDon’t forget to replace computingforgeeks with your actual remote user username.
VNC ( Virtual Network Computing ) Servers enables remote desktop access for Linux systems similar to MSTSC in windows. Generally Linux administrators doesn’t prefer to use windows access, But some times we required to have access remote desktop of Linux. In that case we need to install vnc server on our Linux system. This tutorial will help you to Setup VNC Server and configure remote access for users on CentOS, RHEL and Fedora Users. Step 1: Install Required PackagesMost of Linux servers doesn’t have desktop installed on their system. So make sure you have installed else use following command to install it.
For CentOS/RHEL 6:# yum groupinstall 'Desktop'For CentOS/RHEL 5:# yum groupinstall 'GNOME Desktop Environment'Now install few required packages for vnc-server # yum install pixman pixman-devel libXfontStep 2: Install VNC ServerAfter installing required packages, lets install vnc-server in your system. Vnc-server is available under default yum repositories. # yum install vnc-serverOn CentOS/RHEL 6, you will see that tigervnc-server package will be installed. Step 3: Create User for VNCLets’ create few users for connecting through vnc. You can also use existing system users by connecting through vnc, In that case we only need to set vncpasswd for that account. # useradd user1# passwd user1# useradd user2# passwd user2Now set the vnc password for all accounts need to connect through vnc. # su - user1$ vncpasswd$ exit# su - user2$ vncpasswd$ exitStep 4: Configure VNC Server for UsersNow edit /etc/sysconfig/vncservers configuration file and add the following to the end of the file.
VNCSERVERS='1:user1 2:user2'VNCSERVERARGS1='-geometry 800x600'VNCSERVERARGS2='-geometry 1024x768'Where VNCSERVERS is the list of users need to connect, VNCSERVERARGS defined the screen size. Gta iv steam fix.