General / Server / Remote desktop access to an Ubuntu server - using tightvnc
Remote Access to ubuntu server
-
STEPS
1. Installing VNC Server on Ubuntu
Step 1: Connect to your Ubuntu serverEnsure you have SSH access to your Ubuntu server. You can use tools like PuTTY (for Windows) or Terminal (for macOS/Linux) to connect remotely.
Step 2: Update package listRun the following commands to update the package list:
Step 3: Install a desktop environment (if not already installed)sudo apt update sudo apt upgrade If your server doesn’t have a desktop environment, install one. XFCE is a lightweight option:
Step 4: Install a VNC serversudo apt install xfce4 xfce4-goodies Install a VNC server like TightVNC:
Step 5: Start the VNC serversudo apt install tightvncserver Run the VNC server to set up a password and start a session:
tightvncserver It will prompt you to set a password for VNC access. After setting the password, it will start a VNC server session.
Step 6: Configure VNC serverStop the VNC server to configure it:
Edit the configuration file:tightvncserver -kill :1
Add the following lines at the end of the file:nano ~/.vnc/xstartup
Step 7: Restart the VNC server#!/bin/bash xrdb $HOME/.Xresources startxfce4 & tightvncserver 2. Accessing Ubuntu Server from a VNC Client
To access the Ubuntu server from your local machine:
1. Download a VNC client (e.g., RealVNC, TightVNC, TigerVNC) on your local computer. https://www.tightvnc.com/download.php
2. Open the VNC client and enter the server's IP address followed by the VNC server port (default is :1).
3. Enter the password you set earlier.