• Works like a charm from macOS 11.5.1 (Big Sur). This guide is a little hard to find though. Now I need to figure out how to run it headless.

    Edited by Sascha Peilicke
  • Restart g-r-d via g-c-c at the end, so g-r-d starts the RDP server.

    What does this mean, how to do that? I still only have a.out, is that "g-r-d" ? how to restart it?

  • @zilexa

    I still only have a.out.

    The a.out executable is just for setting the credentials.

    What does this mean, how to do that? I still only have a.out, is that "g-r-d" ? how to restart it?

    g-c-c is the abbreviation for gnome-control-center (also known as "GNOME Settings")
    g-r-d is the abbreviation for gnome-remote-desktop. This is the actual server with the RDP backend here.

    It means that you toggle the on/off button in gnome-control-center in the screen sharing settings to first turn screen sharing off (if it is not 'off' already) and then toggle the button again to turn it back on. This has the effect, that g-r-d (gnome-remote-desktop) is restarted.

    Alternatively, you can use systemctl --user restart gnome-remote-desktop.service to restart g-r-d.

  • @pnowack Thanks so much for your swift response. I feel stupid now as this just refers to a simple UI toggle that I know well :)

    Final question (hopefully). On Manjaro Gnome (fully updated, uses Gnome 40.4.0 with Wayland by default), org.gnome.desktop.remote-desktop.rdp does not exist. org.gnome.desktop.remote-access does exist, but does not contain tls-cert and tls-key. The remote-desktop schema is missing.

    Is my Gnome version too old?

    Edited by ZileXa
  • @zilexa

    org.gnome.desktop.remote-access is not used by gnome-remote-desktop. It might be a leftover of the deprecated vino server.

    org.gnome.desktop.remote-desktop.rdp should exist though (same as org.gnome.desktop.remote-desktop.vnc for the VNC backend). The key was introduced with g-r-d version 0.1.9 (that was the version before GNOME 40).
    If it does not exist in your package, then the installation is faulty. If the problem persists with a reinstallation of the g-r-d package, then you should report that to your distribution.

    gnome-remote-desktops latest versions (as of 2021-11-09 (YYYY-MM-DD)) are for GNOME-40: 40.2 and for GNOME 41: 41.1
    You can check the version with /usr/lib/./gnome-remote-desktop-daemon --version (the path to the gnome-remote-desktop-daemon may vary from distro to distro).

  • @pnowack

    Thanks, I was able to install the missing package easily and notified via the forum the dev team: https://forum.manjaro.org/t/missing-package-gnome-remote-desktop/89631

    So far, when connecting from Windows, after entering credentials I see a small popup for 0.1sec, but nothing else happens. I am back at the Remote Desktop window where you can enter address.

    If I keep trying, after 5 times or so Windows rdp says: "Because of a protocol error detected at the client (code 0x21040, this session will be disconnected". Probably because I tried too many times.

    I will re-create the credentials just to be sure I did not make any mistakes. At least RDP is running:

    ● gnome-remote-desktop.service - GNOME Remote Desktop
         Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; static)
         Active: active (running) since Tue 2021-11-09 13:42:48 CET; 6min ago
       Main PID: 2291 (gnome-remote-de)
          Tasks: 4 (limit: 9086)
         Memory: 12.5M
            CPU: 390ms
         CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gnome-remote-desktop.service
                 └─2291 /usr/lib/gnome-remote-desktop-daemon
    
    nov 09 13:46:35 Idefix gnome-remote-desktop-daemon[2291]: [13:46:35:890] [2291:2378] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
    nov 09 13:46:35 Idefix gnome-remote-de[2291]: Unable to check file descriptor, closing connection
    nov 09 13:46:42 Idefix gnome-remote-desktop-daemon[2291]: [13:46:42:670] [2291:2387] [ERROR][com.freerdp.crypto] - invalid private key
    nov 09 13:46:42 Idefix gnome-remote-desktop-daemon[2291]: [13:46:42:671] [2291:2387] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_INITIAL - rdp_server_accept_nego() fail
    nov 09 13:46:42 Idefix gnome-remote-desktop-daemon[2291]: [13:46:42:671] [2291:2387] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
    nov 09 13:46:42 Idefix gnome-remote-de[2291]: Unable to check file descriptor, closing connection
    nov 09 13:46:46 Idefix gnome-remote-desktop-daemon[2291]: [13:46:46:051] [2291:2396] [ERROR][com.freerdp.crypto] - invalid private key
    nov 09 13:46:46 Idefix gnome-remote-desktop-daemon[2291]: [13:46:46:051] [2291:2396] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_INITIAL - rdp_server_accept_nego() fail
    nov 09 13:46:46 Idefix gnome-remote-desktop-daemon[2291]: [13:46:46:051] [2291:2396] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
    nov 09 13:46:46 Idefix gnome-remote-de[2291]: Unable to check file descriptor, closing connection
    Edited by ZileXa
  • @zilexa

    [ERROR][com.freerdp.crypto] - invalid private key

    You did not create the private keyfile and server certificate. Just follow the steps in the snippet here.
    The part at Now create the server certificate and private keyfile via: is not done.
    Just follow the steps in the snippet above to create both files and save their locations in gsettings like it is mentioned in the snippet.

    It is pretty much just copy-paste.

  • Actually I did do that. The first time and now 3 times in total.

    Each time, I copied the 2 files to a folder I created /home/myusername/.config/remote-desktop and I set the path via gsettings the first time. I confirmed this via gsettings list-recursively org.gnome.desktop.remote-desktop.rdp

    Not sure why it still gives me this error. But I'll check again tomorrow.

  • @pnowack It works! I had a typo in the gsettings set command, the path of my .key file contained an extra /.

  • UPDATED 11/JAN/2021 I have created a little bash script to easily create the credentials, prevents myself and others to make typos. I will also use this in my Manjaro post-installation script:

    # Install the gnome RDP package
    sudo pacman -S --noconfirm gnome-remote-desktop
    
    # Ask user what login name/pw they want to use
    echo "Please create credentials to allow access by others:"
    read -p 'Remote Desktop access username: ' rdpuser
    read -p 'Remote Desktop access password (only letters and/or numbers!): ' rdppw
    echo "Your username/password will be $rdpuser/$rdppw."
    read -p "A self-signed certificate is required and will be created. Hit [ENTER] to start and prepare to answer questions for the certificate." 
    
    # Download the code snippet that generates RDP credentials
    wget -O $HOME/Downloads/grd_rdp_credentials.c https://gitlab.gnome.org/-/snippets/1778/raw/master/grd_rdp_credentials.c
    # Compile the file
    gcc grd_rdp_credentials.c `pkg-config --libs --cflags libsecret-1`
    # Use the program to store the credentials via libsecret
    ./a.out $rdpuser $rdppw
    
    # Create the server certificate and private keyfile
    openssl genrsa -out tls.key 4096
    openssl req -new -key tls.key -out tls.csr
    openssl x509 -req -days 730 -signkey tls.key -in tls.csr -out tls.crt
    
    # Move the certificate and keyfile to a better location
    mkdir $HOME/.config/remote-desktop
    mv $HOME/Downloads/tls.key $HOME/.config/remote-desktop/tls.key
    mv $HOME/Downloads/tls.crt $HOME/.config/remote-desktop/tls.crt
    
    # Set the location of the two files
    dconf write /org/gnome/desktop/remote-desktop/rdp/tls-key "'$HOME/.config/remote-desktop/tls.key'" 
    dconf write /org/gnome/desktop/remote-desktop/rdp/tls-cert "'$HOME/.config/remote-desktop/tls.crt'"
    
    # Cleanup
    rm $HOME/Downloads/tls.csr
    rm $HOME/Downloads/a.out
    rm $HOME/Downloads/grd_rdp_credentials.c    
    
    echo "RDP credentials configured. Note RDP is still disabled! You can enable/disable RDP easily via Settings > Sharing > Share Screen."
    Edited by ZileXa
  • @saaditory In your case it seems that the header files for libsecret are split into another package in your distribution (not the usual case).
    So, in your case, your distro should have a -dev or -devel package for libsecret. I.e. could be named libsecret-dev, libsecret-devel, or similar.
    So, in order to build the script, you need that package installed.

  • gcc grd_rdp_credentials.c `pkg-config --libs --cflags libsecret-1` While executing this, I'm getting the following error..

    Package libsecret-1 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsecret-1.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libsecret-1', required by 'virtual:world', not found
    grd_rdp_credentials.c:3:10: fatal error: libsecret/secret.h: No such file or directory
        3 | #include <libsecret/secret.h>
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.

    I don't know how to resolve it.

    @pnowack Thanks, libsecret-devel package did the trick. I'm using Fedora 35.

    Edited by Saad Khan
  • The problem is that it is still not working... I may be missing something.. I ran the above script by @zilexa successfully, after that, I toggled the settings in GNOME Settings and even rebooted the PC but when I try to connect through Remmina, it says: Connot connect to the "192.168.x.x" RDP server.

    Tried as well: sudo systemctl restart gnome-remote-desktop

    Edited by Saad Khan
  • @saaditory g-r-d is currently only a systemd user service, not a system service. This means that systemctl restart gnome-remote-desktop.service will not work, but systemctl --user restart gnome-remote-desktop.service will work (the --user switch is relevant)

    (In case you want a headless session, this type of session is not implemented yet (tracking issues: https://gitlab.gnome.org/GNOME/mutter/-/issues/1605, https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/16))

    Edited by Pascal Nowack
  • Oh right, I get it. @pnowack Right now the output is:

    ● gnome-remote-desktop.service - GNOME Remote Desktop
         Loaded: loaded (/usr/lib/systemd/user/gnome-remote-desktop.service; static)
         Active: active (running) since Tue 2021-11-16 20:19:48 PKT; 9s ago
       Main PID: 10296 (gnome-remote-de)
          Tasks: 5 (limit: 9329)
         Memory: 2.8M
            CPU: 30ms
         CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gnome-remote-desktop.service
                 └─10296 /usr/libexec/gnome-remote-desktop-daemon
    
    Nov 16 20:19:48 elitebook-saad systemd[1606]: Starting GNOME Remote Desktop...
    Nov 16 20:19:48 elitebook-saad systemd[1606]: Started GNOME Remote Desktop.
    Nov 16 20:19:48 elitebook-saad gnome-remote-de[10296]: Didn't initialize RDP server: not configured
    Nov 16 20:19:48 elitebook-saad gnome-remote-de[10296]: Initialized VNC server

    Seems like it's not configured yet, but I ran the above script without any errors.

    Edited by Saad Khan
  • In case you want a headless session, this type of session is not implemented yet

    @pnowack I'm trying to set it up on my laptop. Which definitely has everything like display etc. connected to it. Also I am logged in to this PC as well when trying to connect to it (if that's not something that I'm doing wrong).

    Edited by Saad Khan
  • @saaditory

    If you have troubles, please do not rely on my script but follow the steps as described. That should work. I noticed for example the script does not solve the env variable $HOME. This means your gsettings now contain invalid paths to "$HOME" instead of /home/yourusersname/... but there might be more things going wrong as I only tested the script (with full paths instead of $HOME) on Manjaro Gnome latest version (that worked).

    Edited by ZileXa
  • @zilexa You are right. gsettings commands are not resolving $HOME to be the actual user directory path. Changing them manually in my case resolved the issue.

    But now I have some issue while connecting to the server. The connection fails on authentication and the RDP server stops. I'll try to look into more details on this one when I get time.

    Thanks both @pnowack & @zilexa

  • Using these instructions I have rdp working on debian 11 with Gnome 41. The performance is great however the keyboard isn't being forwarded to the server. Mouse works fine. I have tried thinclient and remmina.

    Any ideas?

  • @dubstar-04

    debian 11 with Gnome 41

    That does not add up. Debian 11 does not ship GNOME 41. It uses the old GNOME 3.38 version (, where g-r-ds version was 0.1.9).
    Check your g-r-d version via apt or via running /usr/libexec/./gnome-remote-desktop-daemon --version. It MUST be >= 40.

    Edited by Pascal Nowack
  • Thanks for the quick response. I added testing to the sources list to get the newer packages. I only did this to try and get the keyboard working.

    Needed to dist-upgrade to upgrade gnome-remote-desktop.

    Working perfectly now.

    Thank you.

    IMG_20211217_192936

  • Is it possible to show gdm3 when using gnome-remote-desktop?

  • @dubstar-04

    Is it possible to show gdm3 when using gnome-remote-desktop?

    It is not, headless sessions are not implemented yet.

  • Anyone know if it's possible to remotely start a gnome-session via ssh?

    RDP works great once the session is logged in.

    I have two seats on one machine. The second seat is headless using a dummy HDMI adapter and it's proving rather tricky to get logged in.

    Best I have come up with us use no machine to log in then use the RDP built in to gnome/mutter.

  • @dubstar-04

    Anyone know if it's possible to remotely start a gnome-session via ssh?

    While I have not tested this, there might be a way: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/64#note_1104016

    It should be noted though that, as the comment suggests, that this won't launch a full GNOME session.

  • No need for compiling anything to set username & pass

    secret-tool store -l 'GNOME Remote Desktop RDP credentials' xdg:schema org.gnome.RemoteDesktop.RdpCredentials

    When prompted for secret use this format:

    {'username': <'admin'>, 'password': <'guessme'>}
  • @pnowack I created a repository on GitHub to develop a script for setting up the Gnome Remote Desktop server with a virtual monitor/display. The idea is to use (if possible) only command line utilities. However, I currently do have time to finish implementing it. If you or anyone is interested, feel free to send a PR or to use the code for another implementation. I was having issues with the gdbus calls in gnome-add-virtual-monitor.sh, by the way.

    @tamirdaniely -- regarding your comment:

    No need for compiling anything to set username & pass

    secret-tool store -l 'GNOME Remote Desktop RDP credentials' xdg:schema org.gnome.RemoteDesktop.RdpCredentials

    Thank you! I've just added this to the repo for replacing the compiled code.

  • @pnowack perhaps you can update the setup guide with the info from @tamirdaniely ?

    No need for compiling anything to set username & pass

    Edited by ZileXa
  • @tamirdaniely Your solution does not work. I have no RDP working after doing that, even though I enabled/disabled/enabled it via Settings>Sharing>Screen Sharing. Also, when I check tls-cert and tls-key in org.gnome.desktop.remote-desktop.rdp they are empty.

  • I have updated my 1-click script that will do all the steps of the guide automatically (and interactively ask for user/pw).

    @saaditory I fixed the commands that set the location of the key files, I discovered you can use dconf instead of gsettings. Dconf does support $HOME.

  • With the UI freeze exception in https://gitlab.gnome.org/Teams/Releng/freeze-breaks/-/issues/56 and the respecting g-c-c MR in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1205, GNOME 42 will provide a UI for the RDP backend.
    With the new UI, the certificate and private keyfile are automatically created. If you configure or have already configured your own certificate and private keyfile, those remain preserved.

    The RDP backend also becomes the default remote desktop backend. The VNC backend will, so far, still exist (just not be exposed to the UI any more).
    Additionally, with GNOME 42, a CLI tool called grdctl is introduced, allowing you to configure both the RDP backend and VNC backend from the terminal too.

  • @pnowack I can't seem to find any documentation on the actual grdctl commands. help, -h and --h all do not give me any helpful output, and there is no man entry.

  • @CorvetteCole The help can be displayed with grdctl --help. Regarding the man page: It is currently an open MR: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/90

    Note: Enabled and Disabled of the backends settings refer to the dconf settings. Enabled means that the backend (RDP or VNC) is started, when g-r-d is started.
    Enabling the g-r-d systemd user service itself automatically is done via e.g. systemctl --user enable --now gnome-remote-desktop-daemon

  • @pnowack I apologize. Guess I didn't try all the help permutations! Appreciate the advice

  • I just discovered this step only works if your password contains letters and/or numbers. You cannot use "!" in your password, because this command will fail: ./a.out some_username p455w0rd!

    Perhaps add this info in the guide?

    My script still works btw: https://gitlab.gnome.org/-/snippets/1778#note_1310610

    Since Gnome 42 is not available in stable Manjaro and I noticed there are still quite some issues with 42.1, most people might still be on 41.5. So this page is still very useful 😄

    Edited by ZileXa
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment