You are not logged in.

#1 2016-12-06 16:34:27

ysetdng
Member
Registered: 2014-05-02
Posts: 42

Two-in-one systemd service file not working properly

I want to set up my installation such that on startup

  • I get automatically logged in and

  • the keyboard repeat and delaytimes are set to my wishes.

  I tried to accomplish this using only a single service file, namely

cat /etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStartPre=/usr/bin/kbdrate -s -d 100 -r 100
ExecStart=
ExecStart=-/usr/bin/agetty --autologin root %I $TERM
StandardInput=tty
Type=idle

The problem is, autologin works just fine but the keyboard settings are not always invoked.  What could be the problem?  I also tried setting 'StandardInput=tty-force' without success.

[EDIT] It seems that the keyboard settings don't work at all anymore (on startup).  I'm sure that the same file worked on my previous install I did a few weeks ago.  But when I exit the shell, the service is restarted and then the keyboard settings are always invoked.  Just not on the first call.

[EDIT] I now put another ExecStartPre invoking one second of sleep before kbdrate and now everything works fine.  Apparently they tty or whatever was not ready for kbdrate at the beginning of the process.  I also tried creating a kbdrate.service file as described here but without success.

Last edited by ysetdng (2016-12-07 09:39:19)

Offline

Board footer

Powered by FluxBB