LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-08-2008, 08:32 AM   #1
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Rep: Reputation: 31
x11 doesnt have num lock on


im getting tired of turning num lock on everytime i startx. is there a way to have it come on automatically?
 
Old 12-08-2008, 08:44 AM   #2
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
also the . on my number pad doesnt work under linux?
 
Old 12-08-2008, 09:17 AM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
http://slackbuilds.org/repository/12.1/system/numlockx/
Regards,
Bill
 
Old 12-08-2008, 12:22 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Yeah, there definitely is a strong bias against the Num Lock key in the 'nix world.

Here is how I set the Num Lock for console mode (run from within rc.local):

Code:
# Turn numlock on:
# the following should match the number of consoles opened in /etc/inittab
# how many ttys are assigned in /etc/inittab?
 INITTY=/dev/tty[1-`grep -v "^# " /etc/inittab | grep -c "^c[0-9]:"`]
 for tty in $INITTY; do
# -v = verbose
#   /usr/bin/setleds -v -D +num < $tty
  /usr/bin/setleds -D +num < $tty
 done
For graphical mode, use one of the Num Lock programs as mentioned above.

Additionally, KDE supports Num Lock. Look in the Control Center, under Peripherals/Keyboard. KDE also supports Accessibility options to enable a low volume pip noise when the Num Lock key is toggled. Look in the Control Center, Regional & Accessibility, Accessibility, Locking Keys. Within KDE Num Lock and Caps Lock are considered locking keys. I don't know why Scroll Lock and Insert are not. They should be.

If you want Num Lock support with the kernel, you have to modify keyboard.c and recompile the kernel. Always irritated me that I set Num Lock in the BIOS and Linus toggled Num Lock off. Should be a boot parameter, not hard-coded.

Quote:
also the . on my number pad doesnt work under linux?
Temporarily disable Num Lock and check that the key acts as a Delete key. If not then the key might be dirty and not making contact.

Last edited by Woodsman; 12-08-2008 at 12:24 PM.
 
Old 12-08-2008, 06:43 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
I have a ~/.Xmodmap file with the following.

Code:
keycode 79=7
keycode 80=8
keycode 81=9
keycode 83=4
keycode 84=5
keycode 85=6
keycode 87=1
keycode 88=2
keycode 89=3
keycode 90=0
keycode 91=period
keycode 157=KP_Enter
Assuming the keycodes match you'll be in permanent "Numlock=on" mode
 
1 members found this post helpful.
Old 12-09-2008, 04:34 AM   #6
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
the key doesnt work as a period or a delete, the prog i installed didnt do much from slack builds. im using xfce.

i added an xmodmap, but what permissions does the file have? im gonna guess its a 755 kinda file.
 
Old 12-09-2008, 04:42 AM   #7
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
setleds +numlock works great, xfce is another story. whats the deal with nix being numb lock nazi's? i can see that being useful for a laptop that hijacks half of the keyboard for num lock, thats about it. i love num lock on my desktop =(
 
Old 12-09-2008, 05:50 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Start with some basics:

1. Test the Period/Delete key on a different computer.

2. Don't start X. Does the Period/Delete key work in console mode?

There is an X applet called xev. Run the program from the command line and press the Period/Delete key. You will see the keycode for the key.
 
Old 12-09-2008, 06:27 PM   #9
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
dont start x LOL silly thats what ctrl + alt + f2 is for =)

xev confirms that the period is shot on this keyboard, no worries, i have a clone of it 2 feet from me.
 
Old 12-09-2008, 06:55 PM   #10
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by ninja master View Post

i added an xmodmap, but what permissions does the file have? im gonna guess its a 755 kinda file.
just has to be readable... look at ~/.xinitrc

Notice the period and uppercase X

Code:
usermodmap=$HOME/.Xmodmap
You can just type in "xmodmap .Xmodmap" to test it.

Oh another handy thing I do with it is disable the damned capslock key.

Code:
remove Lock = Caps_Lock
 
  


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
Caps lock, Num Lock notification applications tuxedup Linux - Desktop 2 03-02-2008 05:23 PM
Caps Lock and Num Lock leds dont work! npc Linux - Hardware 2 11-08-2005 10:40 AM
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 mtb Linux - Newbie 8 11-27-2002 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:24 PM.

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