xsetnumlock - set the numlock key

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

xsetnumlock - set the numlock key

#1 Post by GuestToo »

xsetnumlock

Toggles the X windows numlock state

Put in /root/.xinitrc if you want to change the state of the numlock key when X windows starts.

http://www.linuxfromscratch.org/hints/d ... umlock.txt
Attachments
xsetnumlock.pup
xsetnumlock
(2.57 KiB) Downloaded 1386 times

User avatar
gdemonta
Posts: 190
Joined: Mon 19 Feb 2007, 08:17
Location: Paris, France

#2 Post by gdemonta »

I am just putting in the post the fact that the line to add in xinitrc is:

Code: Select all

/usr/bin/numlockx on
[color=blue]Dumbledore: "The evidence of the Dark Lord's return is incontrovertible"[/color]
IBM X31 - Puppy 2.16 Hard disk install with EZpup

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

actually, i think the program in this package is the tiny program on the linuxfromscratch.org page under

2.4. COMPILING A LITTLE PROGRAM YOURSELF

it does not turn on the numlock key, it toggles whatever state it is in ... the "on" option is for a different program, numlockx

so whether you put

xsetnumlock

or

xsetnumlock on

in .xinitrc, i don't think it should make any difference

numlockx will not work, because that program was not included in this package

User avatar
gdemonta
Posts: 190
Joined: Mon 19 Feb 2007, 08:17
Location: Paris, France

#4 Post by gdemonta »

Ok thanks GuesToo,
I read it a little hastily!! And without trying it, which is worse. I'll report back when I try it.
Guillaume
[color=blue]Dumbledore: "The evidence of the Dark Lord's return is incontrovertible"[/color]
IBM X31 - Puppy 2.16 Hard disk install with EZpup

Leon
Posts: 265
Joined: Wed 22 Jun 2005, 21:33

#5 Post by Leon »

NumLockX 1.1

I hope it will be a part of Puppy someday.

(C) 2000-2001 Lubos Lunak <l.lunak@kde.org>
(C) 2001 Oswald Buddenhagen <ossi@kde.org>

Usage
numlockx [on|off]
on - turns NumLock on in X ( default )
off - turns NumLock off in X
toggle - toggles the NumLock on and off in X

Binary
Compiled in Puppy and compressed with upx, 6072 bytes, attached as numlockx.bin-1.1.tar.gz file to this post

Installation
1. Unpack attached numlockx.bin-1.1.tar.gz file with >Utility>XArchive archiver and save numlockx file to:

/usr/X11R6/bin

2. Insert this line at the beginning of /root/.xinitrc file if you want to turn NumLock on:

/usr/X11R6/bin/numlockx

Source
http://ktown.kde.org/~seli/numlockx/
http://ktown.kde.org/~seli/numlockx/numlockx-1.1.tar.gz
Attachments
numlockx.bin-1.1.tar.gz
(3.03 KiB) Downloaded 1361 times
Last edited by Leon on Mon 02 Jul 2007, 19:07, edited 1 time in total.

Lambo
Posts: 13
Joined: Thu 28 Jun 2007, 17:10
Location: Lincoln England

set numlock key

#6 Post by Lambo »

Hi
I also would like to have the numlock key set to ON when booting, but due to my lack of knowledge of Linux, cannot understand the instructions. I am using Puppy 2.16. I've downloaded numlockx-1.1.tar.gz and unpacked and added it to /usr/X11R6/bin. Fine so far - but where do I find /root/.xinitrc? File search comes up negative. This is where my ignorance shows! Thanks for any help.
Pete

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#7 Post by GuestToo »

the file you want to edit is .xinitrc in /root ... files that begin with a . character are hidden files

1) click the Home icon on the desktop

2) Click the Show Hidden Files button on the top of the Rox filer window (the eye)

3) right click the file .xinitrc then click Open As Text

4) add the line:

numlockx on

add the line somewhere before (above) #exec $CURRENTWM ... but don't make it the first line of the file

Lambo
Posts: 13
Joined: Thu 28 Jun 2007, 17:10
Location: Lincoln England

#8 Post by Lambo »

Hi GuestToo - thanks for info on finding hidden files - entered line numlockx on as directed, but so far no numlock. I guess I've done something wrong somewhere, so back to the beginning and start again....All part of the learning curve.
Pete

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#9 Post by GuestToo »

it should work when you restart X windows

it's possible that you need to set the execute permissions on the file ... right click it in /usr/X11R6/bin, click Properties, then check the boxes in the Exec column (for Owner, Group, and World) ... that should allow the program to be executable

the whole idea behind dotpup packages is to avoid newbies needing to know about tar, the file system, the executable and library paths, permissions, and so on ... the idea is to just download the dotpup file and click it to install it, similar to installing a program in Windows

User avatar
Gekko
Posts: 443
Joined: Sat 22 Jul 2006, 09:57
Location: Sydney, New South Wales

#10 Post by Gekko »

Another vote for default in all versions of Puppy. Nothing worse than my keyboard lying to me saying I have numlock on and having to press it 3 times to get it on.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

having to press it 3 times
i seem to remember that Xvesa does not work well with the xkb extension, and causes the caps lock and numlock keys to require 4 presses to cycle

you can disable the xkb extension by adding the X option -kb ... i seem to remember that fixes the problem with 4 presses per cycle, but i don't think numlockx works without the xkb extension ... i don't know whether xsetnumlock in my package requires the xkb extension or not

there used to be a GTK bug that required the xkb extension to be enabled as a workaround ... entering text would switch back and forth between left-to-right and right-to-left mode ... maybe that bug has been fixed ... or maybe it hasn't ... if you disable the xkb extension and the bug still exists, it will be very obvious

Lambo
Posts: 13
Joined: Thu 28 Jun 2007, 17:10
Location: Lincoln England

#12 Post by Lambo »

Hi GuestToo - tried your suggestions but no luck. I think there should be a new section of this forum - Completely Clueless - as the Beginners bit is too advanced for me....Oh well, I'll carry on pressing the numlock key manually until I gain a bit more knowledge.
Thanks
Pete

Leon
Posts: 265
Joined: Wed 22 Jun 2005, 21:33

#13 Post by Leon »

Lambo wrote:I think there should be a new section of this forum - Completely Clueless - as the Beginners bit is too advanced for me....Oh well, I'll carry on pressing the numlock key manually until I gain a bit more knowledge.
Click the 'console' icon on the desktop to open Rxvt terminal window and type the command in it:

Code: Select all

numlockx
and press Enter. This command should turn Num Lock on immediately. Otherwise an error message should be displayed in terminal window.

Lambo
Posts: 13
Joined: Thu 28 Jun 2007, 17:10
Location: Lincoln England

#14 Post by Lambo »

Hi Leon
This is what I get:

sh-3.00# numlockx
sh:numlockx: command not found

So thanks but still a problem somewhere. I notice that the downloaded program numlockx1.1 is what I would call a folder, not a file - or am I talking Microsoft here? Where is the "exe" file?
Thanks for help
Pete

Leon
Posts: 265
Joined: Wed 22 Jun 2005, 21:33

#15 Post by Leon »

Lambo wrote:I notice that the downloaded program numlockx1.1 is what I would call a folder, not a file - or am I talking Microsoft here? Where is the "exe" file?
Thanks for help
Pete
Pete,
At first, thank you for your reports. I'm sorry, it was my fault. The file attached to my post was wrong. It was the source package and not the binary file.
I edited my post sent on Fri Jun 29, 2007 8:03 am and attached the right file to it.

Please do this:

1. Delete the file or folder that you downloaded.
2. Download numlockx.bin-1.1.tar.gz file attached to my post sent on Fri Jun 29, 2007 8:03 am.
3. Unpack numlockx.bin-1.1.tar.gz file with >Menu >Utility>XArchive archiver and save 'numlockx' file to:

/usr/X11R6/bin

4. Click the 'console' icon on the desktop to open Rxvt terminal window and type the numlockx command in it:

Code: Select all

numlockx
to verify if the numlockx command works..
5. Click >Menu >Shutdown >Restart X server to verify if the numlockx command works when X server starts.

I'm in some kind the same situation as you. GuestToo is right. I really have to learn how to make dotpup packages.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#16 Post by GuestToo »

it is situations like this that i had in mind when i was thinking about how a dotpup package should work

a newbie refugee from Windows should be able to just download and click the file to install the package, similar to what he would be used to doing in Windows, without needing to understand or think about tar, gunzip, permissions, executable PATH, where to put various files, configuration, etc etc etc

also, the package creator can be reasonably sure that if the package was clicked and installed, and there were no error messages, that the package downloaded properly (the md5sum check in dotpups even guarantees that all the files in the package actually did unzip perfectly) ... so if there are problems, it is not because the package did not download properly

which can save a lot of time posting questions and answers back and forth

Lambo
Posts: 13
Joined: Thu 28 Jun 2007, 17:10
Location: Lincoln England

#17 Post by Lambo »

Hi Leon - YES! - magic! Numlock up and running. Can't thank you enough you guys for your patience and expert advice. I have not only got the dreaded numlock under control, but have learned something about navigating Linux. I shall try delving a bit deeper from now on. Watch out for more dodgy questions!
Thanks again
Pete

User avatar
ravensrest
Posts: 365
Joined: Fri 22 Feb 2008, 16:43
Location: Grants Pass, Oregon

Re: xsetnumlock - set the numlock key

#18 Post by ravensrest »

When I generated an xsetnumlock.pet file from xsetnumlock.pup by unpacking and then using dir2pet, it correctly installs the xsetnumlock file to /usr/local/bin and the xsetnumlock.txt file to /usr/share/doc, but the xsetnumlock.files contains erroneous paths:

this:
/usr/share/do.txt
/usr/local/bi

instead of:
/usr/share/doc/xsetnumlock.txt
/usr/local/bin/setnumlock

Any ideas? Otherwise, if you install it, correct the /root/packages/xsetnumlock.files manually.
Attachments
xsetnumlock.pet
sets numlock at bootup
(2.36 KiB) Downloaded 625 times

Post Reply