LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   When X starts NumLock being enabled (https://www.linuxquestions.org/questions/linux-desktop-74/when-x-starts-numlock-being-enabled-4175512642/)

gopyan 07-29-2014 01:27 PM

When X starts NumLock being enabled
 
Hello Friends.
Please, help me out.

System RHEL 6.4. Linux kernel - 2.4.32.

We have strange problem. When X starts Numlock is being enabled, but in console mode it disable. When I switch to console mode Numlock is become OFF, when I back to X mode , Numlock is become on. How I can do, that Numlock is always OFF???

Please, don't suggest me numlockx utility. It absent in this linux distribution.
Please, don't suggest me this bash script, because it is for console mode. We need X mode.

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




Please, don't suggest this code


#include <X11/extensions/XTest.h>
#include <X11/keysym.h>

int main(void)
{
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;
}

I compile it, it don't work. Please, help.
P.S. This behavoir observed both under root and under ordinary user.

John VV 07-29-2014 02:34 PM

numlockx is in rpmforge

contact your redhat tech support for installing and CONFIGURING
"yum-plugin-priorities"

Code:

su -
yum install yum-plugin-priorities
--- reboot and ----
yum install rpmforge-release
yum install numlockx

and CONFIGURE !!! rpmforge so as to NOT replace system files

gopyan 07-29-2014 10:29 PM

Thanks for attention to my problem.

As you see, my linux is very old. My server is special and i haven't any connection to internet. I haven't yum. Main packet manager on this comp is rpm.

John VV 07-29-2014 10:54 PM

6.4 is not "Very Old" it was released in Feb. 2013
the current in the 6 series is 6.5

contact redhat for the instructions for "offline" installing of software

You did buy the REQUIRED redhat support contract ? right ?

now there WAS back in 1996 RH 6.0 ( this was NOT!!!! RHEL 6.0 from 2010)

gopyan 07-29-2014 11:33 PM

Excuse me - RHEL 6.2. Please, see to kernel version.

NO. I didn't buy support contract. We use system which is port of RHEL 6.2.
Maybe exists other ways instead of install numlockx packet?????

gopyan 07-30-2014 12:40 AM

But..........stop. I have some news.

When I create new user and invoke 'startx' Numlock don't switch to ON state, it remain in OFF state.

It need to me. How to find out what difference between ROOT and NEW_USER settings.

jefro 07-30-2014 03:55 PM

In most of these deals I see the numblock will be off on first use. When a user presses the numblock on it then returns on when any other log on conditions exist.

John VV 07-30-2014 04:10 PM

from gnome
system / preferences / start up applications
click the "options" tab
and set to
"Automatically remember running applications when logging out"


All times are GMT -5. The time now is 10:16 AM.