To use xRDP for a Windows Remote Desktop connection to Manjaro Linux, you need to install and configure xRDP on your Manjaro system. Here are the steps you need to follow:
-
Enable AUR support: Manjaro Linux does not support xRDP out of the box. You need to enable AUR (Arch User Repository) support to install xRDP. You can do this by selecting “Add or Remove Software” → Preferences → AUR → Enable AUR support[2].
-
Install xrdp & xorgxrdp-git: Install the latest packages of xrdp and xorgxrdp-git from the AUR[2].
-
Configure xrdp: Enable the xrdp service and xrdp-sesman service using the following commands:
sudo systemctl enable xrdp.service
sudo systemctl enable xrdp-sesman.service
Then, allow any user to start an X session by adding “allowed_users=anybody” to the /etc/X11/Xwrapper.config file:
sudo echo “allowed_users=anybody” >> /etc/X11/Xwrapper.config
Next, edit the ~/.xinitrc file. Comment the line exec $(get_session "$1")
and add the following line to the end of the file:
exec dbus-launch --sh-syntax startplasma-x11
This command starts the KDE Plasma desktop. If you’re using a different desktop environment, you’ll need to modify this command accordingly[2].
- Reboot & connect from Windows RDP client: After making these changes, reboot your Manjaro system. You can then connect to it from your Windows system using the Remote Desktop client[2].
Please note that xRDP does not currently support Network Level Authentication (NLA). If your local RDP client uses NLA, you may need to disable that connection setting[1]. If you encounter any issues, you can troubleshoot by using the netstat
command on your Linux VM to verify that your VM is listening for RDP connections[1].
Citations: [1] https://learn.microsoft.com/en-us/azure/virtual-machines/linux/use-remote-desktop [2] https://rajasekaranp.medium.com/how-to-setup-xrdp-in-manjaro-linux-e176b22bd347 [3] https://forum.manjaro.org/t/using-remote-desktop-connection-to-connect-manjaro-installed-with-xrdp-faile-because-of-error-connecting-to-user-session/124437 [4] https://www.digitalocean.com/community/tutorials/how-to-enable-remote-desktop-protocol-using-xrdp-on-ubuntu-22-04 [5] https://www.adamlabay.net/2022/04/15/xrdp-on-manjaro-the-easy-way-when-it-works/ [6] https://bbs.archlinux.org/viewtopic.php?id=248471 [7] https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-18-04/ [8] https://www.reddit.com/r/ManjaroLinux/comments/s99lay/cant_install_xrdp/ [9] https://forum.manjaro.org/t/xrdp-and-xfce-authentication-windows/90416 [10] https://askubuntu.com/questions/234856/unable-to-do-remote-desktop-using-xrdp [11] https://forum.manjaro.org/t/install-xrdp-server-in-kde-but-it-doesnt-work/116475 [12] https://forum.manjaro.org/t/xrdp-fails-to-connect/134154 [13] https://linuxkamarada.com/en/2020/04/29/remote-desktop-connection-to-linux-from-windows-using-the-xrdp-server/ [14] https://www.adamlabay.net/2021/08/28/xrdp-on-manjaro-fixing-the-blank-screen-issue/ [15] https://forum.manjaro.org/t/rdp-or-vnc-from-windows-to-my-manjaro/65190 [16] https://www.ed.ac.uk/files/atoms/files/connecting_to_xrdp_from_windows_0.pdf [17] https://forum.manjaro.org/t/xrdp-installation-fails/145631 [18] https://github.com/neutrinolabs/xrdp/issues/1456 [19] https://phoenixnap.com/kb/debian-remote-desktop [20] https://forum.manjaro.org/t/how-to-configure-xrdp-xfreerdp/15110 [21] https://youtube.com/watch?v=1CLqxI7UTas [22] https://forum.manjaro.org/t/xrdp-server-on-manjaro/47433
Based on your request, here is a bash script that automates the process of installing and configuring xRDP on Manjaro Linux with the Cinnamon desktop environment. This script assumes that you have sudo privileges and that the AUR (Arch User Repository) is already enabled on your system.
#!/bin/bash # Function to install and configure xRDP configure_xrdp() { # Update system echo "Updating system..." sudo pacman -Syu # Install xrdp and xorgxrdp-git from AUR echo "Installing xrdp and xorgxrdp-git..." yay -S xrdp xorgxrdp-git # Enable xrdp and xrdp-sesman services echo "Enabling xrdp services..." sudo systemctl enable xrdp.service sudo systemctl enable xrdp-sesman.service # Allow any user to start an X session echo "Configuring Xwrapper..." echo "allowed_users=anybody" | sudo tee -a /etc/X11/Xwrapper.config # Configure .xinitrc file for Cinnamon desktop echo "Configuring .xinitrc..." sed -i 's/#exec $(get_session "$1")/exec dbus-launch --sh-syntax cinnamon-session-cinnamon2d/g' ~/.xinitrc # Reboot system echo "Rebooting system..." sudo reboot } # Call the function configure_xrdp
To use this script, save it to a file, for example
configure_xrdp.sh
, then make it executable with the commandchmod +x configure_xrdp.sh
. Finally, run the script with./configure_xrdp.sh
.Please note that this script will reboot your system at the end to ensure that all changes take effect. Make sure to save any open work before running this script[1][3][7].
Citations: [1] https://rajasekaranp.medium.com/how-to-setup-xrdp-in-manjaro-linux-e176b22bd347 [2] https://www.linuxquestions.org/questions/linux-newbie-8/automatically-run-sudo-bash-script-after-each-xrdp-login-4175635517/ [3] https://www.adamlabay.net/2022/04/15/xrdp-on-manjaro-the-easy-way-when-it-works/ [4] https://askubuntu.com/questions/133343/how-do-i-set-up-xrdp-session-that-reuses-an-existing-session [5] https://forum.manjaro.org/t/how-to-configure-xrdp-xfreerdp/15110 [6] https://github.com/neutrinolabs/xrdp/issues/1456 [7] https://www.adamlabay.net/2021/08/28/xrdp-on-manjaro-fixing-the-blank-screen-issue/ [8] https://unix.stackexchange.com/questions/389005/using-xrdp-without-local-vnc-server [9] https://forum.manjaro.org/t/xrdp-server-on-manjaro/47433 [10] https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine [11] https://www.reddit.com/r/ManjaroLinux/comments/s99lay/cant_install_xrdp/ [12] https://wiki.archlinux.org/title/xrdp [13] https://forum.manjaro.org/t/plasma-cant-use-rdp-betweek-pcs/134381
#!/bin/bash # Function to install and configure xRDP configure_xrdp() { # Update system echo "Updating system..." sudo pacman -Syu # Install xrdp and xorgxrdp-git from AUR echo "Installing xrdp and xorgxrdp-git..." sudo pacman -Sy yay base-devel xorg-xserver-devel yay -S xrdp xorgxrdp # Allow any user to start an X session echo "Configuring Xwrapper..." echo "allowed_users=anybody" | sudo tee -a /etc/X11/Xwrapper.config # Configure .xinitrc file for Cinnamon desktop echo "Configuring .xinitrc..." sed -i 's/^\(SESSION=${1:-xfce-session}\)$/#\1 # original\nSESSION=${1:-xfce4-session}/' ~/.xinitrc sed -i 's/^\s*\(local dbus_args=(--sh-syntax --exit-with-session)\)$/#\1 # original\nlocal dbus_args=(--sh-syntax)/' ~/.xinitrc sed -i 's/^\(exec $(get_session "$1")\)$/#\1 # original\nexec $(get_session "$SESSION")/' ~/.xinitrc # Enable xrdp echo "Enabling xrdp service..." sudo systemctl enable --now xrdp.service } # Call the function configure_xrdp