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

remote access with xpra SSH #77

Closed
frisbee23 opened this issue Sep 18, 2018 · 12 comments
Closed

remote access with xpra SSH #77

frisbee23 opened this issue Sep 18, 2018 · 12 comments
Labels

Comments

@frisbee23
Copy link

hey there,

github says you're from germany, and i could talk german, but i'll go with english for future users.

trying to follow this: https://github.com/mviereck/x11docker/wiki/Remote-access-with-SSH

and it used to hang, i think here, found this in the logs....
'x11docker-lxde/pullready to be created, will wait up to 32000 seconds.'

then i pulled manually: 'docker pull x11docker/lxde'

and now i at least see a container running x11docker/lxde..
so for some reason x11docker seemed unable to pull, or is that a pre-requisite?

also: maybe could you document what the commands do in the background a bit more ?
it seems like x11docker is launching x11 servers, launching the docker container, etc. so lot's of stuff.. for me it's hard to debug without some overview

also: in the url mentioned above, you launch with --xdummy, why ?

also: in the url above, you launch x11docker with this subshell construct in the background, right ? then reading out the env to give that to xpra ?

could you maybe seperate the steps and comment on the purpose and intend and expected result ?

there seem to be many parts involved, so for me i think it's pretty though to use.
maybe create some checklists for some basic use-cases.

i'm trying hard to get (in the end) matlab working in a container, and access over x11forwarding over ssh, (or maybe vnc, etc.i haven't tried that yet).

currently i'm trying with xpra installed on windows.
maybe it's a bit extra unnessercary hard because i also go over an ssh tunnel.

ps: are you reachable via IRC/mattermost/etc. maybe ?

@frisbee23
Copy link
Author

also having troubles with cleaning up after a failed attempt.. when i run this twice i get display 30 already in use..

@frisbee23
Copy link
Author

frisbee23 commented Sep 18, 2018

well, got it to work somehow finally.
you're using --use-display in your xpra invocation.. i cannot find it on https://www.xpra.org/trac/browser/xpra/trunk/src/man/xpra.1
ah i found it.. --use-display=yes|no
Use an existing display rather than starting one with
the xvfb command. Default: no

@frisbee23
Copy link
Author

got a bit more far..
atm working on howto set the display size.. it seems -xdummy doesn't work with --size; how can i set the size in that case ?

@mviereck
Copy link
Owner

mviereck commented Sep 18, 2018

Hello,

thanks for your feedback and your interest in x11docker!
A lot of questions, I'll try to answer:

and it used to hang, i think here, found this in the logs....
'x11docker-lxde/pullready to be created, will wait up to 32000 seconds.'
then i pulled manually: 'docker pull x11docker/lxde'
and now i at least see a container running x11docker/lxde..
so for some reason x11docker seemed unable to pull, or is that a pre-requisite?

x11docker can run docker pull on itself. It opens a window to ask the user first. Did you run x11docker over SSH? Than the issue may be an unvisible or failing window. I'll look into that.

also: maybe could you document what the commands do in the background a bit more ?
it seems like x11docker is launching x11 servers, launching the docker container, etc. so lot's of stuff.. for me it's hard to debug without some overview

Where should I document it? x11docker does a lot in background, indeed. The core thing is running an X server, doing some setup in container (especially setting up a container user), and running the desired docker command.
Maybe I can write a wiki article to describe in an overview what x11docker does.

also: in the url mentioned above, you launch with --xdummy, why ?

The command runs an invisible X server with --xdummy because the remote server does not need to show the display. (Instead of --xdummy, you can use --xvfb as well). Remote servers useually don't have a monitor, and --xdummy and --xvfb don't need one.

could you maybe seperate the steps and comment on the purpose and intend and expected result ?

read Xenv < <(x11docker --xdummy --display=30 x11docker/lxde pcmanfm)

Runs invisible X server and reads X environment variables from x11docker. It uses display :30 so you know on your client which display xpra should connect to.

echo $Xenv && export $Xenv

Sets new environment variables to provide them to xpra server.

xpra start :30 --use-display --start-via-proxy=no

Starts the xpra server to provide display :30 in the network.

xpra attach ssh:HOSTNAME:30     # replace HOSTNAME with IP or host name of ssh server

also: in the url above, you launch x11docker with this subshell construct in the background, right ? then reading out the env to give that to xpra ?

Yes. x11docker returns DISPLAY and XAUTHORITY after X server is ready.

maybe it's a bit extra unnessercary hard because i also go over an ssh tunnel.

xpra uses ssh on itself; no need to set up an extra ssh tunnel.

ps: are you reachable via IRC/mattermost/etc. maybe ?

sorry, no. It goes all over this issue tracker. This has the advantage of documenting issues and solutions for later use.

atm working on howto set the display size.. it seems -xdummy doesn't work with --size;

It should work with --size. What screen size do you get? Maybe try --xvfb if --size fails with --xdummy.

@frisbee23
Copy link
Author

thanks for your support!
my windows xpra-client sums up all my monitors or something and reports a really large 4000px+ display size to the server. as a workaround i disabled them, now it scales a bit better.

my ssh tunnel is needed because i go over a jump host. i'd say it works because i get a window now.

so this could work ?
x11docker --xvfb --size=1024x768

@mviereck
Copy link
Owner

mviereck commented Sep 18, 2018

so this could work ?
x11docker --xvfb --size=1024x768

Yes. --xvfb needs X server Xvfb installed on the server.

my windows xpra-client sums up all my monitors or something and reports a really large 4000px+ display size to the server. as a workaround i disabled them, now it scales a bit better.

You had to shut off some monitors to avoid xpra scaling? xpra scales up the window?

Edit: xpra creates a tray icon where you can change the scaling factor.

@frisbee23
Copy link
Author

i found this....
https://xpra.org/trac/wiki/Xdummy
is x11docker creating some of these x11 config files ?

i need to get you some logoutput i think for this..

it looks like the size is set from x11 but xpra has his own idea..
image

thats whats in xpra log when i connect. and i do realize it isn't really related with x11docker..
image

@mviereck
Copy link
Owner

mviereck commented Sep 18, 2018

Please provide terminal output as text instead of screenshots for better readability and to allow citing with copy&paste.

Your client has an overall screen size of 3200x1080.
xpra scales up with 3.1x1.4, a quite unuseable format.
xpra does scale up to avoid the possibility of a window bigger than the virtual screen size. Afaik that would cause memory issues.

xpra won't scale if the virtual screen is big enough. Try with --size 3200x1080

i found this....
https://xpra.org/trac/wiki/Xdummy
is x11docker creating some of these x11 config files ?

With --xdummy x11docker creates a file xdummy.xorg.conf in (in this case) ~/.cache/x11docker/X30-x11docker-lxde. (The current cache folder can be seen in $Xenv you got above.)

@frisbee23
Copy link
Author

thank you. i tried it with a screen thats as big as mine and that works better..

@mviereck
Copy link
Owner

mviereck commented Sep 19, 2018

i tried it with a screen thats as big as mine and that works better

Glad to hear that! Please report if any issues remain.

I've updated the wiki article about SSH with xpra, I hope it is more comprehensive now.

and it used to hang, i think here, found this in the logs....
'x11docker-lxde/pullready to be created, will wait up to 32000 seconds.'
then i pulled manually: 'docker pull x11docker/lxde'
and now i at least see a container running x11docker/lxde..
so for some reason x11docker seemed unable to pull, or is that a pre-requisite?

The docker pull issue is fixed now.

@totaam
Copy link

totaam commented Sep 20, 2018

also having troubles with cleaning up after a failed attempt.. when i run this twice i get display 30 already in use..

That's fixed:
https://xpra.org/trac/changeset/20254

As for the scaling issues, your vfb doesn't support randr - xpra needs the vfb to be at least as big as the client's screen size, or ideally to support randr so it can resize as needed.
The funny scaling values you saw are also fixed:
https://xpra.org/trac/ticket/1935

I've updated the wiki article about SSH with xpra, I hope it is more comprehensive now.

FYI: 2.4, due out soon, has a new ssh backend.
Client:
https://xpra.org/trac/ticket/1646
Server:
https://xpra.org/trac/ticket/1920

As for the xpra manual, it is best viewed with "man xpra", or online here:
https://xpra.org/manual.html

@frisbee23
Copy link
Author

you guys are awesome ! thanks

@mviereck mviereck changed the title trying remote-access-with-SSH remote access with xpra SSH Sep 21, 2018
@mviereck mviereck closed this as completed Oct 6, 2018
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

3 participants