guacamole-customize-loginscreen-extension
guacamole-customize-loginscreen-extension copied to clipboard
Custom Favicon
Hello,
What about an option to change the favicon?
Thank you!
To be honest I am unsure if this can be done in the same fashion this extension handles customizing the login page. A solution aimed at the favicon would have to work across all of Guacamole whereas this extension only alters the appearance of the login page.
It is an interesting proposition and some very quick research makes it seem as if there is not a commonly known/easy way to do this. If you further research the matter and find that it is handled via CSS changes and nothing more then it may be possible to incorporate it into this extension or create another just for the favicon.
It however is something that I do not have the free time to devote to now and it does not seem based on what I can find to be a simple addition to this extension.
I did a little bit of sleuthing and testing, and found a way to do it!
Configure the guac-manifest.json
like this:
{
"guacamoleVersion" : "*",
"name" : "Tempname",
"namespace" : "tempnamespace",
"smallIcon" : "images/logo-64.png",
"largeIcon" : "images/logo-144.png",
"translations" : [
"translations/en.json"
],
"css" : [
"css/login-override.css"
],
"resources" : {
"images/logo-placeholder.png" : "image/png"
"images/logo-64.png" : "image/png",
"images/logo-144.png" : "image/png"
}
}
(and add the favicon png images to the image folder)
{ "guacamoleVersion" : "*", "name" : "Tempname", "namespace" : "tempnamespace", "smallIcon" : "images/logo-64.png", "largeIcon" : "images/logo-144.png", "translations" : [ "translations/en.json" ],
"css" : [
"css/login-override.css"
],
"resources" : {
"images/logo-placeholder.png" : "image/png",
"images/logo-64.png" : "image/png",
"images/logo-144.png" : "image/png"
}
}
in the line
"images/logo-placeholder.png" : "image/png",
there was no coma at the end :)
You're absolutely correct! Oddly enough, that was copy-pasted from my live config that works properly....
Good work, sorry I have not been available to respond. @TheEagle13 do you see an easy way to add this what I have but in such a way its "commented out" so that it only applies if someone "uncomments" and adds the required files in the proper places? Unless maybe there is a better approach I think that way it would work for those not needing to change the favicon but those who want to can uncomment the needed lines and add the required files and be good to go
If this is easy to implement like above feel free to submit a pull request and I can review it and approve/merge it. Thanks
Unfortunately, json doesn't support comments. I'm thinking the easiest way to do that, which eliminates the need to add instructions might be to just add the default guacamole favicon images to the images folder, then people can change them if they so desire. (They are small enough to not add much overhead, and honestly I feel like most people who would want to brand their guacamole might also want to change the favicons. )
Thoughts?
I think that is an excellent idea. Is that something you can do a pull request for? The code update and the default favicons?
I ask as right now I have extremely limited personal time and am unlikely to be able to do this myself in the near future, plus you deserve credit for your work on it.
Thanks
Yes, I'll work on that this weekend. I'm thinking it might be a good idea to create a folder with the extracted jar and instructions on how to create the archive. I personally would prefer that method.
Any updates on this?
@ansonnn07 my proposed update should answer this, let me know.
I made the changes @TheEagle13 suggested and the favicon is working great on Chrome and Firefox. However I am still seeing the Guacamole bowl favicon on Microsoft Edge. I've tried on multiple machines with the same result. Any idea why that browser is not loading the custom icon?