When I run applications (such as email and web browser) on two different remote machines using SSH X-Windows forwarding they can correctly open URLs in the other application. So clicking on a HTTP link in an email launches that URL in the browser. Clicking on a mailto link on a web page launches that in the email program. If there is a name for this process I don't know what it is. Firefox talks about it here. https://www-archive.mozilla.org/unix/remote.html
X2go provides me with much better performance than standard X forwarding but the URL magic doesn't seem to work. The email program launches a browser on the machine it is running on rather than the existing browser. The browser does the same thing with mailto links.
The firefox link seems to suggest this magic is done with the X toolkit, intrinsic properties, and actions. There is also the MIME database to look at, and I think D-Bus might be involved. If I can figure out how it works with X forwarding perhaps I could write a patch for X2go or write a wrapper script around it that makes that possible.
Can you steer me in the right direction to understand this process and what x2go code I should look at?
For reference I am running openSuSE 42.3 on an X86_64 machine with the KVM hypervisor. I am using an XFCE desktop. The "remote" machines are running on virtual machines under KVM on the same hardware. My email client is Evolution 3.12.11 running on one VM and my browser is Firefox 57 running on another.
I have tried both the X2goclient 4.1.0 (which I guess is C) and pyhoca-gui 0.5.0 which should be python. Maybe there is a configuration option I need to use that I missed. I can't find anything in the documentation about this feature, although it would help if I had a name for this bit of magic.
If this feature isn't already there I would be pleased to write, test and submit a patch.
Thanks. Bill
On Fri, Dec 1, 2017 at 7:49 PM, Bill Merriam <lists@billmerriam.com> wrote:
When I run applications (such as email and web browser) on two different remote machines using SSH X-Windows forwarding they can correctly open URLs in the other application. So clicking on a HTTP link in an email launches that URL in the browser. Clicking on a mailto link on a web page launches that in the email program. If there is a name for this process I don't know what it is. Firefox talks about it here. https://www-archive.mozilla.org/unix/remote.html
With FF 39 this property stuff was removed and replaced with a technically different mechanism (whose internals I don't know), see https://bugzilla.mozilla.org/show_bug.cgi?id=1080319 That new mechanism is probably X11 agnostic.
X2go provides me with much better performance than standard X forwarding but the URL magic doesn't seem to work. The email program launches a browser on the machine it is running on rather than the existing browser. The browser does the same thing with mailto links.
The firefox link seems to suggest this magic is done with the X toolkit, intrinsic properties, and actions. There is also the MIME database to look at, and I think D-Bus might be involved. If I can figure out how it works with X forwarding perhaps I could write a patch for X2go or write a wrapper script around it that makes that possible.
Can you steer me in the right direction to understand this process and what x2go code I should look at?
With the old setup there might have been chances to get it working with x2go, because when you connect via ssh -X the remote applications are X clients to _the same_ X server (the one on the machine you are executing ssh; the so called "real" X server) so they can use X properties to communicate via that X server.
There's a fundamental difference between ssh -X and x2go. When you run applications via x2go a _new_ X server is run on the remote machine for each connection. Those X servers are at the same time X clients of the "real" X server. Each of the remote X servers have their own set of atoms and properties.
For reference I am running openSuSE 42.3 on an X86_64 machine with the KVM hypervisor. I am using an XFCE desktop. The "remote" machines are running on virtual machines under KVM on the same hardware. My email client is Evolution 3.12.11 running on one VM and my browser is Firefox 57 running on another.
All local - so I am wondering why ssh -X is too slow!?
I have tried both the X2goclient 4.1.0 (which I guess is C) and pyhoca-gui 0.5.0 which should be python. Maybe there is a configuration option I need to use that I missed. I can't find anything in the documentation about this feature, although it would help if I had a name for this bit of magic.
There's no config I am aware of.
If this feature isn't already there I would be pleased to write, test and submit a patch.
I guess this is somehow working via the MIME handling of your (local) desktop environment.
You can use xdg-open <url> to check that. xdg-mail is for email handling. And there's xdg-mime to change the settings.
I think you must do this: a) on the Evolution system you would install a mime handler that forwards URL requests to your host. b) on the host you install another mime handler that forwards URL requests to the firefox system
(and vice versa for the mail mime type). Depending on you demands you can skip the host system altogether and directly got to the other system).
Maybe you can start your research with these links: https://superuser.com/questions/715881/redirecting-xdg-open-to-another-syste... https://wiki.archlinux.org/index.php/default_applications https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.htm...
Does that help?
Uli