LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-25-2002, 02:49 PM   #1
mtb
Member
 
Registered: Nov 2002
Location: Italy
Distribution: Linux Mint 17 Xfce
Posts: 277

Rep: Reputation: 30
Num Lock


How can i automatically turn the num lock on to use the numeric keyboard without pressing all the times num lock?

Thanx in adv.
 
Old 11-25-2002, 02:58 PM   #2
Blitzkrieg
LQ Newbie
 
Registered: Nov 2002
Distribution: RH8+SuSe8
Posts: 27

Rep: Reputation: 15
Some BIOS have an option to do that
 
Old 11-25-2002, 03:10 PM   #3
albean
Member
 
Registered: Sep 2002
Distribution: fc2
Posts: 113

Rep: Reputation: 15
If you use KDE you can set this setting in the control center.

Start control center
click Peripherals | Keyboard | Advanced Tab. Then click the "Turn on" radio button.
 
Old 11-25-2002, 08:16 PM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
What distro, and what window manager do you use?

Cool
 
Old 11-26-2002, 12:20 AM   #5
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
man setleds

u can add a command in your startup script (.bash_profile)

are u just in text mode? the setleds command should help u here. not sure how to do this in X.
 
Old 11-26-2002, 11:46 AM   #6
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Rep: Reputation: 30
You have to do two seperate things to get NumLock to work: the first for CommandLineInterface and the second for X. Both ways are outlined on my Webpage (click below) . And both ways are independent of which Window Manager/GUI you are using.

HTH
 
Old 11-26-2002, 07:02 PM   #7
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
for the console, I put this file in a /etc/rc.d/rcsysinit.d file, but you can probably throw it in your /etc/profile like what was said before.

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

I just found this one today on the lfs mailing list for turning on numlock when you start x:

use a text editor to create a file called setnumlock.c that has this in it:

#include <X11/extensions/XTest.h>
#include <X11//keysym.h>

int main(){
Display* disp = XOpenDisplay(NULL);
if (disp == NULL) return 1;
XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock),
True, CurrentTime);
XTestFakeKeyEvent(disp, XKeysymToKeycode(disp, XK_Num_Lock),
False, CurrentTime);
XCloseDisplay(disp);
return 0;
}

Then compile with:
gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock setnumlock.c \ -lX11 -lXtst

then you can move the setnumlock executable to any dir in you path (I put it in /usr/X11r6/bin), and place it in you ~/.xinitrc file

I hopt that helps

p.s.- Peebles... I didn't see a link to your web site :-(
 
Old 11-26-2002, 07:39 PM   #8
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Rep: Reputation: 30
adam_boz: It's the "www" button on the bottom of the reply
 
Old 11-27-2002, 12:39 AM   #9
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
hehe... my bad.

looks good!
(especially the setnumlock method :-)
 
  


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
Caps Lock and Num Lock leds dont work! npc Linux - Hardware 2 11-08-2005 10:40 AM
Num Lock AnimeLover1985 Slackware 5 03-25-2005 12:11 PM
Num Lock always OFF? carlosinfl Fedora 20 03-07-2005 12:51 PM
Num, Scroll, Caps/Lock all Lock up Slackware Zamochit Linux - Newbie 0 10-18-2004 07:47 PM
num lock chrismiceli Linux - General 18 12-16-2002 08:26 PM


All times are GMT -5. The time now is 08:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration