[SLE] Activate NumLock @ Start of Xwindows
Hi SuSErs :) from the SuSE Knowledge_Base, I got the following :- ............................................. Activate Numlock key at the start of X Request: You would like to have the Numlock key activated at the start of the graphical user interface instead of pressing the Numlock-key manually. Procedure: Use the following program to activate the NumLock-key //numlock.c #include #include 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; } Create a file Numlock.c with the program code mentioned above and enter the command gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock Numlock.c -lX11 -lXtst To successfully invoke this command you need the C compiler(series d, package gcc) and the include files of the X libraries(package xdevel, series x). You will find a program called setnumlock in the current directory. You have to copy this file into the directory /usr/bin/local and make an entry in the file ~/.xinitrc. .............................................................. I believe that I have read this stuff, and have the libraries needed. .. . . maybe I did not understand what I read ! Attempts to execute the instructions, in the directories of /root, then /usr/src/linux, and finally /home/myself have all failed :( Did anyone have better luck ? best wishes Richard ------- ____________ sent on Linux ____________ This Email is 100% Virus Free! How do I know? ~ Because no Microsoft products were used to generate it! -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Hi, On Fri, Aug 11 2000 at 11:13 +0000, tabanna wrote:
Use the following program to activate the NumLock-key
//numlock.c #include #include
This should probably be
#include
I believe that I have read this stuff, and have the libraries needed. .. . . maybe I did not understand what I read !
The necessary headers where not included. Make the above changes and it should compile. I couldn't get it to do something useful, though. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Hello, Stefan :) & and thanks for your lights . . . you are spot-on, correct. After you adjustments, it compiled OK The guy who did the write-up, on SuSE's Knowledge-Base, must have been a little slap-happy { he typed usr/bin/local , in place of : usr/local/bin , as well as his omissions that you kindly pointed out {;-> } In the end, the 'Recipe' does not work . . . %#$@ ! .. . . never mind :) Your help is much appreciated. Best regards Richard Aegina, Greece ________________ -- ____________ sent on Linux ____________ This Email is 100% Virus Free! How do I know? ~ Because no Microsoft products were used to generate it! -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Hi, On Fri, Aug 11 2000 at 18:14 +0000, tabanna wrote:
The guy who did the write-up, on SuSE's Knowledge-Base, must have been a little slap-happy { he typed usr/bin/local , in place of : usr/local/bin , as well as his omissions that you kindly pointed out {;-> }
Looks like this got screwed up when the entry was translated. I just looked up the German one. It's OK.
In the end, the 'Recipe' does not work . . . %#$@ !
It isn't a good idea to turn NumLock on, anyway. Some programs behave strangely when it's on, because X treats NumLock as a modifier (like Shift, Ctrl etc.). Add the following to your ~/.Xmodmap file keycode 0x5A = 0 keycode 0x57 = 1 keycode 0x58 = 2 keycode 0x59 = 3 keycode 0x53 = 4 keycode 0x54 = 5 keycode 0x55 = 6 keycode 0x4F = 7 keycode 0x50 = 8 keycode 0x51 = 9 keycode 0x5B = period keycode 0x6C = Return keycode 0x56 = plus keycode 0x52 = minus keycode 0x3F = asterisk keycode 0x70 = slash keycode 0x4D = and do a `xmodmap ~/.Xmodmap'. This has the same effect as turning NumLock on. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
participants (2)
-
stefan.troeger@wirtschaft.tu-chemnitz.de
-
tabanna@aig.forthnet.gr