Jump to content

num lock key


bigjohn
 Share

Recommended Posts

As someone who was originally accounting trained as well as trained to type (properly), I prefer to input numbers using the number key pad instead of the main qwerty section of the keyboard.

 

I have set it to start num lock when logged into KDE, but how do I set it up to start during boot, for input of passwords and manual boot/non gui input?

 

regards

 

John

Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

This is weird, but is how it works:

 

[*]bios stage: enable numlock

 

[*]at lilo stage: I don't remember, but I think there was a flag to enable it.

 

[*]On text mode (what do you want):

 for tty in /dev/tty[1-6]; do

   setleds -D +num < $tty

done

... or simplier, service numlock start

 

[*]On X mode: put "enable_X11_numlock on" on your init rc script

Link to comment
Share on other sites

Ok, so I've checked the BIOS setting and it's enabled

I have looked in the bootloader config gui in the mandrake control centre - but cannot find where any "enable" flag might be.

 

The rest of the suggestions are "dark magic", how would I do this?

 

regards

 

John

Link to comment
Share on other sites

The rest of the suggestions are "dark magic", how would I do this?

as root run:

 

~# service numlock start

 

that will run the code I've put above enabling numlock on every VT from 1 to 6 (console mode). To make the changes permanent you'll need to do:

 

~# chkconfig --add numlock

 

or if you want to be runlevel restrictive (ie for rl 5), run:

 

~# chkconfig --level 5 numlock

 

Check the man pages of those commands to see what is their job

 

For enabling the numlock in X (besides the way you did it in your KDE) search this board for posts by bvc about numlock

Link to comment
Share on other sites

an easy way would be to browse to ~/.kde/Autostart with konqueror>rt-click and choose Create New>Text File>name it autostart.sh, or numlock.sh or whatever you want>rt-click the new file>Open with_your editor and put the below in it and save it.

 

#!/bin/bash

enable_X11_numlock &

 

Then rt-click it>choose properties and make it Exec.

 

:shock: See...no dark magic :wink:

 

 

 

 

 

for dark magic, open a terminal;

#cd ~/.kde/Autostart

#vi numlock.sh

 

put

#!/bin/bash

enable_X11_numlock &

 

hit Esc : wq <Enter>

 

#chmod a+x numlock.sh

 

and you're done....not so dark..and faster :wink:

 

 

aru?, is there a more proper chmod <number> than the above a+x?

Link to comment
Share on other sites

aru?, is there a more proper chmod <number> than the above a+x?

 

No, not at least as you purposed it: a+x --> ADD executable permissions to the permissions that the file already has for owner,group and others.

In numeric mode, AFAIK, you have to redefine the permissions for each one each time you run chmod; for example for your "a+x" I would do: "chmod 755 file" or "chmod 711 file" deppending which are the other permissions you want to set for group and others.

 

IMHO, the simbolic mode is much more versatile than the numeric one in daily basis usage, though in scripts I prefer to use the numeric mode as you have much more control over the file you are changing (you can have the same control using the '=' in symbolic mode, though the syntax is really ugly)

Link to comment
Share on other sites

This is going to sound really pathetic.

 

I went into konqueror, and couldn't find kde file by browsing, and when I try and "find file" I just get an additional konqueror window pop up.

 

So I have started to try the "dark magic" solution, and get as far as the "vi numlock.sh" part. I presume that I have "enter" after that ? Becasue when I do, the screen changes and has ~symbols in blue, down the side - is this the vi editor ? or have I done something wrong?

 

Not knowing what that is, means back to the usualy cowardice and just close it and come back here and ask again.

 

(sorry if I seem such hard work - but I have had lots of disasters since I started this "linux lark", and have found the cowardice to be the safest!)

 

regards

 

John

Link to comment
Share on other sites

Yes, that's vi. Vi is strange at first, but you can quickly get used to it (using it without thinking is another matter). In VI, a single ~ alone on a line means that this line is not part of the file. In short, the file extends to just above the first ~ sign.

This may help you:

http://www.troubleshooters.com/lpm/200212/200212.htm

 

Yves.

Link to comment
Share on other sites

... is this the vi editor ? ...

If you have some spare time, I strongly recomend you to run the 'vimtutor' (/usr/bin/vimtutor) which is a little interactive guide to start using vim (the vi that mandrake has)

Link to comment
Share on other sites

This is starting to get vvv confusing:?:

 

So the bit that I get to when I have done vi numlock.sh that gives me the lines with the ~ is the vi editor. Right, got that. But the instructions in the "trouble shooter" that TheYinYeti has linked, I am finding equally confusing.

 

The bit that bvc has mentioned about the ".kde" file being a hidden file, Ok, so does that have to be done as root?

 

aru's suggestion that I run the "vimtutor",I understand, but how do I "run" it, I try typing vimtutor in the run command box and it does nothing and just disappears.

 

 

Oh, and when I am posting, to save "typing miles" (or typing kilometre's for that matter) on other boards/forums I can usually copy and paste (LQ, solwise,etc), but when I try that here, I don't seem to be able to do it, would that be an "opera" thing or a "mandrakerusers" thing?

 

regards

 

John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...