You are not logged in.

#1 2009-08-12 13:50:53

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Enabling numlock on TTY consoles not working

Hi,

I have this code on my rc.local file:

for tty in /dev/tty[1-6]; do
    /usr/bin/setleds -D +num < "$tty"
done

But it doesn't work, numlock leds are not enabled nor does the numpad outputs numbers...

What am I doing wrong?

Offline

#2 2009-08-12 15:57:19

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Enabling numlock on TTY consoles not working

I think the right expansion syntax is :

for tty in tty{1..6}; do /usr/bin/setleds -D +num < "/dev/$tty"; done

Offline

#3 2009-08-12 16:38:09

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Enabling numlock on TTY consoles not working

nope - he is ok; just try this:

for f in /dev/tty[1-6]; do echo $f; done

Offline

#4 2009-08-12 17:21:28

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Enabling numlock on TTY consoles not working

I tried that before and it outputs /dev/tty1, /dev/tty2, etc...

I also tried the command directly in bash like:

setleds -D +num < /dev/tty1

and

setleds -D -num < /dev/tty1

But the led doesn't turn on or off anyways and I yes, I made sure I was on TTY1 tongue

Offline

#5 2009-08-12 21:13:10

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Enabling numlock on TTY consoles not working

perbh wrote:

nope - he is ok; just try this:

for f in /dev/tty[1-6]; do echo $f; done

You are right this syntax gives the same output as :
for f in /dev/tty{1..6}; do echo $f; done

As to why the setleds command doesn't set the numlock, I don't know.
The command seems to work on my PC.

Offline

#6 2009-08-12 21:43:13

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: Enabling numlock on TTY consoles not working

Maybe it's something to do with the fact that I'm running Arch in VirtualBox? Now that I think of it... If numlock is enabled on the guest, I come to the host and disable it, go back to the guest and it remains disabled where it should become enabled cause that's how it was when I got out of the guest.

Offline

Board footer

Powered by FluxBB