LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Num Lock always OFF? (https://www.linuxquestions.org/questions/fedora-35/num-lock-always-off-199784/)

PhoenixofMT 12-23-2004 02:16 PM

Adding the line to /etc/sysconfig/keyboard did nothing for me.

Found this in a "Tips/Tricks" thread:
Quote:

If you would like Num Lock to be switched on at boot-up add this to your rc.local:
Code:

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


Thanks Jon!

Nighthawk4 01-12-2005 03:36 PM

I tried both of these, i.e. the entry in the keyboard file and the one in the rc.local, but I still don't get the numlock on.

I am using FC3.

Any idea why they are not working please?

:scratch:

blue_death 02-02-2005 07:59 AM

numlock
 
about setting the numlock on startup, i remember mandrake linux runs a service program at every boot..
i dont know what program it is, but i found one that should do the same.

here is the link:
http://sourceforge.net/project/showf...lease_id=61904

a readme file contains instructions on how to add it to system startup

johnnydangerous 02-03-2005 07:18 AM

wow
 
compile = make (don't be freaked)

and why the hell you need numlock always on? you accountant?

zoomastr 02-04-2005 03:10 PM

NUMLOC
 
Here is what FINALLY worked for me I use Fedora core 3

open Emacs and type the following:

#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;
}

save as: setnumlock.c

Since this is just a source file, you will need to compile it by pasting the following into a command shell in the same directory as this file you saved as setnumlock.c:

type: gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock setnumlock.c -lX11 -lXtst

type: cp setnumlock /bin/

Edit your /home/(your-login)/.bashrc file in emacs and put in the "setnumlock" command without quotes of course..

You should now be able to just log out and back in and NUMLOCK should be on..

I hope...

:newbie: zoomastr

Megamieuwsel 03-07-2005 12:51 PM

Re: wow
 
Quote:

Originally posted by johnnydangerous
and why the hell you need numlock always on? you accountant? [/B]
Typing IP-adresses also goes a lot faster and easier by the numpad.
Mathematic calculations also go a lot smoother.
In fact : That row of numbers on top of the keyboard is the one I could do without ; Clumsy , archaïc , retarded....


All times are GMT -5. The time now is 10:35 PM.