Run applications from any other operating system (in your Elive)

You can run applications from any other operating system from your Elive system using one of the two explained methods. This is sometimes needed when we need to run applications that requires a specific version of glibc, or from a different architecture like 64bit, or that the application requires a very specific system of Linux like if you would like to run the Tizen SDK.

Easy & Compatible: The Virtualized method

Setting up a Virtual Box machine, you can run other operating systems (we will reference 'Windows' for this example) with these amazing features & tips:

  • run windows applications inside your Elive desktop (using Seamless mode), like it was running inside your system
  • run them as a real desktop application connecting from a terminal using "ssh -Y user@yourvirtualmachine" (only in linux* guests)
  • share the files between your real system and the virtual environment with automated Samba configuration (shared folders), like if they was in your real system, like running dropbox inside the other system or a fast way to copy/share your files
  • you can run any operating system, not only a linux one

Cons

  • it requires a processor with virtualization features (most of new ones has them)
  • it consumes some cpu even if not using it (tip: press host + p to pause the machine)
  • it consumes allocated RAM memory to run the full system (not only the application that you want to run)

Professional & Powerful: the chrooted environment

But there's a much more powerful way to run applications without any of the previous listed cons, the only limitation is that it needs to be a linux* operating system

In short, you will have the full system copied to a directory and you will chroot it (to enter on the system) and then run anything from it

How to do it:

Chroot

Create or copy the full system to a wanted directory to use, you need to do it from root in order to maintain the correct permissions and owners (you can use cp -a)

Another option is to just 'enter' on an existing one, let's say that you have mounted an ubuntu partition, so from a terminal you can run something like this:

sudo chroot /media/Ubuntu

Your prompt then will appear like the ubuntu one, because you are inside that system, type "su youruser" to change to another user or press "Ctrl + d" or type "exit" to end the session

Creating a new chroot

You can copy an already existing system but you can also create one in a very simple way using debootstrap, like for example:

sudo debootstrap sid sid

This will create a last-last version of Debian in a directory called sid, please refer to any debootstrap debian howto / documentation for a more specific howto

Running applications

Most of applications are a bit more complex, in the sense that they requires /dev (hardware devices) access, or /proc access, or /sys, or even dbus and similar things, sometimes they even needs daemons to be running

For that, you need to do a few things like mounting some directories like the /dev one with some special settings like --bind which is like a shared way to mount a directory inside another, unfortunately there's other commands needed and other administrative tricks to make the system correctly compatible and it is not easy to find a complete howto on internet that lists all the commands needed.

But the good news is that, like always, Elive does it all already for you, so it has already a tool that includes all the needed things, like: dbus support, can run graphical applications, network compatibility, disabled unneeded daemons / triggers, etc. Run it without commands to see all the options and features:

mounts-manager

Example

On my example I have used the live mode of Elive to run things from an installed Elive system on 'sda1', but let's say you want to run a last version of libreoffice that is installed on a system, or in a debootstrapped directory of a last version of Debian.

shot-2018-10-16_02-13-49

Notes:

  • this howto has not been fully tested, feel free to improve it or fix any typo
  • if you want to run 64bit software inside a 32bit system (let's say an application of an ubuntu 64 bit from your Elive 32 bit), you need to boot from a 64 bit kernel

(libreoffice latest release works perfectly within elive!)
I like this tutorial, i was looking for such a solution! My laptop is kinda unerpowered so i would have never been able to run a vm! I will try it as soon as possible, thanks a lot!

alright @stoppy98, that solution consumes just 0% of resources (except the ones that are used to run the application itself) :slight_smile: and they are run at 100% efficiency :slight_smile:

If you try it and see something to fix / improve in the howto, just edit it! :coding:

1 Like

Interesting thing. Will try.

1 Like