One app for two OS

cn flag

I have just installed Ubuntu Studio 20.04 alongside with regular Ubuntu 20.04 and I’m wondering if it’s possible to use installed on first Ubuntu apps on the second Ubuntu without reinstalling (so it won't use much space and maybe use one folder to save documents). Searched but found nothing. Is there any way?

ru flag
Why alongside each other? They're the same OS at the underlying system - you also should NOT try and mix and match two Ubuntu variants.
cn flag

When you install packages (programs are provided in packages); they generally have set directory locations where they'll install to; so your main control is over the where those directories are located.

This box (like most of mine) is dual boot; giving me two OSes; currently I'm using Ubuntu jammy (technically Lubuntu) & my other OS is Ubuntu 20.04 LTS.

I've used shared /home partitions before; but decided it was a bad idea. I loved that both my systems could access my files directly, and it worked often, but when application versions differed - problems would appear. An example was updates in evolution or my chosen email MUA/handler; I loved in a new feature so started using it in the newer version (it colored incoming email by type according to rules I'd created). These emails however ignored (wouldn't show in my older OS) as it didn't know how to handle them; and just ignored them. I soon decided I'd keep separate /home folders for each system.

My actual data files (files I value) are stored in a common location - I use network storage (NFS); and for a time had both systems local directories point to that location which I manually setup for some applications; but not others - to avoid clashes like what I described above. My email etc. is stored in my local /home directory (ie. duplicated on each); but if I create text documents etc. I just store to my shared directory.

A shared directory I'd recommend (it could be a partition on your local system rather than network storage I use).

I also have my user & system directories both (auto) mounted so I can access both systems directories anyway; I just rarely touch it - in case I forget which I'm using and make a mistake - I prefer the idea of the common (shared/network) directory(ies).

I would not recommend sharing your systems package directories; as whilst it may work; if you upgrade one you'll likely find the other won't work (if not a problem at first, soon anyway as it has lost its older packages) or may not work correctly (which is far worse, it may result in data corruption!)

I do share SWAP (partition) between my systems, if I need more swap that the partition allows for; I use swap file too (located on / for each system). I don't hibernate, but in the past when I did it; I would use only swap file prior to hibernate.

What I do love - Multiple DEsktops on an install.

I mentioned this session is Ubuntu jammy (what will be 22.04 when it's released), and I'm technically using Lubuntu or the LXQt desktop.

When i login I can currently select to use

  • Ubuntu Desktop (ie. GNOME)
  • Xubuntu Desktop (ie. Xfce)
  • Lubuntu Desktop (ie. LXQt)

I have each of those desktops installed (I also used to have Ubuntu-MATE installed too and an option; but I needed disk space so I let it go on this install; my 20.04 install still has all 4 options!)

ie. I can select to login & use Lubuntu (LXQt) as I've done today (and do most days and use every application that I have installed in this jammy install that is available to Ubuntu (GNOME), or Xubuntu (XFCE) as they're the identical install.

There are complications to this; my system is bloated (three desktops installed, it needs more space, has more menu choices, eg. text editors = featherpad (Lubuntu), mousepad (Xubuntu), gedit (GNOME), all of which get updated so larger upgrade bandwidth) - but it's still better in my opinion than 3 installs.

Caveats: You can't install every desktop; I wanted five, but settled for four (reducing that to three when I needed disk space) but I found once you hit three desktops they can have negative interactions with each other.

To get the four I have now; I installed them many times in different order (Ubuntu install, + xubuntu-desktop, then + lubuntu-desktop, then + ubuntu-mate-desktop etc) before finding the combination with the least problems & then a clean install of that order.

  • With two desktops installed - I'd not expect problems.
  • With three desktop installed - I'd not expect problems; but there is a chance they may appear (order may matter)
  • With four desktops installed - problems can occur & order matters
  • With five desktops installed problems will occur in my experience; order of install matters & problems can be annoying. Some non-Ubuntu systems deal with five+ easier (eg. Debian, OpenSuSE..)
ru flag
keep in mind Jammy is **offtopic** here and should not be used as your main driver due to the development cycles
guiverc avatar
cn flag
Thomas will already know this, but I was using this box (*jammy*) as example; the box underneath it contains Lubuntu 20.04 LTS & Lubuntu 21.10 LTS (ie. latest LTS & non-LTS; second desktops on that box do not include Ubuntu/GNOME, only Kubuntu/KDE & Xubuntu/Xfce if I recall correctly; though I can remove & add back additional desktops if I use the box for QA-testing)
cn flag
  • Create a partition that you mount in both systems.
  • Install the source version of the app in that partition. This ensures different versions do not clash (doing this with MySQL where Ubuntu 21.+ uses version 8 and another OS using version 5 is guaranteed to cause issues)
  • symlink the executable to a directory in your PATH or add this directory of the source to your PATH

and you can use it in both systems.

(so it won't use much space and maybe use one folder to save documents).

Most apps are MBs in size so will not save a lot of space.

I would suggest to not share the apps but share the documents folder between the two systems.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.