1

I've tried on and off for several weeks now to create a .desktop file for the Ungoogled Chromium AppImage I use. I had tried to install the browser through other means, such as through the instructions on its github which includes building binaries, but they either didn't work, didn't produce anything use-able, or, in the case of the binaries, was left to work for around 12 hours and did not seem to make anything I could use, or figure out how to use. I've tried asking in the Xubuntu help channel several times in regards to making a .desktop file for the AppImage I end up having to use, as well as searching for a solution on my own, but nothing I could find ended up working properly, leading me to just have to navigate to the AppImage and open it every time.

Now, on a new install of Xubuntu, I tried doing the same thing, but the AppImage wont start, asking me what application I wish to use to open it, while recommending none, instead of allowing me to simply execute it as I had done on my other Xubuntu system. It would be greatly appreciated If I could also get some help on making Xubuntu accept it as my default browser, as right now I currently get an error, but my primary issue is I've got absolutely no idea what I can do to create a functioning .desktop file which allows the AppImage to be searchable and then launchable. I'm using 22.04 Xubuntu installed from a USB onto a fresh storage device. Just started using Linux recently, so being thorough would be greatly appreciated.

sotirov
  • 4,379
Neuw1
  • 13
  • 4

1 Answers1

3

With a text editor, create a text file with the .desktop extension in the directory ~/.local/share/applications (~ represents your home directory, .local is a hidden directory - turn "show hidden files" on in the file manager to see these hidden directories and files).

Paste the following content and modify the Exec= line with the absolute path to your AppImage file

[Desktop Entry]
Exec=/full/path/to/your/executable.AppImage
Name=Ungoogled Chromium
Comment=A free and open source web browser
Type=Application

That is the minimum you need for a valid .desktop file. It will automatically be included in your application menu because it resides in ~/.local/share/applications.

You probably want a dedicated icon for that launcher. Then add following line to the .desktop file:

Icon=/path/to/your/icon.png

Alternatively, place your icon file in ~/local/share/icons. Then you can simply refer to the icon by the file name without extension:

Icon=icon

Alternatively, use a graphical application like "menulibre" or "alacarte" to create a menu item (which creates a .desktop launcher file for you).

ParkerM
  • 103
vanadium
  • 97,564