Rustdesk claiming MX Linux laptop is not using X11 when it definitely is? Preventing remote connections TO that laptop? (support boot not using Systemd) #575

Closed
opened 2026-02-20 23:05:25 -05:00 by deekerman · 14 comments
Owner

Originally created by @dagleykd on GitHub (Jul 4, 2022).

Describe the bug you encountered:

Installed RustDesk on the latest version of MX Linux (latest version of RustDesk, MX Linux up to date) on my HP Stream 13 laptop. When opening RustDesk on that laptop, I see the message 'Unsupported display server, x11 expected'. I can connect to and control clients fine from that laptop, but no computers can connect to said laptop as they are given the same message on their end. MX DOES use X11, so not sure why there is an error?

What did you expect to happen instead?

I should be able to have other computer connect to and remotely control this computer - RustDesk claims the display server is NOT X11 when it most definitely is?

How did you install RustDesk?

Latest GitHub 64-bit deb file Linux download from the Rustdesk website - installed through the GDebi package installer on MX Linux 21.1 64-bit XFCE.

RustDesk version and environment

I am using RustDesk for personal use to connect to my own PCs and my family's PCs remotely when necessary for support or remote access. Using the latest version of RustDesk.

Originally created by @dagleykd on GitHub (Jul 4, 2022). <!-- Hey there, thank you for creating an issue! --> **Describe the bug you encountered:** Installed RustDesk on the latest version of MX Linux (latest version of RustDesk, MX Linux up to date) on my HP Stream 13 laptop. When opening RustDesk on that laptop, I see the message 'Unsupported display server, x11 expected'. I can connect to and control clients fine from that laptop, but no computers can connect to said laptop as they are given the same message on their end. MX DOES use X11, so not sure why there is an error? **What did you expect to happen instead?** I should be able to have other computer connect to and remotely control this computer - RustDesk claims the display server is NOT X11 when it most definitely is? **How did you install `RustDesk`?** Latest GitHub 64-bit deb file Linux download from the Rustdesk website - installed through the GDebi package installer on MX Linux 21.1 64-bit XFCE. **RustDesk version and environment** I am using RustDesk for personal use to connect to my own PCs and my family's PCs remotely when necessary for support or remote access. Using the latest version of RustDesk.
deekerman 2026-02-20 23:05:25 -05:00
Author
Owner

@rustdesk commented on GitHub (Jul 4, 2022):

Why so many Linux distros? :(

@rustdesk commented on GitHub (Jul 4, 2022): Why so many Linux distros? :(
Author
Owner

@dagleykd commented on GitHub (Jul 4, 2022):

Pardon?

Why so many Linux distros? :(

Pardon? I'm not sure what you mean? This is a RustDesk install on MX Linux? I'm only referring to one distro?

@dagleykd commented on GitHub (Jul 4, 2022): Pardon? > Why so many Linux distros? :( Pardon? I'm not sure what you mean? This is a RustDesk install on MX Linux? I'm only referring to one distro?
Author
Owner

@rustdesk commented on GitHub (Jul 4, 2022):

Forget about my complaint to Linux.

@rustdesk commented on GitHub (Jul 4, 2022): Forget about my complaint to `Linux`.
Author
Owner

@rustdesk commented on GitHub (Jul 4, 2022):

Below is the function to check display server type. If you know a little about programming, you shoud be able to figure out some problem for us to fix it.

github.com/rustdesk/rustdesk@de044db6d4/src/platform/linux.rs (L347)

@rustdesk commented on GitHub (Jul 4, 2022): Below is the function to check display server type. If you know a little about programming, you shoud be able to figure out some problem for us to fix it. https://github.com/rustdesk/rustdesk/blob/de044db6d45e878fdd1077176675305e71375d6f/src/platform/linux.rs#L347
Author
Owner

@dagleykd commented on GitHub (Jul 4, 2022):

Below is the function to check display server type. If you know a little about programming, you shoud be able to figure out some problem for us to fix it.

github.com/rustdesk/rustdesk@de044db6d4/src/platform/linux.rs (L347)

A bit of research seems to suggest it's because MX doesn't boot using Systemd by default....once selecting it to boot with Systemd, RustDesk works fine!

Is there any way to make this not necessary?

@dagleykd commented on GitHub (Jul 4, 2022): > Below is the function to check display server type. If you know a little about programming, you shoud be able to figure out some problem for us to fix it. > > https://github.com/rustdesk/rustdesk/blob/de044db6d45e878fdd1077176675305e71375d6f/src/platform/linux.rs#L347 A bit of research seems to suggest it's because MX doesn't boot using Systemd by default....once selecting it to boot with Systemd, RustDesk works fine! Is there any way to make this not necessary?
Author
Owner

@rustdesk commented on GitHub (Jul 4, 2022):

not necessary

Contribution is welcome.

@rustdesk commented on GitHub (Jul 4, 2022): > not necessary Contribution is welcome.
Author
Owner

@sirtemporary commented on GitHub (Jul 28, 2022):

Different (?) problem on different non-systemd distro. Client running devuan 4 with xfce. When another computer (Windows 10) connects to it, after authenticating, rustdesk immediately closes (terminal window says Illegal operation). Will have some time to debug/track this down, hopefully within the next week.

@sirtemporary commented on GitHub (Jul 28, 2022): Different (?) problem on different non-systemd distro. Client running devuan 4 with xfce. When another computer (Windows 10) connects to it, after authenticating, rustdesk immediately closes (terminal window says Illegal operation). Will have some time to debug/track this down, hopefully within the next week.
Author
Owner

@sirtemporary commented on GitHub (Jul 29, 2022):

Regarding my previous comment, so far I'm unable to duplicate this problem on my own hardware. The problem occurred on another computer that is no longer in my possession (I did not have much time with it). In the meantime, I'm looking at mx linux and the problem stems from the fact that within mx linux, loginctl outputs an error message if init is not systemd. Will attempt a workaround.

@sirtemporary commented on GitHub (Jul 29, 2022): Regarding my previous comment, so far I'm unable to duplicate this problem on my own hardware. The problem occurred on another computer that is no longer in my possession (I did not have much time with it). In the meantime, I'm looking at mx linux and the problem stems from the fact that within mx linux, loginctl outputs an error message if init is not systemd. Will attempt a workaround.
Author
Owner

@rustdesk commented on GitHub (Jul 29, 2022):

workaround

Thanks

@rustdesk commented on GitHub (Jul 29, 2022): > workaround Thanks
Author
Owner

@sirtemporary commented on GitHub (Jul 29, 2022):

The current (July 29) master branch on git doesn't even use loginctl in platform/linux.rd ... Much has changed in this file. I have compiled this build; it still gives the message "Unsupported display server, x11 expected" with mx linux client.
Here's the terminal output:
[code]2022-07-30T02:04:06Z INFO librustdesk::server] DISPLAY=Ok(":0.0")
[2022-07-30T02:04:06Z INFO librustdesk::server] XAUTHORITY=Ok("/home/user/.Xauthority")
[2022-07-30T02:04:06Z INFO librustdesk::server] server not started (will try to start): Connection refused (os error 111)
[2022-07-30T02:04:06Z INFO librustdesk::server] DISPLAY=Ok(":0.0")
[2022-07-30T02:04:06Z INFO librustdesk::server] XAUTHORITY=Ok("/home/user/.Xauthority")
[2022-07-30T02:04:06Z INFO librustdesk::rendezvous_mediator] start rendezvous mediator of
[2022-07-30T02:04:06Z INFO librustdesk::lan] lan discovery listener started
[2022-07-30T02:04:06Z INFO librustdesk::common] Testing nat ...
[2022-07-30T02:04:06Z INFO librustdesk::ipc] Started ipc server at path: /tmp/RustDesk/ipc
[2022-07-30T02:04:06Z INFO librustdesk::common] Tested nat type: SYMMETRIC in 376.46774ms
INFO:TIS: scaleFactor 1
INFO:TIS: current platform: Linux
INFO:TIS: is_xfce: true
[2022-07-30T02:05:58Z INFO librustdesk::server] Server listening on: 10.0.2.15:38073
[2022-07-30T02:05:59Z INFO librustdesk::rendezvous_mediator] create_relay requested from from 192.168.2.10:46656, relay_server: , uuid: , secure: true
INFO:TIS: scaleFactor 1
[2022-07-30T02:06:00Z INFO librustdesk::ipc] Started ipc_cm server at path: /tmp/RustDesk/ipc_cm
[2022-07-30T02:06:00Z INFO librustdesk::ipc] Started ipc_pa server at path: /tmp/RustDesk/ipc_pa
INFO:TIS: new connection #1:
[2022-07-30T02:06:01Z INFO librustdesk::server::connection] #1 Connection closed: Reset by the peer
[2022-07-30T02:06:01Z INFO librustdesk::server::connection] #1 connection loop exited
[2022-07-30T02:06:01Z INFO librustdesk::ui::cm] cm ipc connection closed from connection request
[2022-07-30T02:06:01Z INFO librustdesk::server::connection] Input thread exited
[2022-07-30T02:06:01Z ERROR librustdesk::server::connection] ipc to connection manager exit: expected
[2022-07-30T02:06:16Z ERROR librustdesk::server] Failed to accept connection from 192.168.2.10:46652: deadline has elapsed
[2022-07-30T02:06:58Z INFO librustdesk::server::input_service] fix_key_down_timeout_at_exit
[/code]

@sirtemporary commented on GitHub (Jul 29, 2022): The current (July 29) master branch on git doesn't even use loginctl in platform/linux.rd ... Much has changed in this file. I have compiled this build; it still gives the message "Unsupported display server, x11 expected" with mx linux client. Here's the terminal output: [code]2022-07-30T02:04:06Z INFO librustdesk::server] DISPLAY=Ok(":0.0") [2022-07-30T02:04:06Z INFO librustdesk::server] XAUTHORITY=Ok("/home/user/.Xauthority") [2022-07-30T02:04:06Z INFO librustdesk::server] server not started (will try to start): Connection refused (os error 111) [2022-07-30T02:04:06Z INFO librustdesk::server] DISPLAY=Ok(":0.0") [2022-07-30T02:04:06Z INFO librustdesk::server] XAUTHORITY=Ok("/home/user/.Xauthority") [2022-07-30T02:04:06Z INFO librustdesk::rendezvous_mediator] start rendezvous mediator of <fqdn> [2022-07-30T02:04:06Z INFO librustdesk::lan] lan discovery listener started [2022-07-30T02:04:06Z INFO librustdesk::common] Testing nat ... [2022-07-30T02:04:06Z INFO librustdesk::ipc] Started ipc server at path: /tmp/RustDesk/ipc [2022-07-30T02:04:06Z INFO librustdesk::common] Tested nat type: SYMMETRIC in 376.46774ms INFO:TIS: scaleFactor 1 INFO:TIS: current platform: Linux INFO:TIS: is_xfce: true [2022-07-30T02:05:58Z INFO librustdesk::server] Server listening on: 10.0.2.15:38073 [2022-07-30T02:05:59Z INFO librustdesk::rendezvous_mediator] create_relay requested from from 192.168.2.10:46656, relay_server: <fqdn>, uuid: <uuid>, secure: true INFO:TIS: scaleFactor 1 [2022-07-30T02:06:00Z INFO librustdesk::ipc] Started ipc_cm server at path: /tmp/RustDesk/ipc_cm [2022-07-30T02:06:00Z INFO librustdesk::ipc] Started ipc_pa server at path: /tmp/RustDesk/ipc_pa INFO:TIS: new connection #1: <id> [2022-07-30T02:06:01Z INFO librustdesk::server::connection] #1 Connection closed: Reset by the peer [2022-07-30T02:06:01Z INFO librustdesk::server::connection] #1 connection loop exited [2022-07-30T02:06:01Z INFO librustdesk::ui::cm] cm ipc connection closed from connection request [2022-07-30T02:06:01Z INFO librustdesk::server::connection] Input thread exited [2022-07-30T02:06:01Z ERROR librustdesk::server::connection] ipc to connection manager exit: expected [2022-07-30T02:06:16Z ERROR librustdesk::server] Failed to accept connection from 192.168.2.10:46652: deadline has elapsed [2022-07-30T02:06:58Z INFO librustdesk::server::input_service] fix_key_down_timeout_at_exit [/code]
Author
Owner

@sirtemporary commented on GitHub (Jul 29, 2022):

OK so the get_display_server() function is now in libs/hbb_common/src/platform/ (in the master branch)
A quick (but by no means elegant) fix, to get this running on mx linux, without systemd init:

~/rustdesk-master/libs/hbb_common/src/platform
$ diff linux-unmodified.rs linux.rs
45a46,49

        // loginctl has not given the expected output.  try something else.
        if let Ok(sestype) = std::env::var("XDG_SESSION_TYPE") {
            return sestype.to_owned();
        }

80a85,89

}

// loginctl has not given the expected output.  try something else.
if let Ok(sid) = std::env::var("XDG_SESSION_ID") { // could also execute "cat /proc/self/sessionid"
    return sid.to_owned();

I did test it, and it did work (in a vm). Not sure what side effects getting these environment variables on other distros would cause... it only uses this as a last resort, if the existing code does not provide a usable session id or type.

@sirtemporary commented on GitHub (Jul 29, 2022): OK so the get_display_server() function is now in libs/hbb_common/src/platform/ (in the master branch) A quick (but by no means elegant) fix, to get this running on mx linux, without systemd init: ~/rustdesk-master/libs/hbb_common/src/platform $ diff linux-unmodified.rs linux.rs 45a46,49 > // loginctl has not given the expected output. try something else. > if let Ok(sestype) = std::env::var("XDG_SESSION_TYPE") { > return sestype.to_owned(); > } 80a85,89 > } > > // loginctl has not given the expected output. try something else. > if let Ok(sid) = std::env::var("XDG_SESSION_ID") { // could also execute "cat /proc/self/sessionid" > return sid.to_owned(); --------------------- I did test it, and it did work (in a vm). Not sure what side effects getting these environment variables on other distros would cause... it only uses this as a last resort, if the existing code does not provide a usable session id or type.
Author
Owner

@rustdesk commented on GitHub (Jul 29, 2022):

Looks Ok, you can submit a PR.

@rustdesk commented on GitHub (Jul 29, 2022): Looks Ok, you can submit a PR.
Author
Owner

@Chief36 commented on GitHub (Feb 14, 2023):

I can confirm that this has been fixed in the nightly build.

@Chief36 commented on GitHub (Feb 14, 2023): I can confirm that this has been fixed in the nightly build.
Author
Owner

@vi commented on GitHub (May 26, 2023):

When will the fix be available in the official deb package?

@vi commented on GitHub (May 26, 2023): When will the fix be available in the official deb package?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#575
No description provided.