[systemd-devel] Convert Inittab-Entry to systemd
Colin Guthrie
gmane at colin.guthr.ie
Tue Aug 27 09:38:44 PDT 2013
'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 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.
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/
More information about the systemd-devel
mailing list