Welcome to the world of Distro agnostic application packaging thanks to the ‘1 app = 1 file’ AppImage initiative from the Elementary-Project.
Yesterday we waxed lyrical about the ‘portability’ factor of AppImages – the one-click self-contained applications that can run from any location and on any distribution.
Today we’re going to look a bit deeper at what they really are, how they work and how you can package up your favourite application as a one-click distro-agnostic AppImage.
Why not? By being self-contained one-click solutions that can run on multiple distributions without requiring the installation of anything else they provide an easy solution to the headache of packaging applications in so many various formats. 1 app = 1 file = any os.
Better yet AppImages don’t require administrative privileges in order to run. This makes AppImages a safe and secure way to not only try out the latest version of software without damaging any locally installed versions but also afford users a greater level of security as they are unable to affect the file system as a whole.
As AppImage’s can be run from anywhere users are able to store them wherever they like: a dedicated folder in their home drive, a USB drive, even a network share! Better yet you won’t find excess libraries or cruft left behind when you move or delete them – just delete and it’s gone.
What is an AppImage?
So what is an AppImage? Dan Rabbit over on the Elementary-Project wiki explains it pretty well: –
“When you run an AppImage, you are really mounting a virtual filesystem on top of your actual filesystem via fuse. The AppRun script ties the two together so that the AppImage will use libraries and other resources from your system.“
“Just like any other application, an AppImage will store its configuration data in your home folder. It’ll even use your same configuration data from previous installations of that application.”
Make an AppImage from a .deb
So now you know why they’re good you probably want to have a go at packaging one. Be aware that the packaging method isn’t flawless and isn’t guaranteed to work with every application so don’t be too disappointed if your attempt doesn’t work.
We’ll start easy – here’s how to make an AppImage by simply repackaging a .deb file.
- Right click on the .deb file of the application you wish to package and ‘extract’
- Add “.appdir” to the end of the resulting extract folder name
- Inside the folder find find and extract the ‘data.tar.gz’ archive
- Delete the remaining archives so you’re left with the extracted ‘data’ folder.
- Copy the .desktop file from usr/share/applications to the AppDir’s root.
- Copy the application’s icon from /usr/share/icons/ to the AppDir’s root.
- Download the AppRun script and place it in the AppDir’s root.
Next we will take the AppDir and package it into the one-click AppImage using the AppImageAssistant
- Download the AppImageAssistant from here and run.
- When opened, click on the ‘Forward’ button and locate your AppDir
- Click ‘Forward’ once again
Head over the Elementary-Project wiki for the full LD on creating AppDir’s from scratch. Dan explains it very simply so even the easily confused will be creating AppImages in no time.
Thanks to Dan Rabbit & probono