Welcome!
Important information
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

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

Current releases
-- MX-18.1 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.3.1 release info here

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

numlockx

Post Reply
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 Regular
Forum Regular
Posts: 131
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.
Dual-boot MX17.1/64 frugal root persistence + Windows 7 on Lenovo Edge72 i5-3470S/12GB and Tosh R950 i5-3340M/8GB
I used to think that good grammar is important. Now I know that good wine is importanter.

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2931
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: 2271
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.
Primary: Dell9010, MX-18, Win7, 120 SSD, WD 232GIB HD, 4GB RAM
Backup :Homebrew64 bit Intel duo core 2 GB RAM, 120 GB Kingston SSD, Seagate1TB.
MX-17.1 64bit. Also MX17, Kubuntu14.04 & Puppy 6.3.

Post Reply

Return to “Software / Configuration”