13

I was reading this post after installing and running a Appimage application.

When I run the application by double clicking the appimage, the app opens and an icon appears in both the side dock and the top window bar (I don't know the formal name for this menu, it's across the top right).

Using the gnome tweaks tool per the linked post, I am able to add the app to startup applications and after testing by restarting, the app does indeed start up and prompt me to login with pw.

My desired outcome is different. I would like the top bar icon to appear only so that if I want to open the app, I would just click it, as opposed to the app starting automatically and also as opposed to having to navigate to ~/Applications/myapp.Appimage and double clicking.

Is there a way that I can add a shortcut to opening the app to the top right app icons menu bar?

vanadium
  • 88,010
Doug Fir
  • 375

2 Answers2

17

AppImages have limited integration with your desktop environment. You can manually add a launcher to your menu, but there is also a tool in development that can integrate appimages

Manual approach

You can manually add a launcher for your AppImage in the dash. Once it is there, you optionally will be able to pin it to the Dash/Dock.

Commonly, the AppImage provides an icon and a .desktop launcher file that you can use for a start. Retrieve it from within the AppImage file as follows:

  1. Make sure the AppImage is running.
  2. Using the command mount in a terminal, find out where the AppImage is mounted in your file system.

For example, in my little test, I see an entry for an AppImage appearing as

LibreSprite-8ac9ab1-x86_64.AppImage on /tmp/.mount_LibreSyxGgsk type fuse.LibreSprite-8ac9ab1-x86_64.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)

in the terminal output of mount. It reveals that the AppImage is mounted under /tmp/.mount_LibreSyxGgs.

  1. Navigate to the folder where the AppImage is mounted using your file manager. In most cases, you will find icons there and a .desktop launcher, in the main folder or in a subfolder.
  2. Copy the icon file to the folder ~/.local/share/icons
  3. Copy the .desktop file to ~/.local/share/applications
  4. Open the copy of the .desktop file you created, and edit the Exec= line (and also the TryExec=line if present) to include the full pathname of your AppImage. Check on the Icon= line if it corresponds with the basename of the icon file you copied (just the basename, no need for the extension). If needed, update. You can also provide a full path to the specific icon file.

This will cause the .desktop file to be picked up in your application menu, i.e., the Application Overview in standard Ubuntu with Gnome Shell.

Automating using the tool AppImageLauncher

If you work frequently with AppImages, then you could explore the tool "AppImageLauncher". That tool is a regular application, designed to associate with .AppImage files. When you click an AppImage file, the tool will automatically copy it to a standard folder (by default ~/Applications) and create a desktop launcher for it.

GlenPeterson
  • 1,421
vanadium
  • 88,010
  • There's something not right with the "manually add a launcher" link – Al Lelopath Aug 21 '21 at 16:17
  • 1
    @AlLelopath Thank you. The link should work now. – vanadium Aug 21 '21 at 16:29
  • @vanadium I think it'd be better if put the automatic way as first. It's expected for most people I think. Thus, no need to read the manual way only to realize there is an automatic way. – inovramadani Jan 02 '22 at 10:33
  • 1
    @Inovramadani the automatic way requires installing third party software, i.e., outside of the Ubuntu software center. This is the only reason I do not place it upfront. I would fully agree otherwise. – vanadium Jan 02 '22 at 11:43
  • The steps were excellent, thanks! I got the application on my "favourite" now, but when I click it, it shows as a separate application with no icon. Note that the original appimage had no icon when running to begin with. Any idea how to make it show its icon when running and ideally not create a second icon on my bar? – George Dimitriadis Mar 11 '22 at 08:52
  • https://askubuntu.com/questions/367396/what-does-the-startupwmclass-field-of-a-desktop-file-represent – vanadium Mar 11 '22 at 09:09
  • Thank you for the detailed step-by-step guide. The only change I had to make was to add the extension for the icon file (*.png), without which the icon did not show up in the launcher. – LeviAckerman Mar 28 '24 at 00:14
4

Use AppImageLauncher


 sudo apt install software-properties-common
 sudo add-apt-repository ppa:appimagelauncher-team/stable
 sudo apt update
 sudo apt install appimagelauncher
andrew.46
  • 38,003
  • 27
  • 156
  • 232