-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrdp.html
241 lines (170 loc) · 7.92 KB
/
rdp.html
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
230
231
232
233
234
235
236
237
238
239
240
241
<script src="md-page.js"></script><noscript>
# Remote Desktop Protocol (RDP) is better than VNC, Virtual Box, QEMU etc.
# How to install the RDP server xrdp
Screen recordings https://www.youtube.com/@nmariusp/search?query=xrdp
# Glossary
RDP is the Remote Desktop Protocol. https://en.wikipedia.org/wiki/Remote_Desktop_Protocol
OS means operating system.
# 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".
# 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 >= 22.10
Screen recording https://www.youtube.com/watch?v=kG2sjP1VTV4
<pre>
sudo apt install xrdp xorgxrdp
</pre>
## Fedora >= 38
Screen recording https://www.youtube.com/watch?v=Doj8VpTLShs
<pre>
sudo dnf install plasma-workspace-x11 # Needed on Fedora KDE 40.
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 6 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
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>
# 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=tlMefsBArO4
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>
If the KDE Plasma X11 session is not started automatically, create the file ~/.xinitrc with the content:
<pre>
startplasma-x11
</pre>
## FreeBSD >= 13.2
Screen recording https://www.youtube.com/watch?v=8MqBnb3Y9JU
I installed FreeBSD 13.2 using FreeBSD-13.2-RELEASE-amd64-disc1.iso.
In the installer, I created a user named "administrator" and added this user to the user group "wheel".
I connect to the VM in text user interface mode using ssh:
<pre>
su -
# Surviving at the command line:
pkg # Install the pkg command line app.
pkg install bash emacs-nox mc git
chsh -s /usr/local/bin/bash
# Surviving in GUI:
pkg install xorg
pw groupmod video -m administrator
pkg install noto-2.0 sudo
EDITOR=emacs visudo
# uncomment line:
%wheel ALL=(ALL:ALL) ALL
# We are inside emacs. Save the modified file: Ctrl+X S, Ctrl+X C.
# In file /etc/fstab append line:
emacs /etc/fstab
proc /proc procfs rw 0 0
# We are inside emacs. Save the modified file: Ctrl+X S, Ctrl+X C.
mount -a
pkg install kde5
sysrc dbus_enable="YES"
sysctl net.local.stream.recvspace=65536
sysctl net.local.stream.sendspace=65536
# I followed the instructions from https://download.freebsd.org/doc/en/books/handbook/handbook_en.pdf up to and including the chapter "7.2.1.4. Start KDE Plasma".
# As user administrator:
chsh -s /usr/local/bin/bash
emacs ~/.profile
# Uncomment the line:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH
# Save and exit the text editor.
# Restart the computer.
pkg install xrdp xorgxrdp
sysrc xrdp_enable="YES"
sysrc xrdp_sesman_enable="YES"
# Create file ~/startwm.sh with content:
exec 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>
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>
# Linux and FreeBSD client xfreerdp
Install from your OS the binary package `freerdp`.
Run:
<pre>
xfreerdp --help
</pre>
Note down any of the command line parameters that you might need.
Use a command line like:
<pre>
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>
# 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.
# 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.
# Operating systems that do not have an RDP server such as xrdp
OpenBSD and NetBSD do not run the xrdp RDP server yet. I install the VNC server tigervnc.
Screen recording https://www.youtube.com/watch?v=xqjCF4mVdg0 , https://www.youtube.com/watch?v=eG2KcljSHRA
macOS has a builtin non standard VNC server. https://help.ubuntu.com/community/AppleRemoteDesktop