What if I would like to have different versions of the same application ? Or even the same version twice ?
I heard there some new technology ("Modularity") in Fedora 28 that allows to do that.
Are there any way to do that in Ubuntu now ?

- 2,419
-
1do you mean different binaries entirely or are you more looking at just having different configs for two instances? For the latter case, you can just execute programs as a different user within your x session, for the former you can just clone the binaries to a new folder and execute from there. I don't know of any official versioning system that would work like that, but there are ways of getting around it if you need to. – sbergeron May 15 '18 at 02:02
-
1as I understand it snaps allow this, or you can have a version installed as deb, and version(s) as snaps. if installed from tarball you could have lots of versions. my system has python2 & python3 installed... – guiverc May 15 '18 at 02:03
-
1@sbergeron I guess both binaries and config, I mean the way it is in WIndows: you just install stuff two times and it's just in different folders - so simple. And thanks for advice. – R S May 15 '18 at 02:07
-
@RS never knew you could do that on windows, which programs does that happen for? – sbergeron May 15 '18 at 02:39
-
@sbergeron When you choose destination folder you can type another name for 2nd installation and there gonna be two instances of the same apps in different folders. – R S May 15 '18 at 05:54
-
@sbergeron don't remember exact application, but different versions may have different bugs. – R S May 15 '18 at 06:03
1 Answers
Two roads to look at here, neither seamless but both functional.
For multiple configs, what you can do for traditional binaries is to create a new user. When you want to run a second config of a given program, execute it from terminal as that user. Do an su <user>
in a terminal and then launch the program from there. All the config files for that program will be grabbed from that user's home directory.
For different versions or modified parallel binaries, things get a bit messier.
If you want a specific version for legacy purposes, that isn't too hard. Just install the version you specifically want as discussed here and then copy the folder in /lib
or /usr/lib
to a new one in the same parent directory under a different name. Now, you can safely update the original app and still launch the legacy version by launching it's executable under the directory you cloned.
It doesn't make too much sense to have two different versions, both updating with one behind by some amount, but unfortunately that behavior isn't officially supported as of yet on Ubuntu (though who knows what new features will come with snaps/flatpaks and the like.)

- 2,660
-
3Snaps do support having multiple versions installed at the same time (by default it keeps the previous couple of versions around on upgrade, IIRC), but doesn't support running both at the same time. – muru May 15 '18 at 03:42