Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3200

Programming • How to create new Start Menu Category and Entry with .deb Package?

$
0
0
I'm trying to do this on the current Linux Mint Ubuntu Cinnamon Version but i want this to ideally
work on any debian based distribution.

I have programmed a linux application. Currently it's only available as a portable but i want to
also distribute it als a .deb Package.

Everything works except i want the .deb package to automatically create my own folder in the start menu
and a program launcher in that folder. So i tried...

Creating a MyTestFolder.directory in /usr/share/desktop-directories with the following content:

Code:

[Desktop Entry]Name=MyTestFolderComment=My Test Folder DescriptionIcon=applications-officeType=Directory
Creating a Program Name.desktop in /usr/share/applications with the following content:

Code:

[Desktop Entry]Icon=/usr/share/icons/program_folder_name/the_icon.pngExec=/usr/local/bin/"program folder name"/the_program.shType=ApplicationCategories=MyTestFolder;Name=Program NameComment=Short Program DescriptionKeywords=Program;Name;
The Program shows up in the Start Menu but in the "Other" Directory. The "MyTestFolder" does NOT show up in the start menu.

desktop-file-validate output:

Code:

/usr/share/applications/Program Name.desktop: error: value "MyTestFolder;" for key "Categories" in group "Desktop Entry" contains an unregistered value "MyTestFolder"; values extending the format should start with "X-"/usr/share/applications/Program Name.desktop: hint: value "MyTestFolder;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
If i change "MyTestFolder" to "X-MyTestFolder":

Code:

/usr/share/applications/Program Name.desktop: hint: value "X-MyTestFolder;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
I'm fighting with this for hours, even tried trouble shooting using AI but with no success.
At this point im desperate and dont know what to do anymore.

Why doesn't this crap work? :D
Can anybody help?

I attached the latest version of my .deb package which you can "decompile" using:

Code:

dpkg-deb -x ./path/to/test.deb ./path/to/destination
Unfortunately i also don't know another program that is getting distributed as a .deb package which i could "copy" from.

I already successfully created a entry in the standard "Office" category. That's not a problem.
The problem is creating my own category instead of using a standard one like "Office".

Deb File Download: https://easyupload.io/lcijn9

Statistics: Posted by Michael_ — 2024-02-05 23:01 — Replies 6 — Views 163



Viewing all articles
Browse latest Browse all 3200

Trending Articles