Set an AppImage Application as Default App

Quick little tip to set AppImage applications as default.
Warp Terminal

Imagine you found a cool text editor like Pulsar and downloaded it in the AppImage format. You enjoy using it and now want to make it the default application for markdown files.

You right-click on the file and click 'open with' option, but here, you don't see the Pulsar listed here.

That's a problem, right? But it can be easily fixed by creating a desktop entry for that AppImage application.

Let me show you how to do that.

Step 1: Create a desktop entry for AppImage

The very first step is to create a desktop file for the AppImage application. Here, we will use the Gear Lever app to create the desktop entry.

Gear Lever is available as a Flatpak package from FlatHub. I know. Another package format, but that's how it is.

Anyway, if you have Flatpak support enabled, install Gear Lever with this command:

flatpak install flathub it.mijorus.gearlever

Now, right-click on the AppImage file you downloaded and select Open With Gear Lever.

Open an AppImage file with Gear Lever App. Also enable the "Always use for this file type" toggle button.
Open AppImage in Gear Lever

Click on the Unlock button in Gear Lever.

Click on the Unlock button on the top-right corner of Gear Lever Application.
Click on Unlock

Now click on the "Move to app menu" button.

Click on the "Move to app menu" button on Gear Lever to create a desktop entry for the current application
Click on the "Move to the app menu" button

Verify everything is ok by searching for the app in the system menu.

Verify if the AppImage desktop entry was created properly. To do this, search for the application in your system menu. Here, Ubuntu Activities Overview
Verify the app integration

Great! So we have the application integrated in the desktop. Let's move to the second step.

Step 2: Setting default app through file manager

Let's say you want to open all your .txt text files in the Pulsar editor.

The easiest way to achieve is through the File Manager.

Open the file manager and right-click on the file of your choice. Now select the Open With option.

Right-click on a text file and select "Open With" option from the context menu
Select the "Open With" option

In the next window, you can start typing the name of the application to begin a search. It will also show you the AppImage program you integrated with the desktop previously.

Search for an app in Nautilus app selection window
Search for an App

Once you spot the app, click on it to select and then enable the "Always use for this file type" toggle button. Then click Open as shown in the screenshot below.

Select an application from the list. Enable the toggle button on the bottom-right corner. Click open to open the file in the selected application
Set a default app

That's it. From now on, your file will be opened in the AppImage of your choice. To verify this, you can right-click on the file. The first entry on the context menu will be the name of your AppImage application. In this case, Pulsar.

The first item on the right-click context menu will be the program that you want the current file to be opened with.
First item in the context menu

Alternative method: Change apps from settings

Let's say you have an AppImage for applications like Web Browser, Music Player, etc. These can be changed from the system settings.

Given you have created the AppImage desktop entry following the first step, open the system settings in Ubuntu.

Go to Apps β†’ Default Apps.

Here, set the apps for categories you want.

Set the default application using system settings in GNOME
Set Default Browser

If you click on the drop-down menu corresponding to a category in settings, you can select an app. The AppImage app will also be listed here. In the screenshot above, you can see Vivaldi AppImage is set as the default browser.

For Linux Mint users, you can set it using the Preferred Application settings.

Default browser is changed to Vivaldi AppImage using the Preferred app settings in Linux Mint
Preferred application in Linux Mint

Conclusion

A lot of AppImage 'issue' or should I say shortcomings, can be solved by desktop integration. It surprises me that AppImage doesn't provide an official way of doing these things.

Well, we have the wonderful open source developers that help us by creating helpful utilities like Gear Lever here.

I hope this quick little tip helps you enjoy your AppImages πŸ˜„

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries πŸ•΅οΈβ€β™‚οΈ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.