Menu

#2067 task bar icon missing on linux mint 22

v3.x
pending-fixed
compyx
None
GTK3
User Interface
2025-03-03
2024-08-28
exrom
No

Hi,

on Linux Mint 22 (the latest LTS, released July 2024) the task bar icon for running x64sc is empty and does not show any icon - see screenshot 1.

I tried this in a VM, freshly installed from linuxmint-22-cinnamon-64bit.iso.
I built vice myself, following the instructions from vice/doc/building/Linux-GTK3-Howto.txt:

sudo apt-get install ....
svn co ...
./autogen.sh
./configure --enable-gtk3ui
make
./src/x64sc

When i install VICE from mint's update manager (i needed to enable 'show unverfied flatpaks' first) a commodore icon is shown. See screenshot 2.
As i understand the gtk3 code, i expected a machine specific icon rather the generic commodore one.

After this, i re-ran my self-built src/x64sc and now, there is the expected C64 icon - see screenshot 3.

Before taking the screenshots for flatpak i changed the desktop language from de to en. I intentionally switched back to de to exclude the behaviour coming from this setting.
The observed behaviour is not related to the desktop language, is it?
VICE has removed translated strings and just uses en always, correct?. It is strange that credits and close buttons are still translated, but that's a different story.

Am a doing something wrong when i build vice myself in order to get correct icons?
Any idea, why the flatpak version has a different icon? Is this built differently?

Thank you.

5 Attachments

Discussion

  • gpz

    gpz - 2024-08-28

    configure with --enable-desktop-files, that should fix it

     
  • exrom

    exrom - 2024-08-30

    This switch indeed fixed it in my VM.

    On my native Linux Mint 21.3, i tried the same, re-cloned svn trunk, built with
    ./configure --enable-gtk3ui --enable-desktop-files --with-flac --enable-debug-gtk3ui --enable-debug
    when i start with src/x64sc i see no icon in the task bar.

    Amongst other .desktop files, i see ./build/debian/x64sc.desktop which contains

     [Desktop Entry]
     Type=Application
     Name=VICE (x64sc)
     Comment=Commodore 64 emulator
     Exec=/usr/bin/x64sc
     Terminal=false
     Icon=/usr/share/icons/hicolor/scalable/apps/x64sc.svg
    Categories=Game,Emulator
    

    After sudo make install, i ran x64sc directly but also no task bar icon is there.
    A file /usr/share/icons/hicolor/scalable/apps/x64sc.svg is not present.

     
  • gpz

    gpz - 2024-08-30

    did you restart the WM? (some require it)

     
  • exrom

    exrom - 2024-09-25

    I repeated the test with a mint 21.4 VM and a mint 22 VM. I use VirtualBox 7.0.
    Both VMs i installed from scratch (hard disk installation, no live system). I installed the guest additions in each.
    Then, after apt-get for all dependencies, i run

        cd ~
        rm -rf vice
        svn co https://svn.code.sf.net/p/vice-emu/code/trunk/ vice
        cd ~/vice/vice
        ./autogen.sh
        ./configure --enable-gtk3ui --enable-desktop-files
        make -j 4
        sudo make install
        ./src/x64sc
    

    in both of them, x64sc comes up without any desktop icon in the task bar. A reboot of each VM does not help. It makes no difference if i start src/x64sc or x64sc (the installed version at /usr/local/bin/x64sc). Console logs attached for each VM.

    In both VMs, this file exists:

    cat ./vice/vice/build/debian/x64sc.desktop 
    [Desktop Entry]
    Type=Application
    Name=VICE (x64sc)
    Comment=Commodore 64 emulator
    Exec=/usr/bin/x64sc
    Terminal=false
    Icon=/usr/share/icons/hicolor/scalable/apps/x64sc.svg
    Categories=Game,Emulator
    

    Though, the reference file does not exist
    user@user-VirtualBox:~$ ls /usr/share/icons/hicolor/scalable/apps/x64sc.svg
    ls: cannot access '/usr/share/icons/hicolor/scalable/apps/x64sc.svg': No such file or directory

     
  • gpz

    gpz - 2024-09-25

    I think the files in build/debian are probably only used when you actually build a .deb

    If you compile yourself it will use the files from src/arch/gtk3/data/unix/ which are then patched to contain the prefix you used during configure, and installed in /usr/share/applications/

    For me (with prefix=/usr/games) it looks like this:

    $ cat /usr/share/applications/vice-org-x64sc.desktop
    [Desktop Entry]
    Type=Application
    Name=VICE (x64sc)
    Comment=Cycle-exact C64 emulator (Gtk3 UI)
    Exec=/usr/games/bin/x64sc
    Terminal=false
    Icon=/usr/games/share/vice/common/C64_1024.svg

    ... and the icon should point into the install location of VICE ....

    $ file /usr/games/share/vice/common/C64_1024.svg
    /usr/games/share/vice/common/C64_1024.svg: SVG Scalable Vector Graphics image

    @compyx can tell for sure, hopefully :)

     
  • compyx

    compyx - 2024-09-26

    Yes, the files in build/debian are used by the Github Actions to build the .deb packages. they aren't used when building and installing from source. As @groepaz stated the .desktop files are generated during build and installed into /usr/share/applications/ when running make install.

    On my Debian machine I have this:

    $ find /usr/ -name '*x64*.desktop'
    /usr/share/applications/vice-org-x64dtv.desktop
    /usr/share/applications/vice-org-x64sc.desktop
    /usr/share/applications/vice-org-x64.desktop
    

    That's where the .desktop files should live according the XDG specification, along with ~/.local/share/applications (which is where Steam installs .desktop files it seems).

    It's been a while since I looked at any of this, perhaps things have changed or we need an additional command to make the desktop environment "see" the installed files, such as sudo update-desktop-database. I'll install Virtualbox and Linux Mint a VM to see what could be wrong.

    I assume Cinnamon is still the default desktop on Mint and you're using that?

    Edit: I missed "freshly installed from linuxmint-22-cinnamon-64bit.iso" in the OP, so yes =)

     

    Last edit: compyx 2024-09-26
  • exrom

    exrom - 2024-09-27

    yes, it runs cinnamon by default.

    $ cinnamon --version
    Cinnamon 6.2.7
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Linuxmint
    Description:    Linux Mint 22
    Release:    22
    Codename:   wilma
    

    The files you mention exist here too.

    $  find /usr/ -name '*x64*.desktop'
    /usr/share/applications/vice-org-x64sc.desktop
    /usr/share/applications/vice-org-x64dtv.desktop
    /usr/share/app-install/desktop/vice:x64.desktop
    

    sudo update-desktop-database does not solve the problem.

     
  • gpz

    gpz - 2024-10-05

    please try again, apparently the category was wrong

     
  • exrom

    exrom - 2024-10-05

    Still not working unfortunately. I tried r45352 with above commands.
    Neither sudo update-desktop-database or reboot helps.

     
  • compyx

    compyx - 2024-10-06

    Apparently the application icons are now supposed to be taken from the .desktop files and not by calling gtk_window_set_icon(), which is now a fallback for older desktops and Windows/Mac and is removed in Gtk 4. The issue seems to be the icons need to be in the /usr/share/icons/hicolor directory and not where we install them ($PREFIX/share/vice/, pointing to files outside the system icons directory (in our .desktop files) doesn't work anymore on modern-ish desktops.

    So I'll be looking into using xdg-icon-resource install to install our icons into the appropriate directory and register them with the system. I'll need some make uninstall hook as well to call xdg-icon-resource uninstall to properly remove the icons.

    The bit with the proper categories should have fixed the icons showing up the menus, in my Mint 22 VM the VICE icons now show under a "Emulators" category in the main menu.

     
  • compyx

    compyx - 2024-10-06

    This appears to work on Mint 22:

    An x64sc.desktop file in /usr/share/applications/ with the following:

    [Desktop Entry]
    Type=Application
    Name=VICE (x64sc)
    Comment=Commodore 64 emulator
    Exec=/usr/local/bin/x64sc
    Terminal=false
    Icon=vice-C64_48.svg
    Categories=Game;Emulator;
    

    And then running:

    xdg-icon-resource install --theme hicolor --context apps --size 48 vice-C64_48.png
    

    (having copied data/common/C64_48.png to vice-C64_48.svg to provide a vendor prefix of "vice").

    I'll check if I can update the .deb package files in build/debian/ to use the same format so we won't longer need to generate the .desktop files from a template for --enable-desktop-files. And rework the GResource bundle used for Windows/Mac and the gtk_window_set_icon() fallback to use the (to be) renamed icons.

     
  • exrom

    exrom - 2024-10-07

    Hi compyx,

    yes, i confirm, there is a menu entry Emulators (though this itself does not have an icon) where our links are present - with their icons.

    After copying data/common/C64_48.png to vice-C64_48.png and running
    After creating x64sc.desktop and running

    xdg-icon-resource install --theme hicolor --context apps --size 48 vice-C64_48.png
    

    I now see task bar icons on mint 22.

     
  • compyx

    compyx - 2025-02-15

    I finally had some time to try to properly fix this issue and my testing shows the icons working properly in Linux Mint 22 (Cinnamon), Debian (Gnome Shell), Ubuntu 22.04LTS (Gnome Shell) and Ubuntu 24.10 (Gnome Shell and KDE Plasma).

    The make install and make uninstall rules now use xdg-icon-resource and desktop-file-install to install and uninstall icons and .desktop files in their correct location and with correct names, running update-desktop-database as a final step to make the desktop environment aware of the changes.

    Icons are installed in 32x32, 48x48, 64x64 and 256x256 sizes, which is probably enough for practical purposes (application window icon, toolbar/taskbar of different sizes and menu's).
    No 22x22 icons, we have 24x24 icons, but if required I could scale the original icons to that size, but it won't be pretty at that small size.

     
  • compyx

    compyx - 2025-02-28
    • status: open --> pending-fixed
    • assigned_to: compyx
     
  • exrom

    exrom - 2025-03-02

    Hello compyx,

    i re-tested it with latest rev 45511 in vbox 7.0.16 with linuxmint-22-cinnamon-64bit.iso

    After intall from scratch, i ran the following commands:
    sudo apt-get -y install subversion autoconf automake build-essential byacc flex xa65 gawk libgtk-3-dev texinfo texlive-fonts-recommended texlive-latex-extra dos2unix libpulse-dev libasound2-dev libglew-dev libcurl4-openssl-dev libevdev-dev

    cd ~ && rm -rf vice
    svn co https://svn.code.sf.net/p/vice-emu/code/trunk/ vice
    cd ~/vice/vice
    ./autogen.sh
    ./configure --enable-gtk3ui --enable-desktop-files
    make -j 4

    sudo make install

    Then i reboot the system and run x64sc. The icons now shows up correctly in the task bar and the Games section in the desktop menu - see screenshot.
    The icon does not show up immediatley after make install without prior reboot (though make install runs several "xdg-icon-resource install", "desktop-file-install" and "update-desktop-database" at the end).
    But this is a minor thing. A reboot should be acceptable and a fix would be nice to have...

    So many thanks gpz and compyx for fixing this bug!

    bye, exrom

     
  • compyx

    compyx - 2025-03-03

    Good to hear it works. Too bad about the icons not immediately showing up. But afaik we run all required commands to properly install the icons and desktop files, which works well in Gnome and KDE, so this could be a Cinnamon-specific issue.

    Instead of rebooting just logging out and logging back in should restart the Cinnamon session and make Cinnamon update its menu structures, should be less annoying than having to reboot.

     

Log in to post a comment.

MongoDB Logo MongoDB