DropVPS Team
Writer: Cooper Reagan
How to start VNC server from command line?

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
U
Loading...