
BTW: I am happy to be convinced about systemd advantages:-) I also would like to know how it fits in containers, e.g. if you run them for hosting.
FWIW, the first time I had to care about it was a few days ago when I upgraded one of my mythtv clients and it didn't start mythtv automatically anymore (well... it didn't start X anymore). It seems systemd just ignores whatever is in inittab, which is where I had put my xinit or startx or whatever it was. It was clunky and never felt really clean but it seemed to work. Originally I had wanted to set it up with a gdm autologin but autologin was broken. A bit of googling and there were plenty of examples of how to do it in systemd, and it seems so much nicer. Turn on box and mythtv starts, without having to fake a login or anything. Other than that, I haven't had to care. James

On 09/10/14 17:44, James Harper wrote:
A bit of googling and there were plenty of examples of how to do it in systemd, and it seems so much nicer. Turn on box and mythtv starts, without having to fake a login or anything.
I have a nice homebrew systemd mythtv setup too. For years I had a mess of hacked GDM settings, GNOME startup scripts, and cruft. I've now replaced that with a minimal systemd service and bootstrap script: # /etc/systemd/system/xbmc.service [Unit] Description=Starts XBMC session Wants=mythtv-backend.service [Service] Type=simple User=tv ExecStart=/usr/bin/xinit /usr/local/bin/xbmc-session Restart=always TimeoutSec=10 Nice=-3 [Install] WantedBy=graphical.target # /usr/local/bin/xbmc-session #!/bin/sh x11vnc -shared -forever & openbox & # used for Steam which I launch within XBMC exec xbmc Starts reliably every time, and if XBMC crashes (as it unfortunately does often), the family just has to hit Ctrl+Alt+Bksp and it all respawns. No GNOME or X display manager dependencies whatsoever!

Jeremy Visser <jeremy@visser.name> writes:
On 09/10/14 17:44, James Harper wrote:
A bit of googling and there were plenty of examples of how to do it in systemd, and it seems so much nicer. Turn on box and mythtv starts, without having to fake a login or anything.
I have a nice homebrew systemd mythtv setup too. For years I had a mess of hacked GDM settings, GNOME startup scripts, and cruft. I've now replaced that with a minimal systemd service and bootstrap script:
# /etc/systemd/system/xbmc.service ExecStart=/usr/bin/xinit /usr/local/bin/xbmc-session
# /usr/local/bin/xbmc-session #!/bin/sh
x11vnc -shared -forever & openbox & # used for Steam which I launch within XBMC exec xbmc
Starts reliably every time, and if XBMC crashes (as it unfortunately does often), the family just has to hit Ctrl+Alt+Bksp and it all respawns.
No GNOME or X display manager dependencies whatsoever!
nodm didn't work? OK, technically that's 122kB of X display manager. :-) I also don't see why putting your ExecStart line into inittab would be any less reliable (which IIRC you mentioned upthread). That's what I did on my netbook for a couple of years without any issues.
participants (3)
-
James Harper
-
Jeremy Visser
-
trentbuck@gmail.com