[systemd-devel] Convert Inittab-Entry to systemd
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 21 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 21 Restart=always [Install] WantedBy=multiuser.target I stored it at /etc/systemd/system as autologin.service, enabled it and started it. WOrks as expected. But not at a system-start. There is nothing about the failed autologin at the system-messages. systemctl status autologin.service says: autologin.service - Autologin Loaded: loaded (/etc/systemd/system/autologin.service; enabled) Active: inactive (dead) CGroup: name=systemd:/system/autologin.service I can't find any messages why the service failed. Any hints about this? Regards Daniel -- Daniel Spannbauer Systemadministration marco Systemanalyse und Entwicklung GmbH Tel +49 8333 9233-27 Fax -11 Rechbergstr. 4-6, D 87727 Babenhausen Mobil +49 171 4033220 http://www.marco.de/ Email d...@marco.de Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Convert Inittab-Entry to systemd
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 21 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 21 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Convert Inittab-Entry to systemd
'Twas brillig, and Zbigniew Jędrzejewski-Szmek at 27/08/13 14:58 did gyre and gimble: 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 21 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 21 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. Also I don't think this will properly handle session registration will it? There is nothing here that registers the session - no pam configs to include pam_systemd etc. I think you would need some kind of PAMName= attribute here to also handle that (man systemd.exec(5)). Obviously the /etc/pam.d/ stuff would need to be configured accordingly with appropriate permissions (I presume) to allow autologin but also ensure the pam_systemd stuff is configured properly. Never tried this kind of autologin but I don't think I'm talking too much nonsense :D HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Convert Inittab-Entry to systemd
On Tue, Aug 27, 2013 at 9:38 AM, Colin Guthrie gm...@colin.guthr.ie wrote: Also I don't think this will properly handle session registration will it? There is nothing here that registers the session - no pam configs to include pam_systemd etc. nope I think you would need some kind of PAMName= attribute here to also handle that (man systemd.exec(5)). Obviously the /etc/pam.d/ stuff would need to be configured accordingly with appropriate permissions (I presume) to allow autologin but also ensure the pam_systemd stuff is configured properly. Never tried this kind of autologin but I don't think I'm talking too much nonsense :D PAMName=login should just work here. Cheers, Auke ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel