Score:0

How to ad appimage to "Open With" menu

cz flag

I installed Lightburn software appimage on Ubuntu 20.04 LTS. The files created in Lightburn are saved as either .lbrn or .lbrn2 but when I navigate to these files in the file explorer they don't associate with the app. Also, the app does not show when I right click and choose "Open With". Is there a way I can ad this app to the "Open With" menu?

The app is stored in: ~/.local/share/LightBurn

lightburn.desktop is in: /usr/share/applications

[Desktop Entry]

Type=Application

Name=LightBurn

Comment=Better Software For Laser Cutters

Exec=/home/thinus/.local/share/LightBurn//LightBurn

Icon=/home/thinus/.local/share/LightBurn//LightBurn.png

Categories=Graphics;

Thanking you in advance.

vanadium avatar
cn flag
Does your `lightburn.desktop` file function, i.e., can you see it in the application overview and launch it? That file has to be correct in order to show up anywhere.
Thinus Rautenbach avatar
cz flag
Yes, I can see it on my app grid and I have added it to my favourites. I can open the program and access the files I want from there but I can not choose a file and open it with the lightburn program. If that makes sence.
vanadium avatar
cn flag
In the "Select Application" dialog you obtain when selecting "Open With Other Application" in the right-click menu, there is a "View all applications" button. Did you try that and is it not in the list there?
Thinus Rautenbach avatar
cz flag
Correct. It does not show in the "open With Other Application" even when I select "View All Applications". That is where I would like to see it as per my oiginal question.
Score:1
cn flag

The "Select Application" dialog that you obtain when selecting "Open With Other Application" in the right-click menu of a file in Files is automatically populated with .desktop launchers from the dedicated folders that can accept a file path on the command line. These dedicated folders include ~/.local/share/applications and applications folders in the directories listed in the XDG_DATA_DIRS environmental variable.

The current command in your .desktop file does not suggest that the program can take a file name argument. Depending on what your application supports, you need to add one of the following field codes: %f, %F, %u or %U. See the Desktop Entry specification for details on the differences between these field codes.

For example, your line could become:

Exec=/home/thinus/.local/share/LightBurn/LightBurn %f

After this change, it will be included in the "Select Application" dialog.

Thinus Rautenbach avatar
cz flag
Thank you very much. I must admit that I did not understand half of what was explained in that article you referred me too but I went with %F and it did the job. Not only does the app now show as an option in "Open With Other Application" but when I double click on the file it opens directly in Lightburn.
Allexj avatar
in flag
Thanks for this comment! I fixed the problem that Xournalpp appimage, when creates the .desktop file (located in /home/$USER/.local/share/applications/xournalpp.desktop) it didn't inserted the %f at the end of the Exec line. Assing %f fixes! :D
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.