You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Ben Davis <be...@boldidea.org> on 2019/11/23 01:17:03 UTC

How to customize guacamole angular app

I would like to make some customizations to the angular javascript app.
However, I'm not familiar with the frontend build system that guacamole
uses. I tried adding some console.log() statements in the source files
in /var/lib/tomcat9/webapps/guacamole, but haven't found where I can change
anything.

My main goal right now is inserting a new screen between when the user has
authenticated and when they are connected to their desktop. Can anyone
provide some direction on how I can get started hacking around on it?

Ben Davis

*Education Director*

*214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*


* <https://boldidea.org/donate>*

Re: How to customize guacamole angular app

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Nov 26, 2019 at 8:51 PM Nick Couchman <vn...@apache.org> wrote:

> On Mon, Nov 25, 2019 at 12:33 PM Ben Davis <be...@boldidea.org> wrote:
>
>> That makes sense. The two main things I want to do are A) modify the UI
>> and B) add a REST endpoint that returns VM status info for a connection.
>> I've done very little with Java in the past. Are there example extensions I
>> can look at that show how to do those two things?
>>
>>
> Both of these should be doable, although item B can be a little more
> problematic, depending on what you're trying to do.   For item A, I'd take
> a look at the guacamole-ext page of the manual:
>


Well, that was fun...apparently Gmail decided I was done typing my
message!  Anyway, as I was saying, have a look at the guacamole-ext page:

http://guacamole.apache.org/doc/gug/guacamole-ext.html

There's a section toward the top of the page on updating HTML that tells
you how to insert code that will be placed within certain sections of the
web application.  You can also write AngularJS directives, controllers,
etc., and have those generate UI pages.

For item B, you can definitely return the VM status for a connection and
display that on the page; however, because the application operates rather
asynchronously, your mileage may vary on how easy that is to do.  I ran
into some issues writing the WoL module (
https://github.com/apache/guacamole-client/pull/374) trying to get the
hostname of the connection through the decorating module, and ended up
having to, somewhat clumsily, feed the hostname to ping back into the REST
API in order to get the status.  It would be a lot cleaner if I could have
done it all on the back-end, but it would have required some significant
reworking of the code.  May still happen, but who knows.

Anyway, have a look at any/all of the extensions, as there are various
places that each of them do one or the other or both of what you're looking
for.  And, of course, post back here if you have any specific questions.

-Nick

Re: How to customize guacamole angular app

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Nov 25, 2019 at 12:33 PM Ben Davis <be...@boldidea.org> wrote:

> That makes sense. The two main things I want to do are A) modify the UI
> and B) add a REST endpoint that returns VM status info for a connection.
> I've done very little with Java in the past. Are there example extensions I
> can look at that show how to do those two things?
>
>
Both of these should be doable, although item B can be a little more
problematic, depending on what you're trying to do.   For item A, I'd take
a look at the guacamole-ext page of the manual:



> Ben Davis
>
> *Education Director*
>
> *214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*
>
>
> * <https://boldidea.org/donate>*
>
>
>
> On Sat, Nov 23, 2019 at 2:34 AM Marko Nikolić <ma...@gmail.com>
> wrote:
>
>> Hi Ben,
>>
>> Guacamole supports extension, which are used to add custom features,
>> integrations etc... to the main application. It is better to use this
>> method instead of hacking the Guacamole code.
>>
>> You can find more details on extensions in the docs:
>>
>> http://guacamole.apache.org/doc/gug/guacamole-ext.html
>>
>> Marko
>>
>> суб, 23. нов 2019. 02.18 Ben Davis <be...@boldidea.org> је написао/ла:
>>
>>> I would like to make some customizations to the angular javascript app.
>>> However, I'm not familiar with the frontend build system that guacamole
>>> uses. I tried adding some console.log() statements in the source files
>>> in /var/lib/tomcat9/webapps/guacamole, but haven't found where I can change
>>> anything.
>>>
>>> My main goal right now is inserting a new screen between when the user
>>> has authenticated and when they are connected to their desktop. Can anyone
>>> provide some direction on how I can get started hacking around on it?
>>>
>>> Ben Davis
>>>
>>> *Education Director*
>>>
>>> *214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*
>>>
>>>
>>> * <https://boldidea.org/donate>*
>>>
>>>

Re: How to customize guacamole angular app

Posted by Ben Davis <be...@boldidea.org>.
That makes sense. The two main things I want to do are A) modify the UI and
B) add a REST endpoint that returns VM status info for a connection. I've
done very little with Java in the past. Are there example extensions I can
look at that show how to do those two things?

Ben Davis

*Education Director*

*214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*


* <https://boldidea.org/donate>*



On Sat, Nov 23, 2019 at 2:34 AM Marko Nikolić <ma...@gmail.com>
wrote:

> Hi Ben,
>
> Guacamole supports extension, which are used to add custom features,
> integrations etc... to the main application. It is better to use this
> method instead of hacking the Guacamole code.
>
> You can find more details on extensions in the docs:
>
> http://guacamole.apache.org/doc/gug/guacamole-ext.html
>
> Marko
>
> суб, 23. нов 2019. 02.18 Ben Davis <be...@boldidea.org> је написао/ла:
>
>> I would like to make some customizations to the angular javascript app.
>> However, I'm not familiar with the frontend build system that guacamole
>> uses. I tried adding some console.log() statements in the source files
>> in /var/lib/tomcat9/webapps/guacamole, but haven't found where I can change
>> anything.
>>
>> My main goal right now is inserting a new screen between when the user
>> has authenticated and when they are connected to their desktop. Can anyone
>> provide some direction on how I can get started hacking around on it?
>>
>> Ben Davis
>>
>> *Education Director*
>>
>> *214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*
>>
>>
>> * <https://boldidea.org/donate>*
>>
>>

Re: How to customize guacamole angular app

Posted by Nick Couchman <vn...@apache.org>.
On Sat, Nov 23, 2019 at 03:34 Marko Nikolić <ma...@gmail.com>
wrote:

> Hi Ben,
>
> Guacamole supports extension, which are used to add custom features,
> integrations etc... to the main application. It is better to use this
> method instead of hacking the Guacamole code.
>
> You can find more details on extensions in the docs:
>
> http://guacamole.apache.org/doc/gug/guacamole-ext.html
>
>
> Marko
>
> суб, 23. нов 2019. 02.18 Ben Davis <be...@boldidea.org> је написао/ла:
>
>> I would like to make some customizations to the angular javascript app.
>> However, I'm not familiar with the frontend build system that guacamole
>> uses. I tried adding some console.log() statements in the source files
>> in /var/lib/tomcat9/webapps/guacamole, but haven't found where I can change
>> anything.
>>
>
Just to add to what Marko already said, you don't want to try to modify the
code in-place - you want to modify the source and then rebuild and redeploy
the web application, asking with any extensions that you use.

-Nick

Re: How to customize guacamole angular app

Posted by Marko Nikolić <ma...@gmail.com>.
Hi Ben,

Guacamole supports extension, which are used to add custom features,
integrations etc... to the main application. It is better to use this
method instead of hacking the Guacamole code.

You can find more details on extensions in the docs:

http://guacamole.apache.org/doc/gug/guacamole-ext.html

Marko

суб, 23. нов 2019. 02.18 Ben Davis <be...@boldidea.org> је написао/ла:

> I would like to make some customizations to the angular javascript app.
> However, I'm not familiar with the frontend build system that guacamole
> uses. I tried adding some console.log() statements in the source files
> in /var/lib/tomcat9/webapps/guacamole, but haven't found where I can change
> anything.
>
> My main goal right now is inserting a new screen between when the user has
> authenticated and when they are connected to their desktop. Can anyone
> provide some direction on how I can get started hacking around on it?
>
> Ben Davis
>
> *Education Director*
>
> *214-442-1635  | https://boldidea.org/ <http://boldidea.org/>*
>
>
> * <https://boldidea.org/donate>*
>
>