One app for two OS
Solution 1:
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..)