Numlock in X not working.[Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Numlock in X not working.[Solved]

Postby ags40 » Wed Jul 17, 2013 13:05

I'm trying the following to have the Numlock as default in X. It does not work. Would you have any comment, please? Thank.

Code: Select all
equo install x11-misc/numlockx
# rc-update add numlock default
Last edited by ags40 on Fri Jul 19, 2013 0:25, edited 1 time in total.
ags40
Simple Hen
 
Posts: 71
Joined: Fri Dec 09, 2011 22:15

Re: Numlock in X not working.

Postby Fitzcarraldo » Wed Jul 17, 2013 16:52

If you want people to help you then you need to give them enough information, otherwise they waste time guessing what you have installed. Which Desktop Manager are you using? Which Desktop Environment are you using? Which Init System are you using?

Anyway, if you happen to be using LXDM, edit the file /etc/lxdm/lxdm.conf and change the line:

Code: Select all
# numlock=0

to:

Code: Select all
numlock=1
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Numlock in X not working.

Postby ags40 » Wed Jul 17, 2013 19:08

I'm sorry for my disregard. I've installed SL 13.07, systemD and KDE. Thank you very much
ags40
Simple Hen
 
Posts: 71
Joined: Fri Dec 09, 2011 22:15

Re: Numlock in X not working.

Postby Fitzcarraldo » Wed Jul 17, 2013 20:11

Which Desktop Manager? KDM? LXDM? Other?

Anyway, the following is one way of doing it:

'System Settings' > 'Input Devices' > 'Keyboard' > 'Hardware' > 'NumLock on KDE Startup'

Select 'Turn on' and click 'Apply'.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Numlock in X not working.

Postby ags40 » Thu Jul 18, 2013 1:07

KDM. I'm sorry, but my understanding was (wrongly) that the logical pick for KDE was KDM. I lament my ignorance on the assortment in possibilities.

Your instructions, as I understand them, lead to the activation of NumLock after X has started, I did that before asking the question. The matter of my question is: how to have NumLock defaulted on in X, before login in? Thank you very much again.
ags40
Simple Hen
 
Posts: 71
Joined: Fri Dec 09, 2011 22:15

Re: Numlock in X not working.

Postby Fitzcarraldo » Thu Jul 18, 2013 20:08

Yup, other Desktop Managers can be used for KDE, not only KDM. For example, the SL 13.04 KDE LiveDVD uses LightDM (x11-misc/lightdm-kde) instead of KDM (kde-base/kdm), as can be seen in the 13.04 KDE ISO package list, and the 13.04 KDE LiveDVD installs LightDM to the HDD for the Desktop Manager. Also, some users switch to a different Desktop Manager. That's one of the reasons why users need to provide full information about their current installation when requesting help.

Anyway, if you are using KDM and want NumLock to be active when KDM displays its login screen in X Windows (e.g. to facilitate entering a numeric password), edit the file /usr/share/config/kdm/Xsetup and add the following lines to it:

Code: Select all
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi

You have already installed x11-misc/numlockx so there is nothing more to do other than reboot. NumLock should then be active when KDM displays the login screen, and you can then login to KDE. I don't have a SL installation using KDM (my two SL installations use LXDM), so I cannot check myself if the above works, but it should do. If it doesn't, try putting the above code at the end of the file /usr/lib64/X11/xdm/Xsetup_0. You can check if the numlockx command works by executing it manually in a Konsole window:

Code: Select all
numlockx on
numlockx off
numlockx toggle
numlockx --help


BTW the command 'rc-update add numlock default' has nothing to do with numlockx, and nothing to do with X Windows. It is to enable NumLock in the console (i.e. without X Windows running). Furthermore, it is an OpenRC command and has nothing to do with systemd and will not work for systemd.


EDIT (21:33 UTC July 18, 2013): I've just tried the above on my main machine which runs Gentoo, and it works. As SL is essentially customised Gentoo with the addition of a binary package manager, there is a reasonable chance that the above will work in SL too.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Numlock in X not working.

Postby ags40 » Fri Jul 19, 2013 0:23

It did work, and very well indeed, using the the first option.
I want to thank you very expressively for the thorough, patient and instructive answer you gave me. You are a wonderful helper. Thank you very much.
ags40
Simple Hen
 
Posts: 71
Joined: Fri Dec 09, 2011 22:15


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 1 guest

cron