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

xpra shadow after remote reboot #3210

Closed
thomas725 opened this issue Jul 19, 2021 · 9 comments
Closed

xpra shadow after remote reboot #3210

thomas725 opened this issue Jul 19, 2021 · 9 comments

Comments

@thomas725
Copy link

thomas725 commented Jul 19, 2021

I know from https://github.com/Xpra-org/xpra/blob/master/docs/Usage/Shadow-Server.md that

On most platforms, the display being shadowed must be active: not locked or turned off.

I was just wondering, is there anything I can do to fix that on my machine, without switching to one of the unknown platforms which are not part of that "most platforms" group? (Besides maybe configuring the server to auto-login on boot, I don't want to make it THAT insecure....)

My server is running xpra v4.2.1-r0 on Linux Mint 20.2.
My client xpra v4.3-r29404 (g116cfdb17) on Manjaro Linux.

Starting directly from client using xpra -d ssh shadow ssh://server ends with

2021-07-19 15:02:27,551 connection timed out
2021-07-19 15:02:27,563 SSH EOF on stderr of run-xpra

When starting on server first to attach client later:

xpra --daemon=no shadow
Invalid MIT-MAGIC-COOKIE-1 key (repeated 68023 times with no spaces / new lines in between)
2021-07-19 15:07:12,498 Error: failed to connect to display :0
2021-07-19 15:07:12,499  could not connect to X server on display ':0' after 3 seconds
@totaam
Copy link
Collaborator

totaam commented Jul 19, 2021

Often, :0 is owned by the display manager which runs as root.
So you can use root to see it: xpra shadow ssh://root@server/0

I don't think that there are any other options, sorry.

@totaam totaam closed this as completed Jul 19, 2021
@thomas725
Copy link
Author

thomas725 commented Jul 19, 2021

Running as root doesn't seem to make it work either..

root@server:~# xpra --daemon=no shadow :0

Warning: running as root

Warning: running as root
failed to initialize Gtk, no display?
2021-07-19 16:33:08,598 Error: failed to connect to display :0
2021-07-19 16:33:08,598  could not connect to X server on display ':0' after 3 seconds

And starting it directly from the client:

xpra shadow ssh://root@server/0
...
2021-07-19 16:37:19,508  SSH: 'Warning: running as root'
2021-07-19 16:37:19,570  SSH: 'Warning: running as root'
2021-07-19 16:37:19,573  SSH: 'Entering daemon mode; any further errors will be reported to:'
2021-07-19 16:37:19,573  SSH: '  /run/user/0/xpra/:0.log.new'
2021-07-19 16:37:19,601  keyboard settings: rules=evdev, model=pc86, layout=at
2021-07-19 16:37:19,618  SSH: 'Actual log file name is now: /run/user/0/xpra/:0.log'
2021-07-19 16:37:19,624  desktop size is 1920x1080:
2021-07-19 16:37:19,625   :0.0 (508x285 mm - DPI: 96x96) workarea: 1920x1014 at    0x30  
2021-07-19 16:37:19,625     SHP eDP-1 (344x194 mm - DPI: 142x141)
2021-07-19 16:37:49,451 connection timed out
2021-07-19 16:37:49,482 SSH EOF on stderr of run-xpra
...

@totaam
Copy link
Collaborator

totaam commented Jul 20, 2021

Running as root doesn't seem to make it work either..
..
failed to initialize Gtk, no display?

That's probably because the display manager uses a private XAUTHORITY file.
Xpra version 4.3 will re-add an xauth entry when that's the case, to re-gain access.
Try the beta builds, it should work.

@thomas725
Copy link
Author

thomas725 commented Jul 25, 2021

Okey so by using https://xpra.org/repos/focal/xpra-beta.list I upgraded my server to xpra v4.3-r29499 (g27a2d4a97)
And my client was on xpra v4.3-r29404 (g116cfdb17) installed through AUR package "xpra-git", now I've rebuilt it using the same AUR package to xpra v4.3-r29505 (ga35ecb859).

Starting on server for later attachment now looks like this:

# xpra --daemon=no shadow :0

Warning: running as root
2021-07-25 09:37:34,057 cannot access python uinput module:
2021-07-25 09:37:34,057  No module named 'uinput'
No protocol specified [[repeated 79.069 times]]
2021-07-25 09:37:37,057 Error: failed to connect to display :0
2021-07-25 09:37:37,058  could not connect to X server on display ':0' after 3 seconds

The output when starting directly from client hasn't changed.

@totaam
Copy link
Collaborator

totaam commented Jul 25, 2021

Sorry for misleading you.
I've just tried all current releases of Fedora, Ubuntu and Debian and they're all using gdm-wayland or some other wayland based display manager. I'm not even sure they have a protocol for shadowing the login screen.
Wayland support is in #387

@thomas725
Copy link
Author

Okey. No problem. From what my htop is telling me, it seems my Linux Mint 20.2 installation is running lightdm:
image

So at the moment it's not possible, did I understand you correctly? What display managers are supported to shadow the login screen on a fresh boot?

If I login and lock the screen, shadowing does work fine.

@totaam
Copy link
Collaborator

totaam commented Jul 26, 2021

So at the moment it's not possible, did I understand you correctly?

Not with wayland based login managers. No.

What display managers are supported to shadow the login screen on a fresh boot?

Anything X11 based. Some of the login managers can be configured to use X11.

If I login and lock the screen, shadowing does work fine.

This means you logged in to an X11 session.

@thomas725
Copy link
Author

thomas725 commented Aug 9, 2021

Just to make sure I understood the issue:

Most current Linux desktop distributions use a Wayland based login manager, and xpra's Wayland support has not yet progressed enough, that it could support shadowing such Wayland based login managers. Correct?

@totaam
Copy link
Collaborator

totaam commented Aug 9, 2021

Correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants