From: "Jc García" <jyo.garcia@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] trying to turn numlock automatically in my ttys under systemd
Date: Fri, 20 Jun 2014 11:01:30 -0600 [thread overview]
Message-ID: <CAGQH77fmKOc0JUC3d8MfVszPsxUq-thq=JFF9cKCD-kxD+gaFg@mail.gmail.com> (raw)
In-Reply-To: <5147.1403283232@ccs.covici.com>
2014-06-20 10:53 GMT-06:00 <covici@ccs.covici.com>:
> Canek Peláez Valdés <caneko@gmail.com> wrote:
>
>> On Fri, Jun 20, 2014 at 4:06 AM, <covici@ccs.covici.com> wrote:
>> > Hi. I want to turn numlock automatically, but I am using systemd and I
>> > am having troubles doing this. At someones suggestion in a previous
>> > message (I think Canek's) I created
>> > /etc/systemd/system/getty@service.d/numlock.conf with the following
>> > contents
>> >
>> > [Service]
>> > ExecStartPost=/usr/bin/setleds -D -num </dev/%I
>> >
>> >
>> > However, setleds dies with the following error:
>> > Jun 19 14:24:55 ccs.covici.com setleds[4878]: KDGKBLED: Inappropriate
>> > ioctl for device
>> > Jun 19 14:24:55 ccs.covici.com setleds[4878]: Error reading current
>> > flags setting. Maybe you are not on the console?
>> >
>> > I tried to fool with chvt to make the console current, but no joy there.
>> >
>> > Any assistance would be appreciated.
>>
>> Could you post the exact invocation for setleds? It should be on the
>> logs. I think the invocation for setleds shuld be:
>>
>> /usr/bin/setleds -D +num < /dev/%i
>>
>> The difference between %I (capital "i") and %i is only that %i escapes
>> special symbols, but since it's only the string tty[1-N], I don't
>> think it matters much.
>>
>> The exact invocation of setleds matters, so we can see if the template
>> unit is generating the correct one.
>
> Thanks for your response, First of all I want -num and not +num, but
> that does not make any difference. I am using your unit from
> /usr/lib/systemd/system/getty@.service and add the following in the
> .conf file
> [Service]
> ExecStartPost=/usr/bin/setleds -D -num </dev/%I
Check my post above, I found the issue with running this command , I
wanted '+num' so thats the only diference.
> The invocation is not in the logs, all I get is the following:
> Jun 19 14:26:26 ccs.covici.com systemd[1]: Started Getty on tty8.
> Jun 19 14:26:26 ccs.covici.com setleds[5100]: KDGKBLED: Inappropriate
> ioctl for device
> Jun 19 14:26:26 ccs.covici.com setleds[5100]: Error reading current
> flags setting. Maybe you are not on the console?
> Jun 19 14:26:26 ccs.covici.com systemd[1]: getty@tty8.service: control
> process exited, code=exited status=1
> Jun 19 14:26:26 ccs.covici.com systemd[1]: Unit getty@tty8.service
> entered failed state.
>
> But I know that %I is tty8 or whatever the device is. I checked with a
> shell script to make sure.
>
>
>
> --
> Your life is like a penny. You're going to lose it. The question is:
> How do
> you spend it?
>
> John Covici
> covici@ccs.covici.com
>
next prev parent reply other threads:[~2014-06-20 17:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 9:06 [gentoo-user] trying to turn numlock automatically in my ttys under systemd covici
2014-06-20 15:06 ` Canek Peláez Valdés
2014-06-20 16:40 ` Jc García
2014-06-20 17:08 ` Canek Peláez Valdés
2014-06-20 16:53 ` covici
2014-06-20 17:01 ` Jc García [this message]
2014-06-20 17:26 ` covici
2014-06-20 18:43 ` Jc García
2014-06-20 19:46 ` covici
2014-06-20 19:52 ` Michael Cook
2014-06-20 20:04 ` Jc García
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGQH77fmKOc0JUC3d8MfVszPsxUq-thq=JFF9cKCD-kxD+gaFg@mail.gmail.com' \
--to=jyo.garcia@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox