1 |
On Fri, Jun 20, 2014 at 4:06 AM, <covici@××××××××××.com> wrote: |
2 |
> Hi. I want to turn numlock automatically, but I am using systemd and I |
3 |
> am having troubles doing this. At someones suggestion in a previous |
4 |
> message (I think Canek's) I created |
5 |
> /etc/systemd/system/getty@service.d/numlock.conf with the following |
6 |
> contents |
7 |
> |
8 |
> [Service] |
9 |
> ExecStartPost=/usr/bin/setleds -D -num </dev/%I |
10 |
> |
11 |
> |
12 |
> However, setleds dies with the following error: |
13 |
> Jun 19 14:24:55 ccs.covici.com setleds[4878]: KDGKBLED: Inappropriate |
14 |
> ioctl for device |
15 |
> Jun 19 14:24:55 ccs.covici.com setleds[4878]: Error reading current |
16 |
> flags setting. Maybe you are not on the console? |
17 |
> |
18 |
> I tried to fool with chvt to make the console current, but no joy there. |
19 |
> |
20 |
> Any assistance would be appreciated. |
21 |
|
22 |
Could you post the exact invocation for setleds? It should be on the |
23 |
logs. I think the invocation for setleds shuld be: |
24 |
|
25 |
/usr/bin/setleds -D +num < /dev/%i |
26 |
|
27 |
The difference between %I (capital "i") and %i is only that %i escapes |
28 |
special symbols, but since it's only the string tty[1-N], I don't |
29 |
think it matters much. |
30 |
|
31 |
The exact invocation of setleds matters, so we can see if the template |
32 |
unit is generating the correct one. |
33 |
|
34 |
Regards. |
35 |
-- |
36 |
Canek Peláez Valdés |
37 |
Profesor de asignatura, Facultad de Ciencias |
38 |
Universidad Nacional Autónoma de México |