Table of Contents
What you will read?
To start a VNC server from the command line on a Linux system (like Ubuntu), you can follow these steps. I’ll use TigerVNC as the example since it’s one of the most commonly used VNC servers.
Step-by-step: Start VNC Server from Terminal
-
Install the VNC server (if not already installed):
sudo apt update sudo apt install tigervnc-standalone-server - Set the VNC password (first-time setup):
vncpasswd - Start the VNC server manually:
vncserverBy default, this will start a VNC session on display
:1(port5901). - (Optional) Stop the VNC server:
vncserver -kill :1
Customize VNC Server Startup (e.g. Desktop Environment)
If you want to use a desktop environment like GNOME, XFCE, or LXDE with your VNC session, edit or create this file:
nano ~/.vnc/xstartup
For XFCE:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
Make the file executable:
chmod +x ~/.vnc/xstartup
Then start again:
vncserver :1
🐧Linux VPS
Need a Linux Server for This?
Run Debian, Ubuntu, or any Linux distro on DropVPS — fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.
- Full Root Access
- Debian & Ubuntu Ready
- 99.99% Uptime
- 24/7 Support
Get Linux VPS →
No commitment · Cancel anytime
U
Loading...
