Ubuntu Remote Connection
Published:
USE VNC (with xfce4)
1. Install VNC server on Server
- sudo apt update
- sudo apt install tigervnc-standalone-server tigervnc-common xfwm4 xfce4-terminal xterm dbus-x11
- sudo apt install xfce4
2. Set VNC password
- vncpasswd
3. Create VNC startup script
- mkdir -p ~/.vnc
vim ~/.vnc/xstartup
Put this inside:
#!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS #xterm & #xfwm4 & exec xfce4-session
- chmod +x ~/.vnc/xstartup
4. Start (kill) VNC server
- vncserver :2 -geometry 1920x1080 -depth 24
- vncserver -kill :2
5. Connect to server via SSH tunnel
- ssh -L 5902:localhost:5902 youraccount@xxx.xxx.xxx.xxx
6. Connect to server via VNC client (e.g., TightVNC)
- localhost:5902
USE NoMachine
- Ask deepseek.