- DESCRIPTION
- OPTIONS
- Xrdp
- Installation
- Xorg backend
- Usage
- Tips and tricks
- Autostart at boot
- Graphical acceleration
- Sound
- Non-root user
- Troubleshooting
- Black box around cursor
- Black screen
- Black screen with a desktop environment
- loginctl or systemctl —user not working
- Prompts for gnome-keyring or KDE Wallet
- Prevent autostart items from starting
- No sound
- Two-finger scrolling is too fast
- See also
- Remmina
- Usage
- See also
- Rdesktop
- Installation
- Usage
- Tips and tricks
- Automatic scaling of geometry
- Remote desktop using NetBIOS names instead of using IP address
- Supplying missing cursors
- Troubleshooting
- Failed to initialize NLA
- See also
DESCRIPTION
xfreerdp is an X11 Remote Desktop Protocol (RDP) client which is part of the FreeRDP project. An RDP server is built-in to many editions of Windows. Alternative servers included xrdp and VRDP (VirtualBox).
OPTIONS
/a:addin[,options], /addin:addin[,options]
/action-script:file-name
/app:path or ||alias
/app-cmd:parameters
/app-file:file-name
/app-icon:icon-path
/app-workdir:workspace path
/assistance:password
/auto-reconnect-max-retries:retries
/cert:[deny,ignore,name:name,tofu,fingerprint:hash:hash as hex[,fingerprint:hash:another hash]]
Certificate accept options. Use with care! * deny . Automatically abort connection if the certificate does not match, no user interaction. * ignore . Ignore the certificate checks altogether (overrules all other options) * name . Use the alternate
[deprecated, use /cert:deny] Automatically abort connection for any certificate that can not be validated.
/client-build-number:number
/client-hostname:name
/clipboard:[use-selection:atom]
Redirect clipboard. * use-selection:
/codec-cache:[rfx|nsc|jpeg]
/compression-level:level
+credentials-delegation
/drive:name,path
Redirect directory
/dvc:channel[,options]
/encryption-methods:[40,][56,][128,][FIPS]
/floatbar[:sticky:[on|off],default:[visible|hidden],show:[always|fullscreen||window]]
/g:gateway[:port]
/gateway-usage-method:[direct|detect], /gum:[direct|detect]
Xrdp
xrdp is a daemon that supports Microsoft’s Remote Desktop Protocol (RDP). It uses Xvnc or xorgxrdp as a backend.
Installation
Install the xrdp AUR package (or alternatively xrdp-git AUR for the development version). This only supports Xvnc as the backend.
Xorg backend
To use xorgxrdp instead for the backend, install the xorgxrdp AUR package.
Usage
First, start the xrdp service. You should be able to connect an RDP client to the host on the default RDP port (3389). If successful, you will be greeted with the xrdp session manager window which allows you to choose between Xorg or Xvnc sessions and provides inputs for user authentication. The session manager UI can be highly customized by modifying /etc/xrdp/xrdp.ini .
The parameters used to start Xorg and Xvnc display servers can be configured in /etc/xrdp/sesman.ini .
After successfully starting a display server, xrdp will execute /etc/xrdp/startwm.sh by default. This script is meant to start a window manager (similar to .xinitrc) and will read from ~/.xinitrc or /etc/X11/xinit/xinitrc if they exist. It is recommended to edit ~/.xinitrc to start your desktop environment or window manager, but you can also edit /etc/xrdp/startwm.sh .
If you just close the session window and RDP connection, you can access the same session again next time you connect with RDP. When you exit the window manager or desktop environment from the session window, the session will close and a new session will be opened the next time.
Tips and tricks
Autostart at boot
The xrdp AUR package contains service files for systemd. Enable xrdp.service .
Graphical acceleration
For Xorg sessions, you can enable OpenGL and Vulkan graphical acceleration by installing xorgxrdp-glamor AUR for Intel and AMD GPUs and xorgxrdp-nvidia AUR for Nvidia GPUs.
Sound
Non-root user
Include the following lines in Xwrapper.config :
allowed_users=anybody needs_root_rights=no
If the above lines are not present, the remote desktop connection from applications like Remmina will start with an empty screen.
Troubleshooting
Black box around cursor
If you encounter black box around mouse pointer create ~/.Xresources-xrdp with line Xcursor.core:1 and load it in ~/.xinitrc like
xrdb ~/.Xresources-xrdp exec startlxde
Black screen
You may get a black screen after logging into the session manager if your ~/.xinitrc has —exit-with-session set in the dbus_args .
Try copying ~/.xinitrc to ~/.xrdpinitrc , removing —exit-with-session , and updating /etc/xrdp/startwm.sh to call ~/.xrdpinitrc instead of ~/.xinitrc . You might need to append your desktop environment to the call to .xrdpinitrc, as is mentioned in ~/.xinitrc; eg. . ~/.xrdpinitrc xfce .
Black screen with a desktop environment
If you get a black screen and you use a desktop environment, it may be a result of D-Bus not being properly initialized. Some DEs (like KDE Plasma) might also be able to restore fully working applications/windows from a previous session, which makes it seem that «only plasmashell» is missing.
Try running the desktop environment with dbus-launch —exit-with-session in your ~/.xinitrc file. For KDE Plasma, you can use the command /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11 or dbus-launch —exit-with-session startplasma-x11 .
loginctl or systemctl —user not working
Try commenting out all the references to systemd-home in /etc/pam.d/system-auth . See this issue.
Prompts for gnome-keyring or KDE Wallet
If you are prompted to login to gnome-keyring or [KDE Wallet] when your session starts, modify the file /etc/pam.d/xrdp-sesman as follows:
#%PAM-1.0 auth include system-remote-login -auth optional pam_gnome_keyring.so -auth optional pam_kwallet5.so account include system-remote-login password include system-remote-login -password optional pam_gnome_keyring.so use_authtok session optional pam_keyinit.so force revoke session include system-remote-login -session optional pam_gnome_keyring.so auto_start -session optional pam_kwallet5.so auto_start
If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa.
Prevent autostart items from starting
To prevent user defined ~/.config/autostart items from starting you can set the autostart directory param on the session in the ~/.xinitrc to use only the global /etc/xdg/autostart directory.
No sound
This could be a symptom of an issue with loginctl, so try that fix above. The following error may be encountered in the system journal:
Failed to load module «module-x11-publish» (argument: «display=:10.0 xauthority /title/Disable» title=»Disable»>disable the user unit files pulseaudio.service and pulseaudio.socket either for your own user or for all users, and make PulseAudio start when needed by setting autospawn to yes in /etc/pulse/client.conf .
If sound still does not work, try manually starting PulseAudio with pulseaudio & in your ~/.xinitrc .
Two-finger scrolling is too fast
Use the xorg backend, make sure xorgxrdp is 0.9.19 or newer. Then add XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes to the [SessionVariables] section of /etc/xrdp/sesman.ini .
See also
- TigerVNC — VNC, an alternative to RDP, also used as backend here.
- freerdp a rdesktop fork that supports RDP 7.1 features including network level authentication (NLA). It primarily consists of the xfreerdp client. In addition, the freerdp-shadow-cli command provides a quick and easy way to start an RDP server.
Remmina
Note: If one of the protocols (e.g. RDP) is not available in the Remmina dropdown menu after installing the required package, make sure to completely quit Remmina first: run killall remmina . When you restart Remmina, the protocol should be available.
Usage
Remmina configuration files:
$/remmina.pref or $/remmina/remmina.pref
At the first Remmina execution the system wide Remmina configuration files, will be copied in the $
Remmina connection profiles are saved connection to connect to your servers, the file name is autogenerated, but you can create manually your own files with the FILE name you prefer. It’s possible to specify a custom profile name and location.
$/FILE.remmina or $/remmina/FILE.remmina
To connect using an exisitng connection profile use:
To quick connect using a URI:
To quick connect using a URI along with an encrypted password:
remmina -c rdp://username:encrypted-password@server remmina -c vnc://username:encrypted-password@server remmina -c vnc://server?VncUsername=username\&VncPassword=encrypted-password
To encrypt a password for use with a URI:
To update username and password and set a different resolution mode of a remmina connection profile use:
echo "ausernamenapassword" | remmina --update-profile /PATH/TO/FOO.remmina --set-option username --set-option resolution_mode=2 --set-option password
See also
Rdesktop
Note: The upstream rdesktop project is looking for a new maintainer. In the meantime, it is advised to use the other branch of the project called freerdp , actively maintained. See here for an explanation on the history of both projects and see how they are tied together.
rdesktop is a free, open source client for Microsoft’s proprietary RDP protocol released under the GNU General Public License. Use rdesktop to connect to Windows RDP server to remotely administrate the Windows box.
As of July 2008, rdesktop implements a large subset of the RDP 5 protocol, including:
- Bitmap caching
- File system, audio, serial port and printer port redirection
- Mappings for most international keyboards
- Stream compression and encryption
- Automatic authentication
- Smartcard support
- RemoteApp like support called «seamless» mode via SeamlessRDP
Support for the additional features available in RDP 5.1 and RDP 6 (including multi-head display spanning and window composition) also have not yet been implemented.
Installation
Usage
For a complete listing of options see rdesktop(1) . Here is a typical line:
$ rdesktop -g 1440x900 -P -z -x l -r sound:off -u windowsuser 98.180.102.33:3389
Reading from left to right:
-g 1440×900 | Sets the resolution of the display to 1440×900 |
-P | Enables bitmap caching/speeds up xfers. |
-z | Enables RDP datastream compression |
-x l | Uses the «lan» quality experience level, see rdesktop(1) § x |
-r sound:off | Redirects sound generated on the server to null |
-u windowsuser | This defines the username to use when logging into the Windows box |
98.180.102.33:3389 | This is the IP address and port number of the target machine |
Tips and tricks
Automatic scaling of geometry
In order to automatically scale the geometry to fit the screen, one can use the -g command line option. Either by using percentage:
$ rdesktop -g 100% -P -z 98.180.102.33:3389
-g $(xrandr -q | awk '/Screen 0/ ' | sed 's/,//g')
Remote desktop using NetBIOS names instead of using IP address
If you do not know the IP address of a Windows computer in a network, you have to enable wins support. To do so, you have to install samba. To enable wins in samba add the following line:
Then you have to install winbind, then edit the /etc/nsswitch.conf and add the «wins» to the list of hosts.
Restart smb and nmb services and test your success by pinging a Windows NetBIOS host.
Supplying missing cursors
Troubleshooting
Failed to initialize NLA
When trying to remote desktop into a Windows 10 or Windows 11 host, you might get this error:
Failed to initialize NLA, do you have correct Kerberos TGT initialized ? Failed to connect, CredSSP required by server (check if server has disabled old TLS versions, if yes use -V option)
If you own or have admin access to the host, you can work around this issue by allowing clients to connect without NLA. Search rdp disable nla for instructions. Note that this might introduce security issues on a public-facing host, so use this with caution.
See also
- rdesktop official homepage
- freerdp a rdesktop fork that supports RDP 7.1 features including network level authentication (NLA). See also [1].