CDE for Code, Data and Environment

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

CDE for Code, Data and Environment

#1 Post by labbe5 »

Running applications across Linux distributions

There is a scenario I see too often. One person is running Linux distribution ABC and other person is running Linux distribution XYZ. The first person, usually me in these situations, is running an application they would like to share with the second person. However, the second person is running a distribution that has a different package repository that does not feature the same software, they may not even have a compatible package manager, making sharing the application difficult.

What can we do in this situation? Well, if we are very lucky the upstream project might have pre-built binary packages that will work on multiple Linux distributions. We might be able to direct our friend to the project's website and have them download the proper file and, hopefully, there won't be any extra dependencies to worry about. If we are slightly less lucky the upstream project may supply archives of their source code and have a clear list of dependencies that are available on the second person's distribution. This may very well work if the other person is comfortable hunting down dependencies and compiling software from source code, but those people are rare, even in the Linux community. In short, if the software we want the other person to run is not in their distribution's repository, our options for getting them to run the same application we have are limited. At least this has typically been the case.

These days there is an excellent solution for transferring application between computers running different flavours of Linux. This solution is called CDE, for Code, Data and Environment. What CDE does is give us a method for taking an application that is running on our computer, packaging it up with all of its dependencies and configuration files and transferring this portable package to another person's computer. Creating the portable CDE package takes just two commands and the resulting archive can be opened and run on almost any computer running a GNU/Linux operating system.

How does it work? What happens is CDE takes an application and all its dependencies and configuration files and places these items in a directory. This directory can be archived and moved to another machine. Once on another computer, the archive can be run in an isolated environment, a sort of container where all the components needed are already in place.

I downloaded the CDE application and went through the manual, taking the opportunity to package a couple of programs. The steps are fairly simple and the following is an example of me transferring the game Atomic Tanks (atanks) from one computer to another:
cde atanks
The above command runs the atanks application and begins building a directory where all of the components of Atomic Tanks are stored. When the program exits, we are left with a directory called cde-package. We can then create an archive of atanks and all of its dependencies:
tar czf atanks-archive.tar.gz cde-package
This creates a compressed archive file we can transfer to another computer. This could be done via e-mail for small packages or cloud storage or secure file transfer, depending on the environment. Once the second person has the atanks-archive.tar.gz file on their computer they can use whatever method they like best to unpack the archive. Inside they will find the cde-package directory. Inside that they will find a file called atanks.cde which they can run. As an example, the command line could be used as follows:
tar xzf atanks-archive.tar.gz
cd cde-package
./atanks.cde
One important piece of information I found is that all the files the ported application needs are stored under a directory called cde-root inside the archive. If we want to know exactly which files have been transferred we can find them in this sub-directory. The person who receives the archive can venture into this directory to explore the files and run them.

I found that CDE did a good job of working for me, transferring files between distributions. I only tried a few small applications, but these ran on the target machine without any problems and without any extra work on my part. The receiving machine doesn't even need to have a copy of CDE installed, the archive just runs on its own. There was one side-effect of this form of packaging which I think is important to mention. Since CDE packages configuration files and, for that matter, I believe it packages any files the target software opens, this means CDE will happily package configuration files it finds in our home directory. If we run CDE on an application which opens files in our home directory or if our application accesses a database we use privately, it is entirely possible CDE will bundle these personal files up and add them to the archive. For this reason, if you use CDE to transfer software, take a look in the cde-root directory of the archive you plan to send and make sure no private files have been packaged along with the library files and other dependencies.

CDE is small, portable and makes it very easy to share software with people who run very different flavours of Linux. It is easy to tweak the CDE archives in order to add or remove files after CDE finishes its work and the person who receives our archive does not need to handle dependencies or install any software. This makes CDE a very convenient solution when we need to port functionality between computers and even different Linux distributions.

Source : Distrowatch

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#2 Post by neerajkolte »

Hmmm...

C.D.E, looks like it uses Application Visualization...

Looks promising.... might put @shinobar (maker of many popular portable apps) out of work. :wink:

Now only have to find Some pre-packaged apps made portable with C.D.E by someone else on different distro, to test it's working.

- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#3 Post by amigo »

* -that's virtualization not visualization

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#4 Post by greengeek »

Some CDEs do exist for Puppy. 666philb made one for Youtube downloading for early pups here

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#5 Post by Ibidem »

Somehow I want to mention the name collision.

Post Reply