Auto num lock xfce

xfce num lock on at boot - In the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml , make sure the following values are set to true:

<property name="Numlock" type="bool" value="true"/>
<property name="RestoreNumlock" type="bool" value="true"/>

See how that goes. (back up the file just in case)

2 Likes

thanks for reply,
in this directory there is no file called keyboards.xml
but have these:

keyboard-layout.xml
xfce4-keyboard-shortcuts.xml

and their contents not similar above .

hmmmmm
Don’t know what’s going on. The file was there for me.

<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboards" version="1.0">
  <property name="Default" type="empty">
   <property name="Numlock" type="bool" value="true"/>
    <property name="RestoreNumlock" type="bool" value="true"/>
  </property>
</channel>

Maybe it was made after changing some settings in the keyboard.
Go to settings/keyboard & make sure restore num lock state at startup is ticked. Reboot. Then see if the file is there.

2 Likes

was ticked by default,
so disabled and reboot then that file appeared,
after that ticked restore num lock state at startup again and reboot,
after reboot auto num lock didn’t work , then checked keyboards.xml ,
missed this line : property name="Numlock" type="bool" value="true", added and reboot again,
but auto num lock didn’t worked again even notifier didn’t shows it!

My two Xfce, keyboards.xml look

<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboards" version="1.0">
  <property name="Default" type="empty">
    <property name="Numlock" type="bool" value="true"/>
  </property>
</channel>

and auto numlock work

???

1 Like

i mean auto num lock ,
replace contents by yours but failed

Confirmed, my numlock key also isn’t on by default and keyboards.xml file is also missing the numlock option:

<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboards" version="1.0">
  <property name="Default" type="empty">
    <property name="RestoreNumlock" type="bool" value="true"/>
  </property>
</channel>

I installed from the new 4.13 xfce iso, I’m assuming @Hipster and @SGS simply upgraded from the previous xfce packages? Perhaps numlockx wasn’t integrated the in x session properly in the new iso? This maybe related to various nonsensical accesibility notifications I’ve still been getting on every reboot as I’ve reported earlier?

@homfar, when did you last install xfce and which iso was it?

That line has more to it.

<property name="Numlock" type="bool" value="true"/>
    <property name="RestoreNumlock" type="bool" value="true"/>

Don’t forget the < & />

1 Like

I have a fresh install, manjaro xfce 18.0.2. Installed a week or two ago. My num lock also wasn’t working but by doing the above I got it working.

whole contents :

<?xml version="1.0" encoding="UTF-8"?>

<channel name="keyboards" version="1.0">
  <property name="Default" type="empty">
    <property name="Numlock" type="bool" value="true"/>
    <property name="RestoreNumlock" type="bool" value="true"/>
  </property>
</channel>

its my iso name :
manjaro-xfce-18.0.1-stable-x86_64.iso

Ok, I’ll modify mine now exactly to yours, reboot, and see if it works for me…

1 Like

Have you made sure numlock is on before rebooting? Have to ask. :grimacing:

1 Like

Looks like the change worked for me :tada: …and no accessibility notifications have come up yet either.:slightly_frowning_face: Curious why this property was omitted in the new iso…

2 Likes

yeah i’m sure

A lot of people use laptops and not all laptops comes with a numeric keypad.

Presetting such a property in either way would cause a lot of debate.

It is a minor thing - I know - but it needs to be done by the user not maintainer.

In Openbox - which I maintain on a desktop computer - I have a commented line in the openbox/autostart file

### enable numlock
### uncomment next line
# sleep 0.5; numlockx &

The numlockxpackage is installed but the user needs to change the line to it activated on login.

To check that all is as it should be run this>

xfconf-query -c keyboards -lv

It should come back with both of these>
/Default/Numlock true
/Default/RestoreNumlock true

If it is it should be working. :thinking:

1 Like

it’s correct ,
numlock notifier turns on on keyboard but didn’t work and need press num lock button .

what have to do exactly?!

The command

~ >>> numlockx --help
NumLockX 1.2
(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

As on is default this command will activate your numeric keypad

numlockx

The on argument is optional but will do the same

numlockx on

So in Openbox autostart file you remove the # so the line looks like this

sleep 0.5; numlockx &
1 Like

Forum kindly sponsored by