[systemd-devel] Calculating Web page loads accurately with systemd-nspawn's network-veth & Xorg

Kai Hendry hendry at webconverger.com
Mon Aug 24 19:09:53 PDT 2015


On Mon, 24 Aug 2015, at 08:05 PM, Lennart Poettering wrote:
> I'd be careful with things like this... You invoke firefox as PID 1
> then. On UNIX PID 1 is special, it needs to reap foreign children and
> needs to handle signals differently, thus taking arbitrary processes
> and running them like this is problematic.

Then the typical usage from the systemd-nspawn man page:

systemd-nspawn [OPTIONS...] [COMMAND

Is a bit flawed, no?


Not sure what you are suggesting I should do instead. Run as -b and boot
into systemd first? That is annoying since then I need to login, setup
DISPLAY env again (not sure why) and then manually run firefox. Wish it
was one step! :)

http://s.natalian.org/2015-08-25/1440468175_856x1036.png


That said running with -n doesn't seem to work without -b since
systemd-networkd needs to setup the container's networking, no ?

sudo systemd-nspawn --setenv=DISPLAY=:0 \
               --setenv=XAUTHORITY=~/.Xauthority \
               --bind-ro=$HOME/.Xauthority:/root/.Xauthority \
               --bind=/tmp/.X11-unix \
               -D ~/containers/firefox \
               -n  firefox # doesn't work since systemd-networkd isn't
               being run IIUC


More information about the systemd-devel mailing list