You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Kamal Ezzaki <ka...@gmail.com> on 2019/03/26 13:50:46 UTC

Reloading the application

Hello Please can someone tell me how to edit the login interface, when i
add someting in
the /var/lib/tomcat/webapps/guacamole/app/login/templates/login.html
nothing changes

Re: Reloading the application

Posted by Kamal Ezzaki <ka...@gmail.com>.
Thank you very very much it's working now :)

Le mar. 26 mars 2019 à 16:54, Mike Jumper <mj...@apache.org> a écrit :

> On Tue, Mar 26, 2019, 08:43 Kamal Ezzaki <ka...@gmail.com> wrote:
>
>> i tried so hard to do what you said , i m not a java developper , i don't
>> know what the files are supposed to contain .
>>
>
> If all you will be doing are cosmetic changes, there's no Java involved. A
> .jar file is ultimately just a .zip file with a different extension. What
> makes a .jar recognizable and loadable by Guacamole as a Guacamole
> extension is the presence of guac-manifest.json.
>
> The overall format of Guacamole extensions is documented here:
>
> http://guacamole.apache.org/doc/gug/guacamole-ext.html#ext-file-format
>
> can you please send me an exemple of jar file so i can make changes .
>> please i need this
>>
>
> There was a decent example posted to this list recently:
>
>
> https://lists.apache.org/thread.html/fbcf40c509e410e47e60b7c7ba7cd699343d0cb1ef138540f3f32a60@%3Cuser.guacamole.apache.org%3E
>
> I suggest reading through the above and the description of the format in
> the manual.
>
> - Mike
>
>

-- 

*EZZAKI Kamal*
*Élève** ingénieur en **Administration Réseaux et **Systèmes* *à l'ENSEM*
*Tél : +212 6 81 78 28 64*
*Email : kamalezzaki1@gmail.com <ka...@gmail.com>*

Re: Reloading the application

Posted by Mike Jumper <mj...@apache.org>.
On Tue, Mar 26, 2019, 08:43 Kamal Ezzaki <ka...@gmail.com> wrote:

> i tried so hard to do what you said , i m not a java developper , i don't
> know what the files are supposed to contain .
>

If all you will be doing are cosmetic changes, there's no Java involved. A
.jar file is ultimately just a .zip file with a different extension. What
makes a .jar recognizable and loadable by Guacamole as a Guacamole
extension is the presence of guac-manifest.json.

The overall format of Guacamole extensions is documented here:

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

can you please send me an exemple of jar file so i can make changes .
> please i need this
>

There was a decent example posted to this list recently:

https://lists.apache.org/thread.html/fbcf40c509e410e47e60b7c7ba7cd699343d0cb1ef138540f3f32a60@%3Cuser.guacamole.apache.org%3E

I suggest reading through the above and the description of the format in
the manual.

- Mike

Re: Reloading the application

Posted by Kamal Ezzaki <ka...@gmail.com>.
i tried so hard to do what you said , i m not a java developper , i don't
know what the files are supposed to contain . can you please send me an
exemple of jar file so i can make changes . please i need this

Le mar. 26 mars 2019 à 16:02, Nick Couchman <vn...@apache.org> a écrit :

>
>
> On Tue, Mar 26, 2019 at 10:48 AM Kamal Ezzaki <ka...@gmail.com>
> wrote:
>
>> Okey i get it now , so i need to regenerate the .war isn't ?
>>
>>
>>
> A JAR file, actually - since it's an extension, you generate an extension
> JAR, just like the other authentication extensions, and drop it into the
> GUACAMOLE_HOME/extensions directory.  Creating the JAR is pretty easy -
> create the directory structure, with the guac-manifest at the base, and the
> folders and files as specified in the manifest (e.g. resources/logo.png for
> the logo, if that's where the guac-manifest.json file specifies it).  Once
> you have everything as you want it, zip up the folder into a JAR file.  Do
> this inside the folder, so that guac-manifest.json is at the base of the
> zip.
>
> So, you have a directory structure like this:
> guacamole-branding
> ├── guacamole.manifest
> ├── resources
> │   └── logo.png
> └── translations
>     └── en.json
>
> You would then:
> $ cd guacamole-branding
> $ zip -r ../guacamole-branding.jar
>
> Then drop "guacamole-branding.jar" into your GUACAMOLE_HOME/extensions
> folder and reload the application.  You might also have to clear browser
> cache to get things to display properly, especially if you rework the
> branding several times as you adjust things.
>
> -Nick
>


-- 

*EZZAKI Kamal*
*Élève** ingénieur en **Administration Réseaux et **Systèmes* *à l'ENSEM*
*Tél : +212 6 81 78 28 64*
*Email : kamalezzaki1@gmail.com <ka...@gmail.com>*

Re: Reloading the application

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Mar 26, 2019 at 10:48 AM Kamal Ezzaki <ka...@gmail.com>
wrote:

> Okey i get it now , so i need to regenerate the .war isn't ?
>
>
>
A JAR file, actually - since it's an extension, you generate an extension
JAR, just like the other authentication extensions, and drop it into the
GUACAMOLE_HOME/extensions directory.  Creating the JAR is pretty easy -
create the directory structure, with the guac-manifest at the base, and the
folders and files as specified in the manifest (e.g. resources/logo.png for
the logo, if that's where the guac-manifest.json file specifies it).  Once
you have everything as you want it, zip up the folder into a JAR file.  Do
this inside the folder, so that guac-manifest.json is at the base of the
zip.

So, you have a directory structure like this:
guacamole-branding
├── guacamole.manifest
├── resources
│   └── logo.png
└── translations
    └── en.json

You would then:
$ cd guacamole-branding
$ zip -r ../guacamole-branding.jar

Then drop "guacamole-branding.jar" into your GUACAMOLE_HOME/extensions
folder and reload the application.  You might also have to clear browser
cache to get things to display properly, especially if you rework the
branding several times as you adjust things.

-Nick

Re: Reloading the application

Posted by Kamal Ezzaki <ka...@gmail.com>.
Okey i get it now , so i need to regenerate the .war isn't ?


Le mar. 26 mars 2019 à 15:43, Nick Couchman <vn...@apache.org> a écrit :

> On Tue, Mar 26, 2019 at 10:32 AM Kamal Ezzaki <ka...@gmail.com>
> wrote:
>
>> Can you please help .
>> so i need to add new file .html with this content :
>>
>> <meta name="replace" content=".login-ui .login-dialog">
>>
>> <div class="login-ui" ng-class="{error: loginError, continuation: isContinuation(), initial: !isContinuation()}" >
>>
>>     <!-- Login error message -->
>>     <p class="login-error" translate="{{loginError.key}}"
>>        translate-values="{{loginError.variables}}"></p>
>>
>>     <div class="login-dialog-middle">
>>
>>         <div class="login-dialog">
>>
>>             <form class="login-form" ng-submit="login()">
>>
>>                 <!-- Guacamole version -->
>>                 <div>*<img src="newlogo.png">*</div>
>>
>>
> So you're trying to re-brand the application?  This is doable through the
> extension interface that Mike mentioned:
>
> http://guacamole.apache.org/doc/gug/guacamole-ext.html
>
> If you look about 1/3 of the way down the page, there are a couple of
> example guac-manifest.json files that are simple examples for branding,
> including how to change the logo.
>
> -Nick
>

Re: Reloading the application

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Mar 26, 2019 at 10:32 AM Kamal Ezzaki <ka...@gmail.com>
wrote:

> Can you please help .
> so i need to add new file .html with this content :
>
> <meta name="replace" content=".login-ui .login-dialog">
>
> <div class="login-ui" ng-class="{error: loginError, continuation: isContinuation(), initial: !isContinuation()}" >
>
>     <!-- Login error message -->
>     <p class="login-error" translate="{{loginError.key}}"
>        translate-values="{{loginError.variables}}"></p>
>
>     <div class="login-dialog-middle">
>
>         <div class="login-dialog">
>
>             <form class="login-form" ng-submit="login()">
>
>                 <!-- Guacamole version -->
>                 <div>*<img src="newlogo.png">*</div>
>
>
So you're trying to re-brand the application?  This is doable through the
extension interface that Mike mentioned:

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

If you look about 1/3 of the way down the page, there are a couple of
example guac-manifest.json files that are simple examples for branding,
including how to change the logo.

-Nick

Re: Reloading the application

Posted by Kamal Ezzaki <ka...@gmail.com>.
Can you please help .
so i need to add new file .html with this content :

<meta name="replace" content=".login-ui .login-dialog">

<div class="login-ui" ng-class="{error: loginError, continuation:
isContinuation(), initial: !isContinuation()}" >

    <!-- Login error message -->
    <p class="login-error" translate="{{loginError.key}}"
       translate-values="{{loginError.variables}}"></p>

    <div class="login-dialog-middle">

        <div class="login-dialog">

            <form class="login-form" ng-submit="login()">

                <!-- Guacamole version -->
                <div>*<img src="newlogo.png">*</div>

                <div class="version">
                    <div class="app-name">{{'APP.NAME' | translate}}</div>
                    <div class="version-number">{{'APP.VERSION' |
translate}}</div>
                </div>

                <!-- Login message/instructions -->
                <p ng-show="helpText" translate="{{helpText.key}}"
                   translate-values="{{helpText.variables}}"></p>

                <!-- Login fields -->
                <div class="login-fields">
                    <guac-form namespace="'LOGIN'"
content="remainingFields" model="enteredValues"></guac-form>
                </div>

                <!-- Submit button -->
                <div class="buttons">
                    <input type="text" name="login" class="login"
value="{{'LOGIN.ACTION_LOGIN' | translate}}"/>
                    <input type="submit" name="login"
class="continue-login" value="{{'LOGIN.ACTION_CONTINUE' |
translate}}"/>
                </div>

            </form>

        </div>

    </div>

</div>



Le mar. 26 mars 2019 à 15:04, Mike Jumper <mj...@apache.org> a écrit :

> On Tue, Mar 26, 2019, 06:51 Kamal Ezzaki <ka...@gmail.com> wrote:
>
>> Hello Please can someone tell me how to edit the login interface, when i
>> add someting in
>> the /var/lib/tomcat/webapps/guacamole/app/login/templates/login.html
>> nothing changes
>>
>
> You can't (and shouldn't) edit the interface this way. Changes to the
> interface need to be made through extensions:
>
> http://guacamole.apache.org/doc/gug/guacamole-ext.html#ext-patch-html
>
> - Mike
>
>

Re: Reloading the application

Posted by Mike Jumper <mj...@apache.org>.
On Tue, Mar 26, 2019, 06:51 Kamal Ezzaki <ka...@gmail.com> wrote:

> Hello Please can someone tell me how to edit the login interface, when i
> add someting in
> the /var/lib/tomcat/webapps/guacamole/app/login/templates/login.html
> nothing changes
>

You can't (and shouldn't) edit the interface this way. Changes to the
interface need to be made through extensions:

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

- Mike