Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions data/cloud-init-yaml/cloud-init-gnome-rdp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package_update: true
package_upgrade: true
users:
- default
packages:
- ubuntu-desktop
- gnome-remote-desktop
- winpr3-utils
runcmd:
- sudo -u gnome-remote-desktop winpr-makecert3 -silent -rdp -path ~gnome-remote-desktop rdp-tls
- grdctl --system rdp set-tls-key ~gnome-remote-desktop/rdp-tls.key
- grdctl --system rdp set-tls-cert ~gnome-remote-desktop/rdp-tls.crt
- grdctl --system rdp set-credentials ubuntu <your-password>
- echo ubuntu:<your-password> | sudo chpasswd
- echo /usr/sbin/nologin >> /etc/shells
- grdctl --system rdp enable
- systemctl enable --now gnome-remote-desktop.service
- systemctl enable --now gdm
- sudo systemctl set-default graphical.target
- loginctl enable-linger ubuntu
115 changes: 110 additions & 5 deletions docs/how-to-guides/customise-multipass/set-up-a-graphical-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,34 @@ You can display the graphical desktop in various ways. In this document, we desc

## Using RDP

The images used by Multipass do not come with a graphical desktop installed. For this reason, you will have to install a desktop environment (here we use `ubuntu-desktop` but there are as many other options as flavours of Ubuntu exist) along with the RDP server (we will use `xrdp` but there are also other options such as `freerdp`).
The images used by Multipass do not come with a graphical desktop installed. For this reason, you will have to install a desktop environment. Here, we use `ubuntu-desktop` but there are as many other options as flavours of Ubuntu exist. You also have to install the RDP server. We will use XRDP or GNOME Remote Desktop but there are also other options such as FreeRDP.

To do this, first you need to log into a running Multipass instance. Start by listing your instances:
### Which RDP server to use

Ubuntu 25.10 with GNOME removed support for the X11 protocol, and as a consequence, XRDP no longer works there. Choose the RDP server depending on the Ubuntu release and the desktop on your instance:

```{list-table}
:header-rows: 1

* - Instance
- RDP server

* - Earlier than Ubuntu 25.10
- {ref}`set-up-the-xrdp-server`

* - Ubuntu 25.10 and later with GNOME
- {ref}`set-up-the-gnome-remote-desktop-server`

* - Ubuntu 25.10 and later with KDE, Xfce or other alternative desktop
- {ref}`set-up-the-xrdp-server`
```

(set-up-the-xrdp-server)=
### Set up the XRDP server

Use this RDP server with Ubuntu Desktop earlier than version 25.10 as your instance, such as Ubuntu Desktop 24.04 LTS. You can also use XRDP with alternative desktops such as KDE or Xfce regardless of the Ubuntu release.

First, you need to log into a running Multipass instance. Start by listing your instances:

```{code-block} text
multipass list
Expand Down Expand Up @@ -50,9 +75,83 @@ sudo passwd ubuntu

You will be asked to enter and re-enter a password.

You are done on the server side!
You are done on the server side! Quit the Ubuntu shell on the running instance with the `exit` command. Proceed to {ref}`connect-to-the-instance-with-an-rdp-client`.

(set-up-the-gnome-remote-desktop-server)=
### Set up the GNOME Remote Desktop server

This RDP server only works with the default GNOME desktop. You can use it with Ubuntu Desktop 25.10, 26.04 LTS and later as your instance.

1. Create the following `cloud-init.yaml` configuration file:

```{code-block} yaml
:caption: cloud-init.yaml
:emphasize-lines: 14,15

package_update: true
package_upgrade: true
users:
- default
packages:
- ubuntu-desktop
- gnome-remote-desktop
- winpr3-utils
runcmd:
- sudo -u gnome-remote-desktop winpr-makecert3 -silent -rdp -path ~gnome-remote-desktop rdp-tls
- grdctl --system rdp set-tls-key ~gnome-remote-desktop/rdp-tls.key
- grdctl --system rdp set-tls-cert ~gnome-remote-desktop/rdp-tls.crt
- grdctl --system rdp set-credentials ubuntu <your-password>
- echo ubuntu:<your-password> | sudo chpasswd
- echo /usr/sbin/nologin >> /etc/shells
- grdctl --system rdp enable
- systemctl enable --now gnome-remote-desktop.service
- systemctl enable --now gdm
- sudo systemctl set-default graphical.target
- loginctl enable-linger ubuntu
```

Replace `<your-password>` with a secure password on the highlighted lines.

Quit the Ubuntu shell on the running instance with the `exit` command, and take note of the IP address to connect to. You can find the instance's IP address in the output of `multipass list` from the first step above, or you can use the `multipass info` command as well.
1. Launch the configured Multipass instance:

```text
multipass launch \
--memory 12G \
--cpus=2 \
--disk 30G \
--timeout 600 \
--cloud-init ./cloud-init.yaml 25.10
```

Adjust the `--memory`, `--cpus` and `--disk` options as needed on your system.

The command sets the timeout to 10 minutes because the default timeout of 5 minutes isn't enough to initialise the instance.

1. List your instances:

```text
multipass list
```

Sample output:

```text
Name State IPv4 Image
headbanging-squid Running 10.49.93.209 Ubuntu 25.10
```

1. Restart the Multipass instance:

```text
multipass restart headbanging-squid
```

1. Proceed to {ref}`connect-to-the-instance-with-an-rdp-client`.

(connect-to-the-instance-with-an-rdp-client)=
### Connect to the instance with an RDP client

Find the instance's IP address in the output of `multipass list`, or you can use the `multipass info` command:

```{code-block} text
multipass info headbanging-squid
Expand Down Expand Up @@ -84,14 +183,20 @@ If the IP address of the instance is not displayed in the output of `multipass l

````{group-tab} Linux

On Linux, there are applications such as Remmina to visualise the desktop (make sure the package `remmina-plugin-rdp` is installed in your host along with `remmina`).
On Linux, there are applications such as Remmina to visualise the desktop.

Make sure that the `remmina` and `remmina-plugin-rdp` packages are installed.

To directly launch the client, run the following command:

```{code-block} text
remmina -c rdp://10.49.93.209
```

```{note}
To enable audio, open the Remmina application instead of connecting directly. Create a connection and set {guilabel}`Audio output mode` to {guilabel}`Local` in Advanced settings. Confirm with {guilabel}`Save and Connect`.
```

The system will ask for a username (`ubuntu`) and the password set above, and then the Ubuntu desktop on the instance will be displayed.

```{figure} /images/multipass-remmina.png
Expand Down