portable apps for linux

A major setback for normal users in Linux is the botheration of having to compile from source code, if there does not exist a binary installer of the application or the user wants to run a more recent version of the software than that provided by the OS’s version specific repositories. For example, if one wants to run Gimp version 2.7 in openSUSE 11.4, it must be compiled from source as the latest available in its repositories is v2.6.11. For an application as extensive as Gimp, it requires a lot of patience to resolve dependencies (it is most likely there would be additional dependencies compared to the repository version). A much better alternative can be to use a standalone version of the app, that runs without any external dependencies. That is what we have had for Windows always, and which is one of the reasons for its popularity. Since about a year or so, such applications are gathering momentum in the Linux world.

Portable Linux Apps
Sourceforge has a page that hosts Portable Linux Apps. Here we can find pre-compiled binaries of may popular applications. The merit of these pre-compiled binaries is that they can be just downloaded and run*. There is no need to compile any separate library for it; no need to bother about distribution-specific packages – just download and run on any Linux distribution.

Co-existence with another version
If the application has a version already installed and the portable one is of a different major version, then there won’t be any conflict of configurations. Only the system config would be shared, and apps/version specific ones will be in a separate directory created at first run of the portable. For example, say we have Gimp 2.6.11 installed in the machine. There is a /home/[user]/.gimp-2.6 directory corresponding to it. If now we download and run a pre-compiled binary of Gimp 2.7.2, it will create a new directory /home/[user]/.gimp-2.7 and store its version specific files and folders there. The system wide config file exists in /etc/gimp/2.0/gimprc, which will not be disturbed. The application will create a local config file at first launch, from the local copy of existing version. This kind of config copy is similar to that of another variant of portable apps like Firefox (which extracts the entire package in a directory from where the executable firefox-bin may be run to launch it).

Here is a screenshot of Gimp 2.7.2 (Development):

Gimp 2.7.2 Devel

Plugin Compatibility
If the portable app comes without some shared libraries or plugins, the same from system wide location may be linked to in the app by defining PATH or other relevant variable. An alternative way is to copy plugins from system-wide shared location to the local folder which the app creates. For example, GIMP 2.7.2 portable was not opening any jpeg or png files at first launch, until the system-wide plugins were copied from /usr/lib/gimp/2.0/plug-ins/ to /home/[user]/.gimp-2.7/plug-ins (defining PATH is of course more refined way, but this works too). The location of shared plugins vary from distro to distro, but usually it is in /usr/lib or /usr/share. This simple workaround is still much more efficient than struggling with compile time errors or dependencies IMHO.

*The downloaded binary (say exec) must be made executable with chmod:

SUSE-prompt#> chmod +x exec
Now run the app:
SUSE-prompt#> ./exec &

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s