OS: Ubuntu 24.04
Using software in AppImage format can lead to Ubuntu not recognizing it properly when handling links. Here’s how to configure Ubuntu to manage an AppImage application seamlessly. We'll use Obsidian as an example.
Step 1: Creating a .desktop
File
To make the Obsidian AppImage discoverable by the system, create a .desktop
file—a shortcut that defines how the application should be launched. Here’s the content for the file:
Exec=/path_to_the_appimage/Obsidian-1.6.5.AppImage --no-sandbox %U
Name=Obsidian
Terminal=false
Type=Application
MimeType=x-scheme-handler/obsidian;
Explanation of Key Entries:
- Exec: The command to run the AppImage, with
--no-sandbox
to avoid sandboxing errors. - Name: The display name of the app.
- Terminal: Set to
false
to avoid opening a terminal window. - Type: Identifies this as an application.
- MimeType: Registers
obsidian://
links to be handled by this application.
After creating the .desktop
file, save it to /usr/share/applications/Obsidian.desktop
for system-wide access.
Step 2: Making the AppImage Executable
To ensure the application can be launched, set the AppImage to be executable with this command:
Step 3: Updating the Desktop Database
Register the .desktop
entries with the system by updating the desktop database:
Step 4: Associating the App with the obsidian://
Protocol
To allow Firefox to open obsidian://
links with Obsidian, register the protocol using:
Confirm registration by querying the MIME type:
If this doesn’t work, reapply the association and ensure the .desktop
file is also copied to the local applications folder:
Step 5: Configuring Firefox to Recognize the Protocol
Configure Firefox to recognize obsidian://
URLs:
- In Firefox, go to
about:config
. - Search for
network.protocol-handler.expose.obsidian
. - If the setting doesn’t exist, create it as a Boolean and set it to
false
. - Upon clicking an
obsidian://
link, Firefox prompts you to select Obsidian as the handler. Choose your.desktop
file.
Summary
These steps make the Obsidian AppImage discoverable by Ubuntu, executable, and registered as a protocol handler for obsidian://
links in Firefox. Following this workflow ensures that Obsidian can be launched easily from the OS and integrated with your browser for seamless link handling.
Comments
Post a Comment