Skip to main content

Command Palette

Search for a command to run...

Making AppImages globally available without third party library or tool on Linux (Xubuntu)

Published
2 min read
P

Learning from my experiences while joking about the stupid mistakes I did in my prior code!

I recently switched to Xubuntu, a lighter version of ubuntu is what perplexity told me it was, so I thought, why not?

Upon installing the OS, I started installing three of the tools I install first - Obsidian, VS Code and my github repositories. Code had an .deb package, which can be integrated into the system directly via the deb package manager, but the problem comes with the Obsidian AppImage.

Running an AppImage is simple, ./<AppImage> and it runs after you have provided the execute permission via a chmod +x command.

But I did not want to use this ./<AppImage> every time to open the app, and neither did I want to set a bashrc shorcut, because then, everyday I would still have to open a terminal for opening my obsidian instance.

That’s when I went to Google, and to AI chatbots. This is where it led me!

5 steps for system-wide installation of an appImage

  • For this blog, we will take Obsidian, obsidian.svg, and my username dhondpratyay as example.

1. Create a folder to store AppImages

  • We start by making a folder, where all our future appImages will stay

    mkdir -p ~/.local/bin

  • Then we move our appImage to this folder

    mv ~/Downloads/Obsidian-*.AppImage ~/.local/bin/obsidian.AppImage

  • Make this appImage executable

    chmod +x ~/.local/bin/obsidian.AppImage

2. Create the Desktop Launcher

  • Make the applications directory if not present - mkdir ~/local/share/applications

  • Run nano to edit our configuration file for obsidian

    nano ~/.local/share/applications/obsidian.desktop

  • Paste the following code in the file obsidian.desktop

      [Desktop Entry]
      Name=Obsidian
      Comment=Obsidian Notes
      Exec=/home/dhondpratyay/.local/bin/obsidian.AppImage
      Icon=obsidian
      Terminal=false
      Type=Application
      Categories=Utility;Office;NoteTaking;
    

3. Add an icon - not necessary but worth it

  • Download whatever icon you want to use - I used this one, because why not!

  • Make the directory for icons if not already made and copy your icon to the location

      mkdir -p ~/.local/share/icons
      cp obsidian.png ~/.local/share/icons/
    
    • Now edit the obsidian.desktop file we made above and append the following line to set custom icon

      Icon=/home/dhondpratyay/.local/share/icons/obsidian.png

4. Update desktop database

  • Run the following command to update-desktop-database:

    update-desktop-database ~/.local/share/applications

  • The above command update-desktop-database, reads all the .desktop files in the specified (~/.local/share/applications) directory → updates MIME cache for application loading and notifies desktop environment that new applications were added or changed.

It tells your system:

“Hey, I added/changed some .desktop apps — please reload them.”

The MIME cache tells your system which apps open which types of files.
Updating it refreshes those associations

.