ALICE XRDP Guide

Last modified by Kerwin Olfers on 2023/03/22 10:40

Introduction

An alternative to X2Go for remote desktop sessions, is XRDP which follows the microsoft RDP protocol. With this you can connect to ALICE using one of the default windows RDP apps or by using a third party RDP client. Please see below for detailed instructions. For some users XRDP may prove more stable (especially with regards to copy-paste operations) as compared to X2Go.

Also note that XRDP allows for different desktop environments (e.g. GNOME, XCFE and MATE) which may provide different levels of performance. See here on how to change between environment.s

Connecting to RDP

Below we explain three ways of connecting to RDP:

  •  MobaXterm
    • Pro: Easy to set up, very easy to start new sessions and to resize the resolution.
    • Con: third-party app, performance may be slightly behind the other options
  • Microsoft Remote Desktop Connection:
    • Pro: Comes installed by default, good performance
    • Con: a bit more hassle to start each session, doesn't handle window resizing very well
  • Microsoft Store: Remote Desktop app (not recommended)
    • Pro: Best performance, auto resolution changes
    • Con: Only works from the NUWD network (i.e. from university laptop, while connected to the university NUWD network).

MobaXterm

  1. If you do not have a recent version (21.0 or higher), download it (there are installer versions but also a portable version which only needs to be unzipped and do not require any admin rights).
  2. Open MobaXterm and make a new RDP session.
    image-20221223113503-3.png
  3. Enter remote host name: localhost, and leave the username empty
    image-20221223121450-3.png
  4. Go to the "Network Settings" tab, and add SSH gateway (jump host).
    image-20221223113713-6.png
  5. First add the alice gateway jump host: ssh-gw.alice.universiteitleiden.nl, username: your ALICE username. Then add another jump host and add the login host: login2.alice.universiteitleiden.nl, again with your ALICE username. Then press OK.
    image-20221223114059-7.png
  6. [OPTIONAL] For ease of use, in the "Bookmark Settings" tab, you can give the session an recognizable name, and you can even create a shortcut on the desktop for easy access.
  7. Press OK at the bottom of the screen. If you see a pop-up, select 'accept'
    image-20221223114307-8.png
  8. You can now start the session by double clicking on the session in the left side of the screen (or right-click and execute, or using the desktop shortcut if you created it). The first time you connect you will be asked to enter your ALICE password three times (once for the gateway, once for the login node and once for the RDP server). You will also be given the option to store your passwords in MobaxTerm so you won't have to enter it again the next time.
    image-20221223115739-1.png
  9. Your RDP session will then start. Note that you can easily 1. Detach the tab, to drag it around resize it  2. Enable/Disable scaling, we recommend disabling this as it will stretch the image 3. make the window fullscreen. 4. Fit to window size, this is really handy as it will change the resolution of the session to best make use of the current size of the window, making it a better alternative to scaling. Finally, you can use the 5. set connection password button so that you don't have to enter the password when reconnecting the next time.
    image-20221223121410-2.png
  10. [OPTIONAL] Switch to a different desktop environment for best performance.

Remote Desktop Connection

The windows Remote Desktop Connection (RDC) client comes installed by default on all recent windows installations.

To use RDC however, we need to manually establish the SSH proxy jump to ALICE first. NOTE: you will need to do this every time you want to connect to the RDP. To do this:

  1. Open Windows PowerShell (e.g. windows key + x to bring up the power menu and open Windows Powershell). You do not need to use the administrator version.
  2. In the powershell window run the following command (one line), with the <alice-user> tags substituted by your own alice username:
    ssh -L 33389:localhost:3389 -o "ProxyJump <alice-user>@ssh-gw.alice.universiteitleiden.nl"  <alice-user>@login2.alice.universiteitleiden.nl
  3. You will need to enter your ALICE password twice to log into the gateway and the login node.
    image-20221223130216-4.png
  4. You can minimize this window now, but do not close it.

Now you can start the RDC client.

  1. Press the windows key and search for remote desktop connection.
  2. For computer, fill in: 127.0.0.1:33389
    image-20221223130310-7.png
  3. Go to "Show Options", open the "Advanced" tab, and Click on "Settings" in the "Connect from anywhere tab". Select  "Do not use an RD Gateway Server" and press OK.
    image-20221223130247-5.png
  4. Under the Display tab, pick the desired resolution of the desktop window. Please note, while you can resize the window once the connection has started, you cannot change the resolution of the desktop anymore.
  5. Go back to the "General" tab, and choose "Save As", and store the settings with a recognizable name, e.g. on the Desktop.
  6. Click on Connect. If prompted for approval, press connect (and optionally "Don't ask again")
    image-20221223130439-9.png
  7. Finally, enter your ALICE username and password into the XRDP login window to connect.
    image-20221223130559-11.png
  8. By right-clicking the top of the client window, you can access various settings like "smart scaling", which stretches and zoom the image depending on the size of the window. Note: it does not change the resolution of the desktop.
  9. After you have finished and closed the session, don't forget to close the Powershell terminal.
  10. [OPTIONAL] Switch to a different desktop environment for best performance.

Next time, you can open the session directly via the configuration you saved earlier, but keep in mind you always have to set up the proxy jump in PowerShell first.

Microsoft Store: Remote Desktop

Microsoft also offer a slightly newer version of the Remote Desktop app via the Windows store. A big benefit of the version is that it will auto-change the resolution of the desktop after you resize the window.

Unfortunately at the moment, this app only works if you are on a University desktop/laptop and are connected to the wired network or NUWD wifi network.

  1. Use the windows key to search for the Microsoft Store and open it.
  2. Search for Remote Desktop and install the app
    image-20221223132633-2.png
  3. Open the app (from the store or from the Start Menu)
  4. Add a PC using the + button on the top right
    image-20221223132747-3.png
  5. As PC name, add: login1.alice.universiteitleiden.nl
    image-20221223133134-4.png
  6. Add a user account by clicking on the + sign, enter your ALICE username and password
  7. Optionally give the session a recognizable name
  8. Click on show more and add a gateway with the + sign, use server name: ssh-gw.alice.universiteitleiden.nl and select the user account you made earlier. Press save (and if needed, press the back arrow in the top left to return to the main settings view).
    image-20221223133244-6.png
  9. Press Save at the bottom.
  10. Now you can click on the newly created session tile to start the session
    image-20221223133337-7.png
  11. If prompted to accept certificate, select "Don't ask again" and "Connect Anyway"
  12. The session will now start, you should see the desktop right away, without needing to enter any passwords. Note the when you resize the window, the resolution of the desktop will also be adjusted automatically.
  13. [OPTIONAL] Switch to a different desktop environment for best performance.

GNOME, XCFE or MATE

By default, XRDP uses the GNOME desktop environment. In our experience, this environment can be slightly slower than the other options.

You can manually change which desktop environment is used by creating/changing a file in your home folder on ALICE.

  • Log into one of the ALICE login nodes (by whatever means you like).
  • For XCFE, open a terminal and run:
      echo "xfce4-session" > ~/.Xclients
      chmod 755 ~/.Xclients
  • For MATE, open a terminal and run:
      echo "mate-session" > ~/.Xclients
      chmod 755 ~/.Xclients
  • Disconnect from ALICE and start a new RDP session, you should now see the new desktop environment.

If you are using the MATE environment, and are experiencing issues with GUI windows:

  • Open a terminal and run:
    mate-window-properties
  • Make sure there is no tickmark in front of  "Enable software compositing window manager"

Copy & Paste

Generally all the above methods allow for copy-pasting information between the local machine and the remote desktop. However keep in mind that Linux environments likely use different hotkeys for copy/paste, and that these may differ between applications as well.

Text editors

Generally follow ctrl+c and ctrl+v, with the exception of Emacs.

Terminals

Often use different keybindings, sometimes you can change these, e.g. for XCFE: open /home/olferskjf/.config/xfce4/terminal/accels.scm with a text editor. Note, this is in a hidden folder, so if you want open this from the file manager, make sure under view you have enabled hidden folders. There you can search for the lines containing copy and/or paste. By default they are commented out (the ; at the start of the line), and include the SHIFT button. You can simply remove the ; and the SHIFT part. So for example:

;(gtk_accel_path "<Actions>/terminal-window/copy" "<Primary> <Shift> c")

Would become

(gtk_accel_path "<Actions>/terminal-window/copy" "<Primary> c")

Finally save the file. It may be necessary to restart the session for the changes to take effect.

Matlab

Generally uses different hotkeys for copy/paste, you can change these yourself under Home -> Preferences -> Keyboard ->Shortcuts. You will see a warning if your hotkey of choice conflict with another command, in such cases you can Unassign the hotkey from that command to fix the conflict. These settings should carry over between sessions (but may be specific to which version of Matlab you are loading)

image-20221223151619-1.png

Sharing Local Folders

The RDP/XRDP connection allows you to share/mount folders from your local computer to your ALICE session, so that you can access local folders and files easily.

The settings vary slightly per client used.

MobaXTerm

In the RDP session settings, the "Redirect drives" option should be enabled. Generally, this is done by default.

image-20230322103737-1.png

In your ALICE session, you can then find your local folders under: /home/USER/thinclient_drives/

image-20230322104021-2.png

FAQ

TopicQuestionAnswer
topicquestionanswer
Tags:
   
solo
XWiki 14.10.13
contact@xwiki.com