You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Stefan Lörwald <st...@gmail.com> on 2017/03/24 10:57:56 UTC

Creating a pseudo protocol or extension for hrefs

Hi,

I have a personal server on which I serve different content on different
ports. For remote access, I use guacamole with ssh etc. For simplicity, I'd
like to present the other content (e.g. Rstudio-server) in a similar way to
the connections.

I tried adding an extension by simply adding content via html snippets as
described here
<https://guacamole.incubator.apache.org/doc/gug/guacamole-ext.html#ext-patch-html>,
but utterly failed with no error messages in any of the logs.

In guacamole 0.8.3, I was able to just manipulate the index.xhtml file and
paste a simple

<a href="../" target="_blank"
onclick="javascript:event.target.port=1234">click me</a>

into it.

Is there an easy way to achieve this with either an extension or a pseudo
protocol? The version I'm currently using is 0.9.11-incubating. I'd
personally prefer a pseudo protocol, as this would be configurable on a
per-user basis, rather than statically altering the site's content.

---

I've asked this question on stackoverflow too, but sadly so far there was
no reply:
http://stackoverflow.com/questions/42164457/creating-pseudo-protocol-or-extension-for-href-in-guacamole

Any advice on how to achieve this is greatly appreciated.

Many thanks
Stefan

Re: Creating a pseudo protocol or extension for hrefs

Posted by Mike Jumper <mi...@guac-dev.org>.
On Fri, Mar 24, 2017 at 3:57 AM, Stefan Lörwald <st...@gmail.com>
wrote:

> Hi,
>
> I have a personal server on which I serve different content on different
> ports. For remote access, I use guacamole with ssh etc. For simplicity, I'd
> like to present the other content (e.g. Rstudio-server) in a similar way to
> the connections.
>
> I tried adding an extension by simply adding content via html snippets as
> described here
> <https://guacamole.incubator.apache.org/doc/gug/guacamole-ext.html#ext-patch-html>,
> but utterly failed with no error messages in any of the logs.
>
>
Is there any way you can share your current extension so we can take a look?

In guacamole 0.8.3, I was able to just manipulate the index.xhtml file and
> paste a simple
>
> <a href="../" target="_blank" onclick="javascript:event.target.port=1234">click
> me</a>
>
> into it.
>
> Is there an easy way to achieve this with either an extension or a pseudo
> protocol? The version I'm currently using is 0.9.11-incubating.
>

The best way to do this would be with an extension. You could also, of
course, edit the source of the web application itself, but that shouldn't
be necessary. If there's any way you can expose your extension, it should
be pretty easy for us to figure out why it's not loading as expected.

I'd personally prefer a pseudo protocol, as this would be configurable on a
> per-user basis, rather than statically altering the site's content.
>

That wouldn't be preferred, at least from the perspective of Guacamole's
architecture. Any sort of "pseudo protocol" would effectively be a hack to
get arbitrary links into the list of connections. Per-user configurable or
not, if the idea is to present a different interface to different users, it
may be that your only recourse is to write a different web application
application driven by the same core as Guacamole, that way you have full
control of whatever that application does, its interface design, etc.:

http://guacamole.incubator.apache.org/doc/gug/writing-you-own-guacamole-app.html

If you can get the extension form of this working, given that extensions
have the ability to authenticate users and/or provide varying data
depending on the identity of the user, you can implement functionality like
this. It would be more complicated than making the change globally, but it
is doable. I recommend getting the global form working first, however.

- Mike