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

more url scheme handling #1894

Closed
totaam opened this issue Jul 2, 2018 · 4 comments
Closed

more url scheme handling #1894

totaam opened this issue Jul 2, 2018 · 4 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 2, 2018

  • r3271 added support for URL association, so xpra would be used for opening URLs that look like this: xpra://....
  • r3278 added URL handling on win32
  • r13106 added support for SSL using xpras://.... (inc win32 changes)
  • r12380 equivalent macos bits

See also:

We should support more transport types using a more generic scheme:

  • xpra:// for TCP
  • xpra+ssl:// for SSL
  • xpra+ssh:// for SSH
  • xpra+ws:// for websockets
  • xpra+wss:// for secure websockets

Related: Web-based protocol handlers can be used to register protocols with the browser.

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2018

As per rfc2396 appendix A: the scheme should start with a letter and can contain letters, numbers, "+", "-" and "."
But it looks like there are compatibility issues with badly written scheme parsers and the "+" character..

Once this is finished, we should register them here: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

@totaam
Copy link
Collaborator Author

totaam commented Jul 6, 2018

Done in r19856 and tested on:

  • win32: works fine (used browsers to enter the URL)
  • macos: URL mapping works and it fires xpra, but the client does not connect (unrelated problem): macos url handler does not open #1905
  • linux: what a load of crap, we added the new URL schemes to the desktop file, and during RPM install we still call:
/usr/bin/update-mime-database
/usr/bin/update-desktop-database

We still validate the desktop file during rpmbuild.
Yet nothing happens, no warnings, no errors, nothing.
But the URL mapping doesn't take:

$ xdg-open xpra+tcp://192.168.1.7:10000/
gio: xpra+tcp://192.168.1.7:10000/: The specified location is not supported

The "legacy" one still does though:

xdg-open xpras://192.168.1.7:10000/

What on earth do we need to do to get the system to update the mapping?
(and for the record, I've tried "xpratcp", "xpra-tcp" and "xpra+tcp" as schemes - no difference, none get registered)
There will not be a "year of the Linux desktop", it's an endless waste of time.

@totaam
Copy link
Collaborator Author

totaam commented Sep 2, 2018

So xdg-open just delegates opening URLs and files to other utilities, depending on what OS and DE is running.

In the case of gnome3 that's "gio" which is part of "glib2".
Turning on all debugging with:

G_DBUS_DEBUG=all xdg-open xpra+tcp://host:port/

We get tons of dbus calls, it seems to query org.gtk.vfs.Daemon.
And also org.gtk.vfs.MountTracker ListMountableInfo.

Other scheme types fail in different ways, equally undecipherable.

@totaam
Copy link
Collaborator Author

totaam commented Sep 2, 2018

Well, that's interesting: this problem doesn't occur on any other test systems, only my main development one. PITA.
No amount of running update-desktop-database or update-mime-database does any good.

r20271 fixes URL scheme patching, this will do.

@maxmylyn: the URL in the ticket description should fire xpra on all platforms (with the correct transport type).
ie:

xdg-open xpra+ssl://192.168.1.6:10000/

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

1 participant