xpra icon
Bug tracker and wiki

Opened 11 days ago

Closed 9 days ago

Last modified 6 days ago

#1900 closed defect (invalid)

xdg-open-forwarding broken in beta

Reported by: Matteo Ipri Owned by: Antoine Martin
Priority: major Milestone: 2.4
Component: html5 Version: trunk
Keywords: client xdg-open Cc:

Description (last modified by Antoine Martin)

I found this issue when running xpra in Docker containerwith Ubuntu 17.10 artful and using the HTML5 client.
Once xpra is loaded I have an xterm window in my browser.
Once I am in xterm I run the command "xdg-open https://xpra.org".

With the stable version of xpra I only get a message in my local terminal (the one in which I launched the docker container) that says (as expected):

2018-07-04 21:04:57,471 New unix-domain connection received on /home/matteo/.xpra/62b2edcf1139-0
2018-07-04 21:04:57,473 Warning: remote end does not accept URLs"

If I connect to the container with the desktop client, I get the pop-up asking me where to open the link.

With the beta version, using the HTML5 client, Firefox in the container is launched.
It seems like the xdg-open-forwarding for URLs is broken in the current beta.
If I connect to xpra beta with the desktop client, I get the pop-up as with the stable version of xpra.

I can add that xdg-open-forwarding for URLs was working in version v2.4-r19581 I installed as beta in a container some week ago.

I wrote a couple of Dockerfiles to test the latest stable (xpra X11 version 2.3.2-r19729 64-bit as of this writing) and the latest beta version (xpra X11 version 2.4-r19803 64-bit as of this writing) and I found some bugs when comparing the HTML5 client to the Xpra desktop client I use on my Arch Linux running PC.

The Docker images are based on Ubuntu 17.10 artful and I attach the Dockerfiles so that my experiments can be reproduced.

To build the images, I run the following commands:

sudo docker build -t xpra -f path/to/xpra/Dockerfile path/to/xpra/ 
sudo docker build -t xpra:beta -f path/to/xpra/Dockerfile-beta path/to/xpra/ 

To run the containers, I enter the following:

sudo docker run --interactive --tty --rm -p 8080:8080 xpra
sudo docker run --interactive --tty --rm -p 8080:8080 xpra:beta

I attach the Dockerfiles.

Attachments (2)

Dockerfile (1.6 KB) - added by Matteo Ipri 11 days ago.
Dockerfile-beta (1.7 KB) - added by Matteo Ipri 11 days ago.

Download all attachments as: .zip

Change History (9)

Changed 11 days ago by Matteo Ipri

Attachment: Dockerfile added

Changed 11 days ago by Matteo Ipri

Attachment: Dockerfile-beta added

comment:1 Changed 11 days ago by Antoine Martin

Description: modified (diff)
Milestone: 2.4
Status: newassigned

comment:2 Changed 10 days ago by Matteo Ipri

Moreover, the option "--forward-xdg-open" has gone from the trunk version of man page, here: https://www.xpra.org/trac/browser/xpra/trunk/src/man/xpra.1

comment:3 Changed 10 days ago by Antoine Martin

Moreover, the option "--forward-xdg-open" has gone from the trunk version of man page

You say this as if it was ever in there, but I can't see any trace of it anywhere in the history.

comment:4 in reply to:  3 Changed 10 days ago by Matteo Ipri

Replying to Antoine Martin:

Moreover, the option "--forward-xdg-open" has gone from the trunk version of man page

You say this as if it was ever in there, but I can't see any trace of it anywhere in the history.

I am really sorry, I was sure I read about it in the man file, instead it was in another ticket, ticket:1726.

comment:5 Changed 10 days ago by Antoine Martin

Terse description of "forward-xdg-open" added to man page in r19861.

comment:6 Changed 9 days ago by Antoine Martin

Description: modified (diff)
Resolution: invalid
Status: assignedclosed

With the beta version, using the HTML5 client, Firefox in the container is launched.

Just tried it in an Ubuntu Artful (17.10) VM and it worked just fine.
You should really try this first rather than making it more complicated with docker.

The docker image does not work because it cannot create any valid unix domain sockets.
It shows:

2018-07-07 11:34:46,823 Warning: failed to create socket directory '/run/user/1988/xpra'
2018-07-07 11:34:46,823  [Errno 2] No such file or directory: '/run/user/1988/xpra'
2018-07-07 11:34:46,823 Warning: failed to create socket directory '/run/xpra'
2018-07-07 11:34:46,823  [Errno 13] Permission denied: '/run/xpra'
2018-07-07 11:34:46,823 Warning: cannot create socket '/run/user/1988/xpra/61fbe6bf4432-0':
2018-07-07 11:34:46,823  [Errno 2] No such file or directory
2018-07-07 11:34:46,823  /run/user does not exist

And as per wiki/ReportingBugs, you really should have posted the FULL server log output, it's pretty obvious from there.

This is now more of a problem because ~/.xpra is deprecated and we no longer create server sockets there, if all the other locations also fail then there are no server sockets to use for forwarding the open commands, see #1723 for details.
r19870 adds a more explicit warning when that happens.


More general debugging guidelines:

  • this could also happen if you try to launch from an xterm which was not started with --start=xterm, as this feature relies on an environment setup by the xpra server.

Make sure that the correct one is used:

which xdg-open
  • also make sure that the environment contains XPRA_XDG_OPEN_SERVER_SOCKET and that it is valid.

comment:7 Changed 6 days ago by Matteo Ipri

Thanks for the tips. I did not notice the changeset where the behavior changed.
I changed my Dockerfile and now those warnings are gone and it works again as expected.
I just created the needed folder with the right permissions.
Indeed the correct xdg-open is used and the environment variable is correctly set.
Thanks again!

Note: See TracTickets for help on using tickets.