0

I recently purchased and started using a KVM. Most things work as I expect them, but when I switch back to my main [ubuntu 10.04] desktop, numlock gets turned off.

I suspect that it looks to the computer like the keyboard is just plugged in. However, the FunctionLock key doesn't get switched. (The keyboard is a split keyboard with a FunctionLock feature that allows the F1 to F12 keys for other purposes). How can I tell Ubuntu to keep my numlock status? Or, tell it to always switch to numlock is on whenever a new keyboard is plugged in (which is what I suspect the computer thinks is happening when I switch the KVM to it)?

~edit~

At William's suggestion (see below), I installed gconf-editor and looked at the keyboard settings. On the computer that has the behavior I want (numlock on by default), there is a numlock_on setting under /desktop/gnome/peripherals/keyboard/host-desktop1/0/numlock_on (Perhaps important to note, the numlock_on is the only key in the folder, and it doesn't have any of the key documentation set. However, on the other computer (where it is not working), that setting is absent.

According to How do I use the gconf editor?, gconf is used for storing application settings, and not particularly intended for settings stuff.

So, twofold remaining question:

  1. Is that the setting I need? (I suspect the answer is yes, and I'd be happy to test that theory)
  2. How do I set it?
David Oneill
  • 12,144
  • 1
    Not really a solution for your NumLock problem, but the reason why Fn Lock is not affected is that the state/feature of that key is handled inside the keyboard itself, while NumLock is handled in the OS. – JanC Jan 31 '12 at 20:45
  • OK, if that didn't help, I tried. – William Feb 03 '12 at 04:19
  • @William: I'm pretty sure the 'numlock_on' you mentioned is what I'm looking for - see my edit to the question. – David Oneill Feb 03 '12 at 04:25
  • Is there a setting in your BIOS to turn numlock on by default? – William Feb 03 '12 at 14:25
  • And does it change anything if you check the box in the gconf-editor to turn numlock_on on? – William Feb 03 '12 at 14:26
  • sudo apt-get install numlockx is worth a try, too. – William Feb 03 '12 at 14:27
  • @William re: checking the numlock_on box - there is no numlock_on setting, so there's no box to check. (I'm going to go check the BIOS settings... I'll let you know there) – David Oneill Feb 03 '12 at 14:57
  • @William no dice on the BIOS - there wasn't anything about numlock in there. – David Oneill Feb 03 '12 at 15:05
  • Okay. How 'bout the numlockx program? – William Feb 03 '12 at 17:17
  • I have it, and it will let me set the numlock to on. Is there a way I can tell it to run each time the keyboard is plugged in? – David Oneill Feb 03 '12 at 17:19
  • @William - numlockx on did the trick http://askubuntu.com/q/5140/6161 showed how to get it run when the keyboard is plugged in. Dump the numlockx into an answer and I'll accept it. Thanks for your help! – David Oneill Feb 04 '12 at 17:45
  • Umm... This is gonna make me sound bad but could you please award the bounty? 50 rep is a big deal! – William Feb 05 '12 at 23:02
  • @William yeah, I just been onto the site from my last comment until now. Thanks for all your help on this! – David Oneill Feb 06 '12 at 03:51

1 Answers1

2

First suggestion.

Use numlockx: sudo apt-get install numlockx

Second suggestion (just to complete your question)

you can create the key you have indicated using the format:

gconftool-2 --type  bool --set /desktop/gnome/peripherals/keyboard/host-desktop1/0/numlock_on 1

I'm assuming in the example that numlock_on is a boolean value

If numlock_on is a string or int then you'll need to change the type parameter accordingly.

fossfreedom
  • 172,746
William
  • 7,668