-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrdp.html
More file actions
229 lines (153 loc) · 8.25 KB
/
rdp.html
File metadata and controls
229 lines (153 loc) · 8.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<script src="md-page.js"></script><noscript>
# Remote Desktop Protocol (RDP) is better than VNC, Virtual Box, QEMU etc.
# RDP features
* Resizing the window of the freerdp RDP client changes the resolution of the RDP server. If you use the RDP client rdcman, resize the window of rdcman, then reconnect the RDP connection. The xfreerdp command line parameter is "/dynamic-resolution".
* Copy/paste of text works OK.
* YouTube playback with almost acceptable speed and with sound. The xfreerdp command line parameter is "/video /rfx /gfx /sound:sys:pulse".
* The speed is so good, that I do most of my work via an RDP connection. Everything is snappy, even using an Integrated Development Environment (IDE). The xfreerdp command line parameter is "/network:lan".
* The home directory from the machine where the RDP client runs can be made available to the machine where the RDP server runs via Samba or Windows shares (the share named "\\\\tsclient"). The xfreerdp command line parameter is "+home-drive".
# Glossary
RDP is the Remote Desktop Protocol. https://en.wikipedia.org/wiki/Remote_Desktop_Protocol
# 1. How to install and use an RDP server
There are 3 RDP servers: xrdp; the RDP server builtin to Windows; the RDP server builtin to GNOME desktop.
# 1.1. GNOME >= 50, Ubuntu >= 26.04, Fedora Workstation >= 44
GNOME Settings app > System > Remote Desktop > "Remote Login" tab > enable checkbox "Remote Login", under the "Login Details" groupbox, set a user and password. You can use the Linux user name and the Linux user password.
Probably remote sound is not implemented yet.
Restart the computer.
Screen recordings https://www.youtube.com/watch?v=oelT312LqFI , https://www.youtube.com/watch?v=xjfC4GGI7_w
# 1.2. How to install the RDP server xrdp
Screen recordings https://www.youtube.com/@nmariusp/search?query=xrdp
Linux and FreeBSD RDP server xrdp
If you cannot make your X server work correctly, e.g. small resolution. An alternative is to install an RDP server and to connect to this computer from another computer using an RDP client.
Note: on the RDP server, you should log out if you use X11 and you are connected via the computer's keyboard and mouse (aka Ctrl+Alt+F1, aka one of the 8 virtual consoles). Before connecting using an RDP client.
## Kubuntu >= 25.10
Screen recording https://www.youtube.com/watch?v=mVP_PFbVCdo
<pre>
sudo apt install plasma-session-x11 xrdp xorgxrdp
</pre>
## Fedora KDE >= 43
Screen recording https://www.youtube.com/watch?v=c10rYXXE9lc
<pre>
sudo dnf install plasma-workspace-x11
sudo dnf install xrdp xorgxrdp
# Edit file /etc/xrdp/xrdp.ini, uncomment the entire section "[Xorg]".
sudo systemctl enable --now xrdp
</pre>
## EndeavourOS with KDE Plasma installed from the OS installer, Arch Linux installed using archinstall, from archinstall select the KDE Plasma desktop
Screen recording https://www.youtube.com/watch?v=qu6z-X_hngI , https://www.youtube.com/watch?v=NtOaWotMRms , https://www.youtube.com/watch?v=zKGC6ct2_3I
If yay is not installed, such as in Arch Linux, install yay from AUR https://aur.archlinux.org/packages/yay https://wiki.archlinux.org/title/Arch_User_Repository :
<pre>
sudo pacman -S base-devel go git
mkdir -p ~/work/aur ; cd ~/work/aur
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg
sudo pacman -U yay*.pkg.tar.zst # E.g. yay-11.3.2-1-x86_64.pkg.tar.zst
</pre>
Then:
<pre>
# We need the KDE Plasma X11 session.
sudo pacman -S plasma-x11-session
# Reboot and log into the KDE Plasma X11 session.
# As per https://wiki.archlinux.org/title/xrdp
yay xrdp
yay xorgxrdp
sudo systemctl enable --now xrdp
cat /etc/X11/Xwrapper.config
# Should say:
allowed_users = anybody
cat ~/.xinitrc
# Should say:
export DESKTOP_SESSION=plasma
/usr/lib/plasma-dbus-run-session-if-needed startplasma-x11
</pre>
## openSUSE Tumbleweed
Screen recording https://www.youtube.com/watch?v=AKIfsZao1u0
In the installer I have selected "Desktop with KDE Plasma", I have disabled the firewall and enabled the ssh server.
I connect using ssh and run:
<pre>
sudo zypper install xrdp xorgxrdp
sudo systemctl enable --now xrdp
</pre>
Edit the file <code>/etc/xrdp/xrdp.ini</code> and comment out all the lines starting with the line <code>[Xvnc]</code> and ending with the line before the line <code>[Xorg]</code>. Note: the line <code>[Xorg]</code> should not be commented out.
This makes it such that when you connect using an RDP client app, the "Session" combobox has the correct item "Xorg" selected by default.
If the KDE Plasma X11 session is not started automatically, create the file ~/.xinitrc with the content:
<pre>
startplasma-x11
</pre>
## FreeBSD >= 14.3
Screen recordings https://www.youtube.com/@nmariusp/search?query=freebsd%20xrdp
I installed FreeBSD 14.3, see the FreeBSD chapter from [install-os.html](install-os.html) .
<pre>
pkg install xrdp xorgxrdp
sysrc xrdp_enable="YES"
sysrc xrdp_sesman_enable="YES"
# Create file ~/startwm.sh with content:
exec dbus-launch --exit-with-x11 ck-launch-session startplasma-x11
chmod +x ~/startwm.sh
pkg install firefox
# Restart the computer.
</pre>
## Alpine Linux
Screen recording https://www.youtube.com/watch?v=d9WXHMfBDT0
I installed Alpine Linux 3.18 using alpine-standard-3.18.2-x86_64.iso. As per https://docs.alpinelinux.org/user-handbook/0.1a/index.html , using full setup-alpine, use default mirror, add "community" repository.
In the installer, I created a user named "administrator" and the user can use "doas".
I connect to the VM in text user interface mode using ssh:
<pre>
ssh administrator@192.68.122.6
doas su
# Surviving at the command line: bash, emacs-nox, mc, git.
apk update
apk upgrade
apk add emacs-nox mc git bash
#chsh -s /bin/bash
# Surviving in GUI:
setup-xorg-base
# I do not install alpine-desktop, I install KDE Plasma desktop as per https://wiki.alpinelinux.org/wiki/KDE
apk add plasma elogind polkit-elogind
rc-update add dbus
rc-update add elogind
rc-update add polkit
setup-devd udev
rc-update add sddm
rc-service sddm start
# Install xrdp and xorgxrdp per https://wiki.alpinelinux.org/wiki/Remote_Desktop_Server
apk add xrdp xorgxrdp
rc-update add xrdp
rc-update add xrdp-sesman
# Create file ~/.xinitrc with content:
exec startplasma-x11
reboot
</pre>
# 1.3. Windows RDP server
On the Windows OS you can enable the RDP server. E.g. right click on Windows Start Menu > System > Rename this PC (advanced) > tab "Remote" > Remote Desktop groupbox > enable "Allow remote connections to this computer". On Windows Server without full GUI experience > sconfig.cmd.
# 2. How to install and use an RDP client
Possible RDP clients: freerdp started from the command line, GUI apps such as Remmina, the RDP client that is builtin to Windows (mstsc.exe), Microsoft SysInternals Suite rdcman, Android RDP clients.
# 2.1. Linux and FreeBSD client xfreerdp
The name of the executable of the GUI app RDP client might be: xfreerdp, wlfreerdp, xfreerdp3, wlfreerdp3.
Install from your OS the binary package that contains that executable file. E.g. on Kubuntu >= 25.10 `apt install freerdp3-x11`.
Run:
<pre>
xfreerdp3 --help
</pre>
Note down any of the command line parameters that you might need.
Use a command line like:
<pre>
# For FreeRDP 3:
xfreerdp3 /u:.\\administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse
# Or for FreeRDP 2:
xfreerdp /u:administrator /w:1920 /h:1080 /v:192.168.122.168 /video /rfx /network:lan /gfx /dynamic-resolution /sound:sys:pulse
</pre>
Make sure that in the "Session" combo box "Xorg" is selected. Not something else such as "Xvnc".
You can resize the window and the resolution of the RDP server will change correctly.
Other interesting command line parameters:
<pre>
+home-drive
</pre>
# 2.2. Windows RDP client
Open the app Remote Desktop Connection.
Or install another RDP client e.g. "Sysinternals Remote Desktop Connection Manager" (rdcman) https://en.wikipedia.org/wiki/Remote_Desktop_Protocol
I prefer to use the app "Sysinternals Remote Desktop Connection Manager" because I need the RDP client to have a window titlebar and window border, I can hide the menu, and after I resize the window, if I select to reconnect, the RDP server's resolution will be changed correctly.
Video https://www.youtube.com/watch?v=YK1NHeQgjP8
# 3. Operating systems that do not have an RDP server
I use a [VNC server](vnc.html) such as TigerVNC.