Skip to content

Commit 03e4854

Browse files
committed
[docs] Alternative RDP procedure working with Wayland
1 parent 2eb4538 commit 03e4854

File tree

1 file changed

+86
-5
lines changed

1 file changed

+86
-5
lines changed

docs/how-to-guides/customise-multipass/set-up-a-graphical-interface.md

Lines changed: 86 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ You can display the graphical desktop in various ways. In this document, we desc
1414

1515
## Using RDP
1616

17-
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`).
17+
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`.
1818

19-
To do this, first you need to log into a running Multipass instance. Start by listing your instances:
19+
### Set up the XRDP server
20+
21+
First, you need to log into a running Multipass instance. Start by listing your instances:
2022

2123
```{code-block} text
2224
multipass list
@@ -50,9 +52,78 @@ sudo passwd ubuntu
5052

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

53-
You are done on the server side!
55+
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`.
56+
57+
### Set up the GNOME Remote Desktop server
58+
59+
1. Create the following `cloud-init.yaml` configuration file:
60+
61+
```{code-block} yaml
62+
:caption: cloud-init.yaml
63+
:emphasize-lines: 13,14
64+
65+
package_update: true
66+
package_upgrade: true
67+
users:
68+
- default
69+
packages:
70+
- ubuntu-desktop
71+
- gnome-remote-desktop
72+
- winpr3-utils
73+
runcmd:
74+
- sudo -u gnome-remote-desktop winpr-makecert3 -silent -rdp -path ~gnome-remote-desktop rdp-tls
75+
- sudo -u gnome-remote-desktop grdctl --headless rdp set-tls-key ~gnome-remote-desktop/rdp-tls.key
76+
- sudo -u gnome-remote-desktop grdctl --headless rdp set-tls-cert ~gnome-remote-desktop/rdp-tls.crt
77+
- sudo -u gnome-remote-desktop grdctl --headless rdp set-credentials ubuntu <your-password>
78+
- echo ubuntu:<your-password> | sudo chpasswd
79+
- echo /usr/sbin/nologin >> /etc/shells
80+
- sudo -u gnome-remote-desktop grdctl --headless rdp enable
81+
- systemctl --user enable --now gnome-remote-desktop-headless.service
82+
- sudo systemctl set-default graphical.target
83+
- loginctl enable-linger ubuntu
84+
```
85+
86+
Replace `<your-password>` with a secure password on the highlighted lines.
87+
88+
1. Launch the configured Multipass instance:
89+
90+
```text
91+
multipass launch \
92+
-vvvv
93+
--memory 12G \
94+
--cpus=2 \
95+
--disk 30G \
96+
--timeout 600 \
97+
--cloud-init ./cloud-init.yaml 25.10
98+
```
99+
100+
The command sets the timeout to 10 minutes because the default timeout of 5 minutes isn't enough to initialise the instance.
101+
102+
1. List your instances:
103+
104+
```text
105+
multipass list
106+
```
107+
108+
Sample output:
54109

55-
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.
110+
```text
111+
Name State IPv4 Image
112+
headbanging-squid Running 10.49.93.209 Ubuntu 25.10
113+
```
114+
115+
1. Restart the Multipass instance:
116+
117+
```text
118+
multipass restart headbanging-squid
119+
```
120+
121+
1. Proceed to {ref}`connect-to-the-instance-with-an-rdp-client`.
122+
123+
(connect-to-the-instance-with-an-rdp-client)=
124+
### Connect to the instance with an RDP client
125+
126+
Find the instance's IP address in the output of `multipass list`, or you can use the `multipass info` command:
56127

57128
```{code-block} text
58129
multipass info headbanging-squid
@@ -84,14 +155,24 @@ If the IP address of the instance is not displayed in the output of `multipass l
84155
85156
````{group-tab} Linux
86157
87-
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`).
158+
On Linux, there are applications such as Remmina to visualise the desktop.
159+
160+
Make sure that the Remmina packages are installed:
161+
162+
```text
163+
sudo apt install remmina remmina-plugin-rdp
164+
```
88165
89166
To directly launch the client, run the following command:
90167
91168
```{code-block} text
92169
remmina -c rdp://10.49.93.209
93170
```
94171
172+
```{note}
173+
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`.
174+
```
175+
95176
The system will ask for a username (`ubuntu`) and the password set above, and then the Ubuntu desktop on the instance will be displayed.
96177
97178
```{figure} /images/multipass-remmina.png

0 commit comments

Comments
 (0)