Lubuntu – Installing VNC Server
I use VNC to access the graphical interface from my PC to a Cubieboard running Lubuntu. I chose TightVNC and spent some time configuring it. A helpful guide on ubuntuforums.org (currently offline — see status) got me started, but I needed to make changes, so I documented what actually worked.
Note: This guide is based on an older Lubuntu/LXDE setup with LightDM. The package names and file paths match that environment — newer Lubuntu releases may differ. TightVNC creates a separate virtual desktop and does not encrypt traffic; use it on a trusted network or tunnel through SSH.
Install TightVNC
Install the package:
sudo apt-get install tightvncserver
If you want to check first whether any VNC package is already installed:
dpkg --get-selections | grep vnc
Create the Initial Session
Set a VNC password with vncpasswd:

Run tightvncserver once to generate the config files in ~/.vnc/:

Stop the initial session:
tightvncserver -kill :1
Configure xstartup
Edit ~/.vnc/xstartup to start Openbox as the window manager and Lubuntu’s LXSession as the desktop environment:
#!/bin/sh
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
#autocutsel -fork
openbox &
/usr/bin/lxsession -s Lubuntu &

Important: Do not add -e LXDE to the lxsession line. See the Troubleshooting section below for why.
Connect from a VNC Client
Start the VNC server:
tightvncserver :1
TightVNC maps display :1 to TCP port 5901 (display :N maps to port 5900+N). Connect your VNC viewer to your-server-ip:5901.

I installed VNC viewer on my Windows PC:



TightVNC server is up and running on Lubuntu, and the VNC client is connected.
Note: TightVNC creates a separate virtual desktop session — it does not share the physical display. If you need to remote into the desktop that’s already visible on the machine, use x11vnc instead. For a full overview of VNC server options, see Ubuntu VNC/Servers.
Autostart After Login
To start TightVNC automatically after login, enable autologin in LightDM and add TightVNC to the Lubuntu autostart file (I used autologin in my previous post). Update /etc/lightdm/lightdm.conf:
[SeatDefaults]
autologin-user=linaro
autologin-user-timeout=0
greeter-session=lightdm-gtk-greeter
user-session=Lubuntu

Add this line to /etc/xdg/lxsession/Lubuntu/autostart:
@/usr/bin/tightvncserver :1
You can edit the file with:
sudo mcedit /etc/xdg/lxsession/Lubuntu/autostart

VNC will start automatically after reboot.
Troubleshooting: Log File Growing Uncontrollably
If ~/.cache/lxsession/Lubuntu/run.log is growing rapidly, remove the -e LXDE flag from ~/.vnc/xstartup.
The corrected line:
/usr/bin/lxsession -s Lubuntu &
The original (broken) line was:
/usr/bin/lxsession -s Lubuntu -e LXDE &

The -e LXDE flag causes lxsession to restart in a loop, writing error messages to run.log on every attempt. My file was growing by ~100 MB per day. You can check the log size:
ls -la ~/.cache/lxsession/Lubuntu/
If this message appears repeatedly, the session is being restarted in a loop:
** Message: app.vala:59: Launching /usr/bin/tightvncserver :1 (null)
A VNC server is already running as :1
** Message: app.vala:73: /usr/bin/tightvncserver exit with this type of exit: 25088
** Message: app.vala:91: Exit not normal, reload
This bug is still open
Launchpad #1376380 — reported in 2014, confirmed, still unfixed as of 2026. Other users report log files reaching 76 GB, 600 GB, and filling entire disks. Lubuntu 16.04 and even Raspberry Pi users hit the same issue.
This blog post is referenced in the bug report.
Alternative workaround
If removing -e LXDE does not solve it, you can prevent the log from growing by removing write permissions:
chmod a= ~/.cache/lxsession/Lubuntu/run.log
Credit: comment #14 on Launchpad (2020).
VNC Server Alternatives
If you are setting this up on newer hardware or a newer distro, these are the main alternatives worth considering:
| Server | Use Case | Security | Link |
|---|---|---|---|
| TigerVNC | Fast, lightweight, multi-monitor | Basic TLS, needs manual setup | tigervnc.org |
| RealVNC | Enterprise, cross-platform, polished | 256-bit AES, MFA, SSO | realvnc.com |
| x11vnc | Shares real desktop (remote help) | Needs SSH/VPN tunnel | GitHub |
| TightVNC | Simple setup, low-bandwidth, legacy | Password only, no encryption | tightvnc.com |
Tip: For security, always tunnel VNC over SSH or VPN. On Linux, Remmina is a solid multi-protocol client (VNC, RDP, SSH).