Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Desktop entries: Can't change the category for one icon
#1
Dear fellow Linux users,

I've recently installed the Budgie DE and a few applications in my Arch environment in VirtualBox, and I have found the placement of icons in the application menu not to my liking.
After reading the excellent Arch Wiki "Desktop entries", and also reading the XDE desktop entry specifications on freedesktop.org, I have managed to reorganize the menu mostly by making a copy of the .desktop files in question from /usr/share/applications to my ~/.local/share/applications directory, and editing the line with Categories= to have the category I want the icon to appear in.
With one exception (I don't have too much programs installed yet, so until now, it's only one), the GNOME File Roller.

The /usr/share/desktop-directiries directory contains the Utility.directory (which calls itself "Accessories"), and X-GNOME-Utilities.directory (which calls itself "Utilities"). So I'd expect if I change the Categories line in a .desktop file to Utility, it would make it appear in Accessories, if I change it to X-GNOME-Utilities, than it would appear under Utilities. And it happens to most of the .desktop files, but not for org.gnome.FileRoller.desktop so what I did is to add NoDisplay=false to that desktop file, and just create a new .desktop file for the File Roller icon, which for some reason works, but definitely not an elegant solution.

Could anyone help me why does this application still appears in Utilities? Here's the contents of the file ~/.local/share/applications/org.gnome.FileRoller.desktop (removed localization entries for clarity, full file at https://pastebin.com/6Czxa8f0) (please ignore the NoDisplay=false flag, if that's there that hides the entry well, if I delete that line, it appears in Utilities.

Code:
[Desktop Entry]
Name=Archive Manager
Comment=Create and modify an archive
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=zip;tar;extract;unpack;
TryExec=file-roller
Exec=file-roller %U
StartupNotify=true
Terminal=false
Type=Application
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.ArchiveManager
Categories=GTK;GNOME;Utility;Archiving;Compression;
NoDisplay=true
NotShowIn=KDE;
MimeType=application/epub+zip;application/gzip;application/vnd.android.package-archive;application/vnd.ms-cab-compressed;application/vnd.debian.binary-package;application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-archive;application/x-arj;application/x-brotli;application/x-bzip-brotli-tar;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-chrome-extension;application/x-deb;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lrzip;application/x-lrzip-compressed-tar;application/x-lz4;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lz4-compressed-tar;application/x-lzop-compressed-tar;application/x-ms-wim;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-source-rpm;application/x-rzip;application/x-rzip-compressed-tar;application/x-tar;application/x-tarz;application/x-stuffit;application/x-war;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/x-zoo;application/zip;
X-GNOME-DocPath=file-roller/file-roller.xml
X-GNOME-UsesNotifications=true

And my custom icon, and this appears in the right place, under Accessories (~/.local/share/applications/my-icon.desktop):

Code:
[Desktop Entry]
Version=1.0
Name=File Roller
Comment=Archive manager
Exec=file-roller
Icon=org.gnome.ArchiveManager
Terminal=false
Type=Application
Categories=GTK;GNOME;Utility;Archiving;Compression;

Thank you in advance.
My top 10 reasons to still use Arch after 2 months on my main PC at home.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)