Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(gui): app icon not showing on Linux #93

Open
t-bre opened this issue Oct 13, 2022 · 4 comments
Open

bug(gui): app icon not showing on Linux #93

t-bre opened this issue Oct 13, 2022 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@t-bre
Copy link
Member

t-bre commented Oct 13, 2022

Description

The app icon is not visible in the dock on Ubuntu (and possibly other Linux distributions?).

Steps To Reproduce

  1. Build app on Ubuntu.
  2. Launch app.
  3. App icon is empty.

Environment

os:        Ubuntu 20.04.5 aarch64 (VM)
compiler:  gcc 9.4.0

Expected Behaviour

The app icon is visible.

Additional Notes

Screenshot 2022-10-13 at 18 15 12 (2)

@t-bre t-bre added the bug Something isn't working label Oct 13, 2022
@t-bre t-bre added this to the v1.1 milestone Oct 13, 2022
@t-bre t-bre added the good first issue Good for newcomers label Oct 13, 2022
@t-bre
Copy link
Member Author

t-bre commented Oct 19, 2022

@inventor02 @tgodfrey0 Does the app icon appear for you guys? Don't know what distro you're on, but I imagine it would be a general Linux issue.

@inventor02
Copy link
Member

Tested on Manjaro/Arch (lol) and Fedora using GNOME and LXDE and the icon doesn't appear on either.

gnome_vcu-gui
lxde_vcu-gui

@inventor02
Copy link
Member

inventor02 commented Oct 19, 2022

We dug a little deeper and found some more context as to why this happens:

On Linux for most desktop environments it is usually the DE itself that controls the icon of the application (so that, for example, users can theme application icons to fit in with the look of their OS). This usually (on GNOME at least) manifests itself in the form of a .desktop file which the user would start the application via (i.e. the .desktop file determines what appears in the launcher/program list).

We made shamelessly copied from another .desktop file (no points for guessing what it was) a vcu-gui.desktop file with the following contents:

[Desktop Entry]
Type=Application
Icon=/home/george/sufst/vcu-gui/res/images/AppIcon_512.png
Name=VCU GUI
Terminal=false
Hidden=false
Categories=Development
Comment=The Rodin Platform is an Eclipse-based IDE for Event-B that provides effective support for refinement and mathematical proof.
Exec=/home/george/sufst/vcu-gui/build/VCU-GUI_artefacts/Debug/VCU\ GUI
Path=/home/george/sufst/vcu-gui

Putting this in ~/.local/share/applications and launching the app via the programs menu causes the icon to display as it should.

Usually this would be done by the install step of the build process or the package manager, but in development this would never happen as we run the files directly.

Basically it is not really a "bug" per se and is more a by-product of the way the desktop environment handles icons - not sure if there's a way to force this but in a production install the .desktop file would usually be created by the installer so this would not be so much of a problem.

There must be a way somewhere to force an icon but as control of the icons is abstracted away from us (handled by JUCE) I'm not sure how/if we can in this context.

@t-bre
Copy link
Member Author

t-bre commented Oct 19, 2022

Awesome work, thanks for figuring that out. I guess if we want to be fancy and make a proper installer/package for the next "production" (ha ha) release we could, but that's way down the list of priorities. Seems to be pretty easy to do and has been discussed on the JUCE forums.

I'll leave this open for now in case we want to come back to it when we prepare the next release.

@t-bre t-bre changed the title bug(gui): app icon not showing on Ubuntu bug(gui): app icon not showing on Linux Oct 19, 2022
@t-bre t-bre removed the good first issue Good for newcomers label Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants