Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Xauthority path #6550

Open
gloowa opened this issue Nov 22, 2024 · 0 comments
Open

Incorrect Xauthority path #6550

gloowa opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@gloowa
Copy link

gloowa commented Nov 22, 2024

Describe the bug
It appears that on my system (openSUSE Leap 15.6) the Xauthority path is not detected correctly by meshagent.

To Reproduce
Steps to reproduce the behavior:

  1. Click "connect" on remote desktop tab in MeshCentral
  2. Get Error "KVM Child process has unexpectedly exited" message

Expected behavior
Connection to remote desktop is established

Screenshots
KVM_died

Server Software:

  • OS: Windows 10 Pro 22H2
  • Virtualization: none
  • Network: LAN
  • Version: 1.1.33

Client Device:

  • Device: any
  • OS: any
  • Network: LAN
  • Browser: any

Remote Device:

  • Device: Linux VM on same physical machine as MC Server
  • OS: openSUSE Leap 15.6
  • Network: LAN
  • Current Core: Nov 21 2022, 545997319

Additional context
I believe i have found the root cause, but i do not know how to fix the problem.

In short, i belive that the path of Xauthority file is being incorrectly detected.

On the remote device i have enabled the /tmp/slave logging and this is the content:

$ sudo cat /tmp/slave
SLAVE/KVM CoreDumps DISABLED
Checking $DISPLAY
ENV[DISPLAY] = 0
Before kvm_init(0).
kvm_init(0) called
XAUTHORITY is /home/gloowa/.Xauthority
DisplayString is :0
XOpenDisplay(:0) failed, using XAUTHORITY: /home/gloowa/.Xauthority

So it detects XAUTHORITY being in my user home directory, but that is not where it is stored: (commands ran as user gloowa)

$ echo $XAUTHORITY 
/tmp/xauth_eSPOzS

$ ls -lah /tmp/ | grep xauth
-rw------- 1 gloowa  users    122 Nov 22 15:24 xauth_eSPOzS

I am able to workaround the issue somewhat by doing an ln -s $XAUTHORITY ~/.Xauthority manually from terminal. Then i am able to connect to logged in user's desktop but this is not perfect, and will not work if user is not logged in yet. Same problem exists for root Xauthority, which means I cannot gain access to login screen, and if i log out while connected via workaround, the conenction will die, because /tmp/xauth_<> will be deleted and root xauth cannot be picked up.

Your config.json file

{
   "settings": {
		"Cert": "my.domain.net",
		"Port": 8321,
		"AliasPort": 8301,
		"AgentPong": 300,
		"_TlsOffload": "192.168.1.51"
   }, 
   "domains": {
      "mesh": {
		  "certUrl": "https://my.domain.net:8301/",
		  "title": "MeshCentral - gloowa - mesh domain",
		  "newaccounts": false,
		  "allowedOrigin": true
      }
   }
}
@gloowa gloowa added the bug label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant