LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2003, 12:13 PM   #1
Theoutdoorsman
Member
 
Registered: Sep 2003
Distribution: Mandriva 2009
Posts: 142

Rep: Reputation: 15
Enabling Num. Lock on boot................?


Anyone know a way to enable numbers lock on boot?
 
Old 10-09-2003, 12:54 PM   #2
Vince0000
Member
 
Registered: Sep 2003
Posts: 48

Rep: Reputation: 15
I tried this on Red Hat 9 and it worked Great... That bugged me also but never really thought to find a solution till I seen your post :-)

Anyway for RedHat9 may work for others I really don't know

Add the folloing lines to /etc/rc.d/rc.sysinit

for tty in /dev/tty[1-9]*; do
setleds -D +num < $tty
done

Then reboot that should work... (I just put it on the bottom of the list)

Mandrake I belive (Don't quote me) may be able to do chkconfig numlock status to see if it is on or off and then chkconfig numblock on to turn it on at boot but i've never used mandrake just read that and it didn't work with redhat.

P.S. backup the rc.sysinit to another file for safty in case it goes bad for you.

Vince
 
Old 10-09-2003, 12:56 PM   #3
wuck
Member
 
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170

Rep: Reputation: 30
Why not quote you about Mandrake? You _were_ right, there is a service called 'numlock' which puts on numlock every time you boot.
 
Old 10-09-2003, 12:59 PM   #4
Vince0000
Member
 
Registered: Sep 2003
Posts: 48

Rep: Reputation: 15
thanks for confirming that... I'm a newbie with Linux and don't want to steer anyone the wrong way but help if I can.

L8r,
Vince
 
Old 10-09-2003, 01:18 PM   #5
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
......... or -

ln -s /etc/rc.d/init.d/numlock /etc/rc.d/rc5.d/S85numlock

if you want it to run in run level 5
 
Old 10-13-2003, 05:25 PM   #6
Theoutdoorsman
Member
 
Registered: Sep 2003
Distribution: Mandriva 2009
Posts: 142

Original Poster
Rep: Reputation: 15
Hey Vince0000,

I copied and pasted this into the file you told me to but it still doesn't work:



for tty in /dev/tty[1-9]*; do
setleds -D +num < $tty
done



Do I need to change something here or is this EXACTLY how it should read? Thanks a bunch..............ALAN
 
Old 10-13-2003, 09:05 PM   #7
Vince0000
Member
 
Registered: Sep 2003
Posts: 48

Rep: Reputation: 15
Yes that should be it... I had to do my other computer at home and it worked perfect also...

for tty in /dev/tty[1-9]*; do
setleds -D +num < $tty
done

is the code I used to to be sure but one thing I did do is typed it in manually instead of copy and paste. I believe a copy and past may give it unnecessary spaces etc (Possible?)

I just typed that in exactly as shown at the bottom of the /etc/rc.d/rc.sysinit file

RedHat 9 btw... if you are using a different distribution it may be different.

Vince
 
Old 10-13-2003, 10:41 PM   #8
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
for tty in /dev/tty[1-9]*; do
setleds -D +num < $tty
done

did not work for me.

neither did simlinking

ln -s /etc/rc.d/init.d/numlock /etc/rc.d/rc5.d/S85numlock

[which makes perfect sense seeing as tho I don't have numlock in RH9 - d' Oh!]






Last edited by mossy; 10-13-2003 at 10:50 PM.
 
Old 10-13-2003, 11:09 PM   #9
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
nope - this did not work either:

if you have KDE installed run:

kcontrol

go to: peripherals >> keyboard >> enable numlock.

Gnome just did not have it anywhere.

I am wonderin if it is because I do not actually use KDE ???

If I configure any H/W with the KDE control panel should the settings stick in Gnome???

Last edited by mossy; 10-13-2003 at 11:15 PM.
 
Old 10-14-2003, 09:41 AM   #10
Vince0000
Member
 
Registered: Sep 2003
Posts: 48

Rep: Reputation: 15
The code that I added enabled the NUMLOCK in the TEXT mode login I haven't tested it in the XMode GUI... I will check that and post back later... It worked for mine on 2 systems first time each one.

Vince
 
Old 10-14-2003, 12:05 PM   #11
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
nVidia driver stopping numlock????


well last night I tried a bunch of different combo's
~man setleds says to put

INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done

into the /etc/rc file.

I also did a combo in the /etc/rc.d/rc.sysinit file.

for tty in /dev/tty[1-9]*; do
setleds -D +num < $tty
done


I tried diff versions of this too

Add to /etc/rc.d/rc.local:
INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done

sometimes replacing each code with

setleds -L +num < /dev/tty[1]
instead of
setleds -D +num < $tty

SO ~ What happens??

~ setleds -L +num < /dev/tty[1] ~ produces nothing.
~ setleds -D +num < $tty ~ gives lets numlock run in all the inits except X. Ironic.

Everything is fine until I startx - it is enabled UNTIL the video switches the screen to the nVidia splash screen.

What can be causing this ??

I was wondering if the module in the video driver is causing it to reset - OR is there another script running and setting the tty back to numlock off??
 
Old 10-14-2003, 01:13 PM   #12
Vince0000
Member
 
Registered: Sep 2003
Posts: 48

Rep: Reputation: 15
You may want to check out this link it may involve a little work but I never tested it...

http://home.sw.rr.com/linuxbits/NumLock.html

It covers a setup for the Console and the X Gui...

Let me know if it does work, I started but my compile with GCC didn't go just quite right... but I do all my work from the console so maybe you will have more luck.

Vince
 
Old 10-14-2003, 01:56 PM   #13
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
thanks it looks like the script for X might cover it - I appreciate it - I will give it a shot when I get home as I can't test by remote.
 
Old 10-14-2003, 02:09 PM   #14
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally posted by Vince0000
You may want to check out this link it may involve a little work but I never tested it...

http://home.sw.rr.com/linuxbits/NumLock.html

It covers a setup for the Console and the X Gui...

Let me know if it does work, I started but my compile with GCC didn't go just quite right... but I do all my work from the console so maybe you will have more luck.

Vince
Thanks Vince, that link worked! It told me how to compile a little C script which made a thing called setnumlock. I've told Gnome to run at boot and it works! I'd put this annoyance out of my mind but this thread caught my eye so thanks for that gift unlooked for.

Last edited by Andrew Benton; 10-14-2003 at 02:11 PM.
 
Old 10-14-2003, 02:26 PM   #15
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
Oooo yer gettin me hopes up now Andrew.


It really is annoying tho -is'nt it - especially when you are typing something delicate like a long command then you need number and you plod thru destroying everything you typed. I hate that beep.

I cannot be trained not to use the numpad cos I use it contstantly in work day in day out all day. - It's just too handy.

Last edited by mossy; 10-14-2003 at 02:31 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting num lock to "on" at boot or log in. ToothlessRebel Linux - Newbie 8 05-30-2006 12:46 PM
Caps Lock and Num Lock leds dont work! npc Linux - Hardware 2 11-08-2005 11:40 AM
Boot up Num Lock and Insert status dangerousdave Linux - Newbie 1 08-25-2005 07:42 PM
Num, Scroll, Caps/Lock all Lock up Slackware Zamochit Linux - Newbie 0 10-18-2004 08:47 PM
num lock chrismiceli Linux - General 18 12-16-2002 09:26 PM


All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration