Shinyproxy by default loads with the spring boot logo as the favicon image. How do you change this? It would be nice to have the ability to change the favicon in the application.yaml file so the favicon could be changed in the same manner the navbar image is changed.
I have created a
static folder and placed my
favicon.ico in there. When I start
java -cp static:shinyproxy-1.0.2.jar org.springframework.boot.loader.JarLauncher
this favicon is used.
@rstub Where did you place you static folder? I’ve tried /opt/shinyproxy/static and /etc/shinyproxy/static and chmod -R 777 on both folders, but it still doesn’t show.
@fifthace I placed the
static folder in the same directory as the
jar file. You could also use absolute paths like
java -cp </path/to/static>:</path/to/shinyproxy.jar> org.springframework.boot.loader.JarLauncher
I am still struggling with this. I use the Ubuntu .deb package in Ubuntu 16.04. The package creates a systemd service that launches Shinyproxy at boot. There are two files of interest (I think):
Both are identical.
In both files, I have attempted to change the ExecStart line from this:
ExecStart=/usr/bin/java -jar /opt/shinyproxy/shinyproxy.jar
ExecStart=/usr/bin/java -cp /opt/shinyproxy/static:/opt/shinyproxy/shinyproxy.jar org.springframework.boot.loader.JarLauncher
where /opt/shinyproxy/static contains the favicon and is owned by the user shinyproxy with 644 permissions.
I then do:
sudo systemctl daemon-reload
sudo systemctl restart shinyproxy.service
But the new favicon isn’t loaded. I have also tried to reboot my machine without any joy. Any idea what I’m missing?
is there any solution for this issue/question ? the
logo-url is not a valid option for this?
@tverbeke Many thanks for this. This little branding exercise really makes the service we are providing appear more professional .
However, I still can’t get it to work after upgrading to ShinyProxy 2.0.5 running in Ubuntu 16.04 (I also tried 18.04). Here is the top of my application.yml:
proxy: title: My app logo-url: file:///var/www/html/logo_white.png favicon-path: file:///var/www/html/favicon_64_64.png
The logo_white shows up as expected, in the navbar. The favicon, which is a 64x64 pixel .png, does not show up, even when I restart shinyproxy and clear the browser cache.
I have tested that the png works as a favicon in a simple html page on the same server, pointing to the same file, in three different browsers. I have also tested with a 16x16 pixel .ico file in ShinyProxy, without success. How can I debug this?
logo-url a file URI scheme can be used (
file://), but for
favicon-path only absolute and relative paths are supported i.e.
/var/www/html/favicon_64_64.png in your case.
Does that help?
I’ve tried this now, restarted the server, but it still doesn’t show. I have tried both png and ico files and
/var/www/html/favicon_64_64.png and placing favicon_64_64.png/ico in both the /etc/shinyproxy/ and /opt/shinyproxy/ folders and then used it as a relative path. I’ve chmod 777 the file. I’m a bit stuck… Did anyone else have success with this?
With shinyproxy 1.1.1 we were able to simplify the set-up described above, since
static/favicon.ico is used even when shinyproxy is started as
java -jar shinyproxy.jar.
With shinyproxy 2 we are still fighting with other problems, c.f. https://github.com/openanalytics/shinyproxy/issues/106.
Ok, in the end this worked:
It didn’t work when I first did this, but after a few days (?!) with cache being cleared out, it suddenly appeared.