Installing and running multiple instances of the same software

Ralf Mardorf silver.bullet at zoho.com
Sun Mar 13 08:58:00 UTC 2016


On Sun, 13 Mar 2016 16:51:47 +1100, Karl Auer wrote:
>kauer at kt:~$ ps ax | grep firefox | grep -v grep
> 1980 ?        Sl    14:01 /usr/lib/firefox/firefox
>kauer at kt:~$ firefox
>kauer at kt:~$ ps ax | grep firefox | grep -v grep
> 1980 ?        Sl    14:03 /usr/lib/firefox/firefox
>
>... even though I started a "new" firefox, the new window was started
>within the existing process; even though a new window opened, there is
>still only one firefox process.

One user can run a second instance of firefox as another user,
even if firefox wouldn't allow to use different profiles.

IIRC there is a smarter solution than to use xhost and sudo by using
ssh. I guess quite recently this was a topic on this list.

IOW this could be done for every app a user could run, even if the app
shouldn't allow to run several instances.

[rocketmouse at archlinux ~]$ grep -v "#" /usr/local/bin/chuser 


xhost +
gksudo -u chuser "$*"
xhost -
exit

[rocketmouse at archlinux ~]$ ps ax | grep firefox | grep -v grep
17388 pts/0    Sl+    0:11 firefox
17448 pts/1    S+     0:00 /bin/sh /usr/local/bin/chuser firefox
17450 pts/1    S+     0:00 gksudo -u chuser firefox
17451 ?        Ss     0:00 /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u chuser -- firefox
17452 ?        Sl     0:05 firefox

>On Sun, 2016-03-13 at 10:00 +0300, Amer wrote:
>I just went and found out more about Vyatta. It's basically a purpose
>-tuned Linux distribution - effectively an operating system.
>
>I'd be happy to be proven wrong, but I'm pretty sure that you cannot
>run two of them on one machine simultaneously unless you run virtual
>machines.

It unlikely requires to run a VM, but it at least would require one or
the other kind of container, since PID 1 can not be run as PID 1a and
PID 1b.

Perhaps a chroot or systemd-nspawn could do the job. I'm running Arch
Linux, but could run my Ubuntu install quasi at the same time:

[root at archlinux rocketmouse]# cat /etc/issue 
Arch Linux \r (\l)

[root at archlinux rocketmouse]# apt-get --help
bash: apt-get: command not found
[root at archlinux rocketmouse]# systemd-nspawn -qD /mnt/moonstudio 
[root at moonstudio ~]# cat /etc/issue
Ubuntu 15.10 \n \l

[root at moonstudio ~]# apt-get --help
apt 1.0.10.2ubuntu1 for amd64 compiled on Oct  5 2015 15:55:05
[snip]

https://linuxcontainers.org/
https://help.ubuntu.com/lts/serverguide/lxc.html





More information about the ubuntu-users mailing list