LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 04-06-2005, 11:21 AM   #1
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
numlock @ boot


how can i get numlock to turn on automatically after bootup?
i know theres a setting for this in bios and i have it on and it works when i boot windowz, but is off when i boot into linux.

its just all these little things that i take for granted in windows that keeps me discouraged from linux.

i wouldnt think it should matter, but im running ubuntu 5.04 on 2.6.10.5

thanks
 
Old 04-06-2005, 11:23 AM   #2
eeried
Member
 
Registered: Jan 2004
Distribution: Xubuntu Dapper - Debian Etch - Puppy Linux
Posts: 136

Rep: Reputation: 15
If i remember right people have said somewhere (not on this forum though) you can get aprogram called xnumlock through apt-get and it should do the job (or help you configure your numlock option).
 
Old 04-06-2005, 11:27 AM   #3
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Original Poster
Rep: Reputation: 60
alright, thanks..

ill check out the program with synaptic and try to install it.
do you know much about it? it seems it would make sense it would just load at boottime and then end after this? so it doesnt stay in memory for no reason..

i would have thought there would be a file you could edit and add a line for this :S oh well, maybe not.

thanks again!
 
Old 04-06-2005, 01:24 PM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
if just using X then you need to use numlockx or similar app, I use it without problems, if just booting to a console then you can use the setleds program which seems to be normally included in dirstros, it certainly is in slackware anyway
 
Old 04-06-2005, 01:33 PM   #5
eeried
Member
 
Registered: Jan 2004
Distribution: Xubuntu Dapper - Debian Etch - Puppy Linux
Posts: 136

Rep: Reputation: 15
i'm afraid I don't know anything about the program xnumlock but you'll find some information in Synaptic.

I would imagines it configures the right file for you, and there ought be a way to edit a file manually -- but then we both must cry for help or search the Web at this stage because I have not the faintest idea -- I've grown used to pressing the numlock key, and checkinng it's on has become a habit. True though ,auto-numlocking would be good.
 
Old 04-06-2005, 03:07 PM   #6
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
Copy the following into setnumlock.c
#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 it with:
gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock setnumlock.c -lX11 -lXtst

Then place it in your /etc/xinit/xinitrc file (or the file that symlink is pointing to) as the second to last line.

NOTE: KDE3.1 has a configurable option to enable/disable numlock in Control Center/Peripherals/Keyboard.

copied from webpage author unkown.
 
  


Reply



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
Boot-up numlock cdhgee Linux - General 3 07-21-2005 03:21 AM
OpenBSD and numlock on at boot gentisle *BSD 2 05-25-2005 01:47 PM
numlock on boot... moschi Linux - Newbie 4 09-05-2004 03:11 AM
Boot with numlock on? Possible? MillyFish Fedora 14 06-10-2004 08:05 AM
Numlock on on boot FNC Linux - General 2 05-18-2003 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:27 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
Open Source Consulting | Domain Registration