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.
configure with --enable-desktop-files, that should fix it
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
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.
did you restart the WM? (some require it)
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
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:
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
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 :)
Yes, the files in
build/debianare used by the Github Actions to build the .deb packages. they aren't used when building and installing from source. As @groepaz stated the.desktopfiles are generated during build and installed into/usr/share/applications/when runningmake install.On my Debian machine I have this:
That's where the
.desktopfiles should live according the XDG specification, along with~/.local/share/applications(which is where Steam installs.desktopfiles 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
yes, it runs cinnamon by default.
The files you mention exist here too.
sudo update-desktop-database does not solve the problem.
please try again, apparently the category was wrong
Still not working unfortunately. I tried r45352 with above commands.
Neither sudo update-desktop-database or reboot helps.
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/hicolordirectory 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 installto install our icons into the appropriate directory and register them with the system. I'll need somemake uninstallhook as well to callxdg-icon-resource uninstallto 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.
This appears to work on Mint 22:
An
x64sc.desktopfile in/usr/share/applications/with the following:And then running:
(having copied
data/common/C64_48.pngtovice-C64_48.svgto 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 thegtk_window_set_icon()fallback to use the (to be) renamed icons.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
I now see task bar icons on mint 22.
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 installandmake uninstallrules now usexdg-icon-resourceanddesktop-file-installto install and uninstall icons and .desktop files in their correct location and with correct names, runningupdate-desktop-databaseas 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.
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
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.