Fix for #4136 connection to linux refused by using wrong Xauthority file

Solution:
1. Get file from sddm-greeter and startplasma-x11 (aka KDE) processes as well
2. Get users home dir from system instead of hard coded pattern /home/<user>
3. Prefer XAUTHORITY environment variable over Xorg -auth if available
This commit is contained in:
Awalon
2023-04-23 03:43:47 +02:00
parent 9cc09c620f
commit 028767da8b
3 changed files with 138 additions and 37 deletions

View File

@@ -29,7 +29,7 @@ flutter = ["flutter_rust_bridge"]
default = ["use_dasp"]
hwcodec = ["scrap/hwcodec"]
mediacodec = ["scrap/mediacodec"]
linux_headless = ["pam", "users"]
linux_headless = ["pam" ]
virtual_display_driver = ["virtual_display"]
plugin_framework = []
@@ -126,7 +126,7 @@ evdev = { git="https://github.com/fufesou/evdev" }
dbus = "0.9"
dbus-crossroads = "0.5"
pam = { git="https://github.com/fufesou/pam", optional = true }
users = { version = "0.11.0", optional = true }
users = { version = "0.11.0" }
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.11"