DEV Community

Cover image for Install Ubuntu Desktop on Any Ubuntu Server
Fady Mondy
Fady Mondy

Posted on

Install Ubuntu Desktop on Any Ubuntu Server

some developers need to use a cloud server as a personal computer for fast development and remote use, and it's a very good idea but, how can install an Ubuntu desktop on it?

it's easy to do this by following some commands:

let's start by installing tasksel

 sudo apt install -y tasksel
Enter fullscreen mode Exit fullscreen mode

now you are ready to install ubuntu-desktop use this command

sudo apt install -y ubuntu-desktop
Enter fullscreen mode Exit fullscreen mode

cloud servers by default don't have a display so you need to set a graphical target to up the GUI

sudo systemctl set-default graphical.target
Enter fullscreen mode Exit fullscreen mode

and WOW, it's working now.

Install XRDP

if you like to get a Remote control using RDP you can follow these steps, let's start by installing xrdp

sudo apt install xrdp -y
Enter fullscreen mode Exit fullscreen mode

now we need to add SSL to xrdp using this command

usermod -a -G ssl-cert xrdp
Enter fullscreen mode Exit fullscreen mode

now we need to add some commands to make xrdp auto-start

echo 'Unset DBUS_SESSION_ADDRESS' >> /etc/xrdp/startwm.sh
echo 'Unset XDG_RUNTIME_DIR' >> /etc/xrdp/startwm.sh
Enter fullscreen mode Exit fullscreen mode

now xrdp is ready to connect we have just 1 step, we need to allow port 3389 to access xrdp

ufw allow from 192.168.1.0/24 to any port 3389
ufw reload
Enter fullscreen mode Exit fullscreen mode

now you can connect with any RDP client to your remote server.

Imagine monitoring actually built for developers

Billboard image

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay