Numlock on before (and after) login on LXLE 16.04
  • I have a separate number pad on my laptop, and every version of Linux I've run seems to have a different method of activating numlock. As LXLE has become my primary Linux, I figured that I'd tell y'all how I got numlock working the way I wanted it to (all the time, including before login).

    Here's how to get numlock on at boot/before login.

    First, install the numlockx package:
    sudo apt-get install numlockx

    The /etc/lightdm/lightdm.conf file, which is the file you need in order for the below command to work, does not exist in a default installation of LXLE 16.04. So what we have to do is create and edit the file, which can be done in one step using this command:
    sudo pluma /etc/lightdm/lightdm.conf

    Add the following line to the file:
    greeter-setup-script=/usr/bin/numlockx on

    Save, exit, and reboot, and your numlock light should be on at boot.

    Now, in case your numlock turns off after you login, here's what you need to do to turn it back on once you're logged into the system.

    Menu Button => Control Menu => Settings => Default applications for LXSession
    Click on the Autostart button
    In the textbox next to the Add button, type /usr/bin/numlockx on
    Click the Add button
    Close the LXSession configuration window.

    Once I closed that window, my numlock came on. If it doesn't immediately come on, then reboot.

    These steps should turn your numlock on and keep it on all the time in 16.04.
  • Thanks, works on Acer Aspire-57xx, I used both methods 
  • Wait, now I am confused. I thought it worked on the Aspire.

    Now I am working on two old HP dv8000s, not that it should matter?

    Clean install, then update thru Synaptic. Reboot. Get numlockx thru Synaptic. Create /etc/lightdm/lightdm.conf   Save, exit, reboot...

    Several FAILED msg's: "Failed to start Light Display Manager"
    Boot stuck at "A start job is running for Hold until boot process finishes up (xmin ysec / no limit)"

    This happened twice but first time I used apt-get instead of Synaptic for update & numlockx. Guess now I need to figure out how to delete that file from a live session, else re-install 3rd time 2nite.

    I looked in /etc/lightdm folder, and it seems that there are two .conf files "lightdm-gtk-greeter.conf & users.conf --not sure if that is causing conflict. 

    I booted to live session, mounted primary drive, navigated thru GUI to /etc, right-click lightdm folder, open as root, enter pw. deleted lightdm.conf, edited both original .conf files adding the line from OP: {greeter-setup-script=/usr/bin/numlockx on}

    (It is a lot easier to do this thru GUI than mess around with Nautilus, if you are new to using terminal, like myself).

    I can reboot into system after deleting the lightdm.conf, but numlock still off at boot. Added the line from OP to Deafult Apps for LX >Autostart "/usr/bin/numlockx on"

    Reboot and no numslock. I confirmed thru GUI that there is an executable in /usr/bin called numlockx and if numslock is off & I click numlockx.exe and then execute, the light turns on...

    so not sure what I am missing or why I can't boot when following OP and create lightdm.conf in /etc/lightdm
     
This discussion has been closed.
All Threads