Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

numlockx

Post Reply
Message
Author
Ray66
Forum Novice
Forum  Novice
Posts: 9
Joined: Sun Aug 12, 2018 8:19 pm

numlockx

#1 Post by Ray66 » Sun Aug 12, 2018 8:31 pm

mx linux 17 horizon How to activate numlockx to start before login

User avatar
thomasl
Forum Novice
Forum  Novice
Posts: 89
Joined: Sun Feb 04, 2018 10:26 am

Re: numlockx

#2 Post by thomasl » Mon Aug 13, 2018 5:12 am

Have you checked Settings >> Keyboard >> Behavior >> Restore num lock state on startup? Or you could put a numlockx call into Settings >> Session and Startup >> Application Autostart.

And to make sure that Numlock stays locked I have put this small script on the Numlock key in Settings >> Keyboard >> Application Shortcuts:

Code: Select all

#!/bin/bash
numlockx off
sleep 1
numlockx on
Looks weird to turn Numlock off first but otherwise it would not reliably turn back on. Also some sort of delay between the calls to numlockx seems to be necessary.

EDIT: Oops... overlooked the login bit.
Last edited by thomasl on Tue Aug 14, 2018 6:16 am, edited 1 time in total.
MX17.1/64 frugal plus root persistence, dual-boot w/ Windows 7 on Lenovo Edge72 i5-3470S/12GB and Tosh R950 i5-3340M/8GB
“What do you think of Western civilization?” “I think it would be a good idea.”

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1427
Joined: Wed Apr 11, 2018 5:09 pm

Re: numlockx

#3 Post by fehlix » Mon Aug 13, 2018 4:05 pm

Ray66 wrote:
Sun Aug 12, 2018 8:31 pm
mx linux 17 horizon How to activate numlockx to start before login
Short answer:
You can run this one-liner from the terminal commandline...

Code: Select all

sudo bash -c 'command -v numlockx >&- || apt-get update && apt-get install numlockx; GSS="greeter-setup-script="; sed -i.pre-numlock -E "/^#\s*$GSS/s:^#\s*($GSS).*:\1/usr/bin/numlockx on:" /etc/lightdm/lightdm.conf'
Longer answser:
You can read within this forum here: Want Num Lock Light On Before Login Screen

@thomasl's answer above is about numlock after session-login .
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Ray66
Forum Novice
Forum  Novice
Posts: 9
Joined: Sun Aug 12, 2018 8:19 pm

Re: numlockx

#4 Post by Ray66 » Mon Aug 13, 2018 4:35 pm

Solved short answer worked
Thanks to all for the help

User avatar
Gordon Cooper
Forum Guide
Forum Guide
Posts: 1989
Joined: Mon Nov 21, 2011 5:50 pm

Re: numlockx

#5 Post by Gordon Cooper » Mon Aug 13, 2018 4:47 pm

Welcomed to the forum Ray. Could you please go back to your first query and add [Solved ] to the Subject heading. That's one of the conventions of this group.
Homebrew64 bit Intel duo core 2 GB RAM, 120 GB Kingston SSD, Seagate1TB.
Primary OS : MX-17.1 64bit. Also MX17, Kubuntu14.04 & Puppy 6.3.
Dell9010, MX-17.1, Win7

Post Reply

Return to “Software / Configuration”