[systemd-devel] Convert Inittab-Entry to systemd

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Aug 27 06:58:00 PDT 2013


On Tue, Aug 27, 2013 at 03:28:51PM +0200, Daniel Spannbauer wrote:
> Hello,
> 
> till now we had the following entry in the /etc/inittab:
> 
> X1:5:once:/bin/su - user -c "xinit  /home/user/.xsession -- /usr/bin/X
> :1 vt08 -r -br" 1>/tmp/X1.log 2>&1
> 
> 
> On our new system systemd is now standard. So I tried to convert this in
> a systemd.servce:
> 
> 
> [Unit]
> Description=Autologin
> After=getty.target
> 
> [Service]
> ExecStart=/bin/su - user -c "xinit  /home/user/.xsession -- /usr/bin/X
> :1 vt08 -r -br -dpms -s off" 1>/tmp/X1.log 2>&1
Add User=user and drop the su?

The redirections don't do what you think they do — this is not a shell.
Just drop them, output will get logged in the journal.

> Restart=always
> 
> 
> [Install]
> WantedBy=multiuser.target
multi-user.target ?

Zbyszek


More information about the systemd-devel mailing list