Results 1 to 7 of 7

Thread: Forcing XRDP to use an existing Xorg server

  1. #1
    Join Date
    May 2023
    Beans
    4

    Forcing XRDP to use an existing Xorg server

    Hi,

    I run a Ubuntu 22.04 server with lubuntu desktop (LXQT). I have installed the latest XRDP using the extremely useful scrip provided by c-nergy.be. From time to time though XRDP will stop passing through the clipboard. When this happens I just do a systemctl restart xrdp and that fixes the clipboard issue. However, when I restart xrdp lose my rdp session with all my windows and apps that are running.

    I discovered that when I start an RDP session to the server xrdp sets up a Xorg server:
    /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log

    When I gracefully close my RDP client, Xorg :10 remains active, which means when I launch my RDP client again, I get connected to my last session with all my windows and apps still open. But if I have to restart XRDP using systemctl XRDP creates Xorg :11 despite Xorg :10 still being there. When I launch my RDP client after the restart, I get connected to Xorg :11.

    I have spent the last few days researching the web and trying various suggestions related to sesman.ini, xrdp.ini and xorg.conf. These are just some of the suggestions I tried. I have even asked chatGPT!!

    https://github.com/neutrinolabs/xrdp/issues/960
    https://askubuntu.com/questions/1333...isting-session

    Sadly I am no closer to forcing XRDP to reuse the initial Xorg server it created. I hope someone here has solved this issue and can share their solution. Thank you

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Forcing XRDP to use an existing Xorg server

    In /etc/xrdp/xrdp.ini, change this line
    Code:
    port=-1
    Which tells xrdp to always look for an open port, to
    Code:
    port=5912
    Which will tell xrdp to always use the same port number, '5912'... It will then only use that port.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    May 2023
    Beans
    4

    Re: Forcing XRDP to use an existing Xorg server

    Hey

    Thanks for the response. Unfortunately it wouldn't initiate a RDP session with that change. xrdp.log doesnt show any errors and sesman.log doesnt show any activity at all with your proposed changes. Looks like it doesnt even try and set up a xorg server.

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Forcing XRDP to use an existing Xorg server

    Let me setup an XRDP session with one of my VM's and see which specific port it uses, to set to it... I'll test that to verify that works.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Forcing XRDP to use an existing Xorg server

    If you aren't tied to xrdp, there are other, more secure, remote desktop options which allow different sessions or reconnecting to the same session from anywhere ... with all the programs/desktop left as it was. ssh is used for connection credentials and encrypted security and the desktop is highly compressed to feel much faster than either xRDP or VNC options.

    But if you must use RDP, I cannot help. Sorry.

  6. #6
    Join Date
    May 2023
    Beans
    4

    Re: Forcing XRDP to use an existing Xorg server

    Let me setup an XRDP session with one of my VM's and see which specific port it uses, to set to it... I'll test that to verify that works.


    Thanks - were you able to set up a test session?

  7. #7
    Join Date
    May 2023
    Beans
    4

    Re: Forcing XRDP to use an existing Xorg server

    Quote Originally Posted by TheFu View Post
    If you aren't tied to xrdp, there are other, more secure, remote desktop options which allow different sessions or reconnecting to the same session from anywhere ... with all the programs/desktop left as it was. ssh is used for connection credentials and encrypted security and the desktop is highly compressed to feel much faster than either xRDP or VNC options.

    But if you must use RDP, I cannot help. Sorry.
    Thanks - unfortunately I'm tied to RDP

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •