Installing and connecting to a GUI in Proxmox LXC

Heres a short guide to installing a desktop environment in our Linux container and remotely connecting to it using x2go client.
in Proxmox, create a container
update our dependencies
apt update and upgrade
install a desktop environment, we are going to install xfce4
apt install xfce4 -y
choose either gdm3 or lightDM as your preferred display manager
install x2goserver and x2goserver-xsession so we can use the client to connect to it later
apt install x2goserver x2goserver-xsession -y
create a new user to be added in later. This is because ssh doesn't allow connection via root user
adduser user1
install the x2go client on another PC. download link can be found here: https://wiki.x2go.org/doku.php
connect to the remote Linux container. Enter login, which is the username we just created and also the host, which is the IP address of where our Linux container is. Session type select XFCE
Now we can remotely connect to our containers using a GUI
Subscribe to my newsletter
Read articles from Andre Wong directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Andre Wong
Andre Wong
I am a software developer who is passionate about creating innovative and efficient solutions to complex problems. I also enjoy writing about my personal projects and sharing my knowledge with others. I am maintaining a blog to document my coding adventures, share tips and tricks for software development, and discuss interesting topics in computer science.