X2Go shows a full Linux desktop of your server in a window on your computer. It connects over SSH, so it needs no extra open port. When you close the window, your programs keep running on the server, and the next connection brings back the same desktop.
The steps below install the light XFCE desktop on Ubuntu. They were tested on Ubuntu 26.04 LTS.
1. Install the Desktop and X2Go Server
Connect to your server with SSH as root (see How to Connect to a Linux Server via SSH) and run:
apt update apt install xfce4 xfce4-goodies xubuntu-wallpapers x2goserver x2goserver-xsession lightdm- light-locker-
This installs about 500 packages and takes a few minutes. The minus signs after lightdm and light-locker tell apt to leave these two out: a server needs no login screen for a monitor, and the light-locker screen locker is not needed with X2Go. Without xubuntu-wallpapers, the desktop background stays black. On Debian, leave xubuntu-wallpapers out of the command: Debian does not have this package, and apt stops with Unable to locate package xubuntu-wallpapers.
2. Create a User for the Desktop
Do not use root for the desktop. Create your own user and allow it to run administrator commands with sudo (replace alex with your name):
adduser alex usermod -aG sudo alex
adduser asks for the new user's password twice. You can skip the other questions with Enter.
3. Install X2Go Client on Your Computer
- Windows and macOS: download X2Go Client from the X2Go download page. On macOS it also needs XQuartz; the download page explains how to install it.
- Ubuntu, Debian and similar:
sudo apt install x2goclient
4. Add Your Server
Start X2Go Client. The first time, it opens the Session preferences window by itself; later you open it with Session → New session. Fill in:
- Session name: any name, for example
My server. - Host: your server's IP address.
- Login: the user you created in step 2.
- Session type: XFCE.
- Choose OK.
The desktop opens at 800 × 600 pixels unless you change it. On the Input/Output tab, choose Fullscreen (1), or Custom with a size that fits your screen (2).
5. Connect
Click your server in the list on the right. Type the user's password (1) and choose Ok (2).
The first time, X2Go Client does not know your server's SSH key yet and asks whether you trust it. This is normal for a new connection. Choose Yes.
The desktop of your server opens in a window. The first start takes about half a minute.
From here you work as on any computer: the bar at the bottom opens a terminal, the file manager and a web browser, and Applications at the top left lists all programs.
If Windows Have No Title Bar or Leave Black Areas
XFCE's window effects do not work well through X2Go. Switch them off once: open Applications → Settings → Window Manager Tweaks.
On the Compositor tab, clear Enable display compositing (1) and close the window. New windows are drawn correctly at once.
You can do the same in the desktop's terminal:
xfconf-query -c xfwm4 -p /general/use_compositing -s false
Close the Window or Log Out
- Close the X2Go window: the session waits on the server, and your programs keep running. Next time you click your server in X2Go Client, you get the same desktop back.
- Applications → Log Out: ends the session and closes all its programs.
After a while without use, the desktop locks itself, also while the X2Go window is closed. To unlock it, type the user's password (1) and choose Unlock (2).
If It Does Not Work
- "SSH daemon could not be started" (X2Go Client on Linux): printing to your computer and shared folders need an SSH server on your computer. On the Media tab of the session, clear Client side printing support, or install
openssh-serveron your computer. - Only a black screen after connecting: close the X2Go window, connect with SSH as your user and end the old session.
x2golistsessionsshows the session ID (the second field), andx2goterminate-sessionfollowed by that ID ends it. Then connect again. - Wrong password or no answer: X2Go uses the same login as SSH. Check that you can connect with SSH as the same user first.
X2Go is as safe as your SSH access. Use a strong password, or better, an SSH key.








