Reply to topic

Application launcher update after creating .desktop file

stormrainbow
Registered Member
Posts
19
Karma
0
Regarding: What is the best way to update the Application launcher (xdg Menu) after creating a .desktop file

I think the easiest way to integrate a non-repository application to your system is shown below. I'm doing everything from the console so I can see additional messages.

1) To create the desktop file (or mimetype) use: kcmshell5 filetypes
2) In my test case, I selected "mimetype text" > "plain" and clicked "Add" under "Application Preference Order". I entered "false" in the program text box. Clicked "Apply". For testing purposes, I used the program "false".
3) Edit the new file created in ~/.local/share/applications, and at a minimum add/change:
Categories=Development
NoDisplay=false

4) The question is, what to do next? I know a and c below work for sure. By work, I mean I would execute the command below and immediately expand the Application Launcher and look under Development and see "false".

What is the best way to update the Application launcher (xdg Menu) after creating a .desktop file?

a) sudo update-desktop-database
b) update-desktop-database ~/.local/share/applications
c) kbuildsycoca5
d) Other ?

What is the best way to reverse this process?

The user can use "Edit Applications" on the Application Launcher to "remove" the menu entry.

After the above, there is a section in .config/mimeapps.list, [Removed Associations].
I assume that whatever process runs will also remove the entry in .config/menus/application-kmenuedit.menu, too.

They can also manually remove the desktop file from "~/.local/share/applications".

What application actually does the removal and when? Is it something that a user can run?

I am not sure why, but the above create procedure also created an entry in .config/kglobalshortcutsrc
Who cleans that up?

This procedure also created a History entry in ~/config/kcmshell5rc. I don't see any option (commandl line or GUI) of getting rid of it.
User avatar knownperspective
Registered Member
Posts
4
Karma
0
OS
Thanks for the guide! I'll try it out :)
stormrainbow
Registered Member
Posts
19
Karma
0
knownperspective wrote:Thanks for the guide! I'll try it out :)


I'm glad it was helpful, but I really do have those questions :-)

What is the best way to update the Application launcher (xdg Menu) after creating a .desktop file?
What is the best way to reverse this process?
What application actually does the removal and when? Is it something that a user can run?
Who cleans that up the entry in .config/kglobalshortcutsrc


I'd be interested in how others add an application to the Application Launcher or add a new mimetype. My using kcmshell5 filetypes was a quick way to explain a task without having to explain XDG and freedesktop.org.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bartoloni, Bing [Bot], claydoh, Google [Bot], koffeinfriedhof, londontimes, mari, Sogou [Bot], Yahoo [Bot]