58

How can I register an .appimage file (specifically, the tiled map editor found here) as a desktop app? (Like firefox -- I can launch it by typing 'Firefox' into search rather than opening up a console and typing /path/to/directory/firefox.ext)

3
  • Place the executable file in you PATH in say /usr/bin and you should be able to launch it like firefox... Apr 8, 2017 at 23:51
  • Is there a way to put a 'shortcut' to the file in my PATH? I don't want to move it there.
    – user662777
    Apr 8, 2017 at 23:53
  • Never mind, I just made a bash script that launches it and stuck that in ~/bin. Thanks for your help, even though you didn't actually answer the question :P
    – user662777
    Apr 8, 2017 at 23:54

3 Answers 3

44

Create a .desktop file that points to the application -- here is an example of a .desktop for minecraft:

[Desktop Entry]
Type=Application
Name=Minecraft
Comment=Minecraft
Icon=/home/bram/Applications/Minecraft/icon.png
Exec=/home/bram/Applications/Minecraft/minecraft
Terminal=false
Categories=Minecraft;game

Put that file in ~/.local/share/applications

6
  • Done what you said, It will keep open a terminal while I am executing the AppImage? Is there a way to just open the AppImage without a terminal together?
    – cssmtnr
    Dec 27, 2018 at 17:35
  • 16
    Why would you need to download a separate icon when the appimage includes one? How can you use the icon from the appimage itself? Feb 3, 2019 at 17:47
  • The AppImage I was trying to create a desktop launcher for and its icon were in /opt/app-dir/. I ran chmod 777 icon.png but the icon was not showing up. I had to put the image in /usr/share/pixmaps/ and put Icon=<icon-name-without-extension-or-path> in the launcher to make the icon visible.
    – Mike
    Sep 12, 2020 at 10:35
  • @Mike (and perhaps others). Since 26 people upvoted and so presumably followed this answer can one of them replace the example with the Joplin one to save anyone coming after from having to replace Minecraft with Joplin.
    – Kvothe
    Jun 1, 2021 at 15:24
  • I needed to read this answer: askubuntu.com/a/1240983/800252. In order to figure out how to make this work (For extracting the Icon and the correct .desktop entry which is non-trivial to guess, for example to get "StartupWMClass=Joplin" right.).
    – Kvothe
    Jun 2, 2021 at 9:02
39

You can also use AppImageLauncher which provides desktop integration along with some additional features. Unlike appimaged, it:

  • asks for confirmation before creating desktop entry for an AppImage.
  • works with AppImages in any location
  • doesn't use a daemon for monitoring, so more efficient.

Specifics of how it works are explained in the wiki. It can be installed directly from the packages provided in the releases or by using packages from PPA:

sudo add-apt-repository ppa:appimagelauncher-team/stable
sudo apt-get update
sudo apt-get install appimagelauncher
6
  • I just installed it on Ubuntu Focal through the PPA. I launched a Zoom AppImage and now it appears in the launcher if I type Zoom. Neat :) Dec 15, 2020 at 17:46
  • 1
    Could you include a simple example of how it work. An (uncareful) read of the linked wiki does not make it clear at all.
    – Kvothe
    Jun 1, 2021 at 15:28
  • @Kvothe I'm not the creator of this tool :) Consider creating an issue in the repository asking for the same.
    – aksh1618
    Jul 20, 2021 at 8:23
  • Worked on PopOS 21.04 GNOME as well. Great!
    – Reza Taba
    Aug 8, 2021 at 19:59
  • It works great! All I had to do was (a) install as shown here, (b) run it on the terminal, i.e., "$ appimagelauncher", and (c) open the AppImage as usual. The first time you run an AppImage, appimagelauncher will catch it and "install it." That's it!
    – gvegayon
    Jan 20, 2022 at 18:56
22

According to appimagekit, the proper method is to use appimaged for .AppImage file registration.

For 64-bit systems:

wget "https://github.com/AppImage/appimaged/releases/download/continuous/appimaged-x86_64.AppImage"
chmod +x appimaged-x86_64.AppImage
./appimaged-x86_64.AppImage --install

The binary will copy itself to /home/ubuntu/.local/bin/appimaged and then delete the downloaded copy upon install. Then you must logout and back in.

At time of reading, it will monitor and register the following locations:

~/Downloads
~/.local/bin
~/bin
/Applications
/isodevice/Applications
/isofrom/Applications
/run/archiso/img_dev/Applications
/opt
/usr/local/bin

To show in the menu, this assumes you've placed a desktop file in the correct location inside your .AppImage file, usually /usr/share/applications/<myproject>.desktop.

If you search in the application tray, you should find your application shortly. The daemon should also register any application-specific file associations assuming the mime xml is also bundled, usually /usr/share/mime/packages/<myproject>.xml. If the icon does not appear correctly, you may have to logout and back in a second time. This can happen if the icon was incorrectly cached while testing out images.

3
  • The advice at appimaged link says to enable with sudo systemctl --user [...], but shouldn't it be --system [ie default], won't --user mean that it only enables for my user. I'm trying to install digikam for all users, FWIW.
    – pbhj
    Dec 19, 2017 at 23:58
  • On my system, Ubuntu 14.04, the systemctl steps did not work properly. You should ask the project team how best to do this. The service seems like it's intended to be run in user-space by design, so the system-wide installation technique does not seem to be obvious. Perhaps you would be happy with the appimage located permanently somewhere (e.g. /opt/bin/appimaged with a login script for all users in /etc/xdg/autostart/appimaged.desktop, but one which uses the --no-install switch.
    – tresf
    Dec 26, 2017 at 17:26
  • Then place digicam in (e.g.) /opt/bin/digicam and the daemon should find it as it will match the second-to-last search location mentioned above.
    – tresf
    Dec 26, 2017 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy