RetroFed Forum
Your home away from modern life.
How to add new item to KDE Application Launcher from terminal?
Post Reply
AuthorMessage
podbrushkin mander.xyz podbrushkin@mander.xyz
Joined: 2025-08-28
Quote

How do you add new application to this "All Applications" menu (and optionally to some of categories) without using GUI "Edit Applications" menu (named "KDE Menu Editor")?

It may sound like a simple task but I've already spent several hours on this with no success.

When you download an app instead of getting it from package manager, you may want to add it to Application Launcher so it will not get lost.

I have myapp.AppImage file, it's working, I've created .desktop file and tried to place it into some system directories (e.g. ~/.local/share/applications/myapp.desktop) or calling xdg-desktop-menu install myfile.desktop but to no avail. New app doesn't appear in All Applications or specified category, it appears only as a search result, when you start typing its name.

Creating new menu items with GUI "KDE Menu Editor" affects "/home/user/.config/menus/applications-kmenuedit.menu" XML file, but this file doesn't look like it should be edited manually.

Can you please try adding custom executable to this menu yourself and see if you will succeed? Am I trying to do something quirky and is wrong about expecting this task to be simple?

My system is Kubuntu 26.04, KDE Plasma 6.6.6.

79   Original
Vivian lemmy.blahaj.zone thestrike@lemmy.blahaj.zone
Joined: 2026-02-11
#2 · Quote Reply

did you try update-desktop-database after adding it to .local/share/applications?

That might be an arch command, not sure

7
Vivian lemmy.blahaj.zone thestrike@lemmy.blahaj.zone
Joined: 2026-02-11
#3 · Quote Reply

did you try update-desktop-database after adding it to .local/share/applications? That might be an arch command, not sure

or re log in

1
azvasKvklenko sh.itjust.works azvasKvklenko@sh.itjust.works
Joined: 2023-06-25
#4 · Quote Reply

Just adding the file as you did should make it appear there right away, so make sure your .desktop follows the standard and syntax is correct.

3
podbrushkin mander.xyz podbrushkin@mander.xyz
Joined: 2025-08-28
#5 · Quote Reply

Ok, finally I've found solution! Obviously I found it 0.0001 seconds after I publicly asked this question.

Problem is that "Games" menu in mentioned /home/user/.config/menus/applications-kmenuedit.menu XML file does not contain a <Merge type="files"/> tag, that's why KDE Kickoff Application Menu was ignoring .desktop files if they belong to this category. And every sample .desktop file I've created probably belonged to Games category.

I changed this XML file to be like this:

<Menu>
  <Name>Games</Name>
  <Include/>
  <Exclude>
   <Filename>Quake.desktop</Filename>
  </Exclude>
  <Layout>
   <Merge type="menus"/>
   <Merge type="files"/>

Now it seems like everything works as expected. I don't understand why it doesn't work by default.

54
podbrushkin mander.xyz podbrushkin@mander.xyz
Joined: 2025-08-28
#6 · Quote Reply

did you try update-desktop-database after adding it to .local/share/applications? That might be an arch command, not sure

Yes, I've tried quite a lot of commands and combinations, restarts etc, but seems like problem was in some obscure tag in some obscure XML file which I've never touched before. I've added a comment with solution.

4
Snot Flickerman lemmy.blahaj.zone SnotFlickerman@lemmy.blahaj.zone
Joined: 2023-10-24
#7 · (edited) Quote Reply

Interesting. I have managed all of mine on a recent Kubuntu 26.04 install through the GUI and it does indeed seem to automatically add that information to the XML file, because I have never run into such a problem but when looking at the file you referenced I indeed see the <Merge type="files"/> a lot of places.

4
Snot Flickerman lemmy.blahaj.zone SnotFlickerman@lemmy.blahaj.zone
Joined: 2023-10-24
#8 · (edited) Quote Reply

Ok, finally I've found solution! Obviously I found it 0.0001 seconds after I publicly asked this question. Problem is that "Games" menu in mentioned /home/user/.config/menus/applications-kmenuedit.menu XML file does not contain a &lt;Merge type="files"/&gt; tag, that's why KDE Kickoff Application Menu was ignoring .desktop files if they belong to this category. And every sample .desktop file I'...

Also, btw, you're the best kind of question asker, because you figured out an obscure problem and then provided the answer for the rest of us. I learned something and bookmarked this thread in case I ever run into such a problem and forgot how to fix it. Cheers and thanks, mate.

43
bridgeenjoyer sh.itjust.works bridgeenjoyer@sh.itjust.works
Joined: 2025-06-06
#9 · Quote Reply

I struggle with this on mint. I'll add it but then it refuses to launch.

3
Ephera lemmy.ml Ephera@lemmy.ml
Joined: 2020-05-31
#10 · Quote Reply

I struggle with this on mint. I'll add it but then it refuses to launch.

Can you launch the original executable by itself?

So, if you run the command, that you put into the .desktop file, in a terminal, does that work?

4
bridgeenjoyer sh.itjust.works bridgeenjoyer@sh.itjust.works
Joined: 2025-06-06
#11 · Quote Reply

Can you launch the original executable by itself? So, if you run the command, that you put into the .desktop file, in a terminal, does that work?

I'll have to try that,

2
MonkderVierte lemmy.zip MonkderVierte@lemmy.zip
Joined: 2025-05-30
#12 · (edited) Quote Reply

cp /usr/share/applications/whatever.desktop ~/.local/share/applications/your-app.desktop

Edit the file, it's a pretty obvious config.

Edit: you may delete all the translation strings.

2
db2 lemmy.world db2@lemmy.world
Joined: 2023-07-29
#13 · Quote Reply

Also, btw, you're the best kind of question asker, because you figured out an obscure problem and then provided the answer for the rest of us. I learned something and bookmarked this thread in case I ever run into such a problem and forgot how to fix it. Cheers and thanks, mate.

This is still the internet, three years from now when you come back that and only that comment will have been deleted.

5
Snot Flickerman lemmy.blahaj.zone SnotFlickerman@lemmy.blahaj.zone
Joined: 2023-10-24
#14 · Quote Reply

This is still the internet, three years from now when you come back that and only that comment will have been deleted.

Possibly, but I tend to think that only happened on reddit due to corporate influence and trying to use that as a way to take a stand against a corporation. I think the same is unlikely to happen on smaller sites, more likely the whole site could be gone. Anyway, counterpoint is MetaFilter, which has been around since 1999 and you can find comments from waaaaaaaaaaay back very easily, it's all indexed for searching quite well.

2
Ghoelian piefed.social Ghoelian@piefed.social
Joined: 2025-03-19
#15 · Quote Reply

xdg-desktop-menu install

I had no idea that command exists, I've just been looking up the location of desktop files until i finally remembered lol

4
podbrushkin mander.xyz podbrushkin@mander.xyz
Joined: 2025-08-28
#16 · Quote Reply

xdg-desktop-menu install I had no idea that command exists, I've just been looking up the location of desktop files until i finally remembered lol

To me it looked like this command just copies provided .desktop file to ~/.local/share/applications/ directory. Also, there's xdg-desktop-menu uninstall whatever.dekstop which is effectively the same as removing .desktop file from this directory. Probably just copying and removing files is more natural.

1
thevoidzero lemmy.world thevoidzero@lemmy.world
Joined: 2024-01-25
#17 · Quote Reply

To me it looked like this command just copies provided .desktop file to ~/.local/share/applications/ directory. Also, there's xdg-desktop-menu uninstall whatever.dekstop which is effectively the same as removing .desktop file from this directory. Probably just copying and removing files is more natural.

In Arch I just copy the . desktop application to the system directory through makepkg and it works.

1
podbrushkin mander.xyz podbrushkin@mander.xyz
Joined: 2025-08-28
#18 · Quote Reply

Also, btw, you're the best kind of question asker, because you figured out an obscure problem and then provided the answer for the rest of us. I learned something and bookmarked this thread in case I ever run into such a problem and forgot how to fix it. Cheers and thanks, mate.

You’re welcome. I myself not once and not twice stumbled upon long wanted solution in obscure corners of internet.

2
chunkystyles sopuli.xyz chunkystyles@sopuli.xyz
Joined: 2023-06-29
#19 · Quote Reply

For appimages, I use https://github.com/mijorus/gearlever

1
Post Reply
Back to top