Force [NumLock] On Boot Of RetroPie?
-
Hi,
I've got RetroPie running on a RPi2.
I need to have [NumLock] turned on when the RetroPie OS boots.
How can I easily configure RetroPie to have [NumLock] on when OS boots?
Thanks!Jesse
-
/etc/kbd/config
uncomment #LEDS=+num
-
@senkun said in Force [NumLock] On Boot Of RetroPie?:
/etc/kbd/config
uncomment #LEDS=+num
Hi,
Thanks for the reply.
How can I edit "/etc/kbd/config" from within RetroPie?
All my computers run Windows 10 so I would need to do above from within RetroPie.
Thanks!Jesse
-
quit emulationstation (start brings up the menu), now you should be in command line
type
sudo nano /etc/kbd/config
scroll down find
#LEDS=+num
it's the second last entry, then delete the hash and make itLEDS=+num
press ctrl+x then y then enter
sudo reboot
-
This is an old thread, but I needed to figure out how to do this with Stretch. Below is what I found, but I have not tried it yet:
To turn Numlock on at startup (on Raspbian Stretch) :
sudo apt-get install numlockxsudo nano /usr/share/lightdm/lightdm.conf.d/01_debian.conf
At the end, addgreeter-setup-script=/usr/bin/numlockx on
Save. Reboot. Yer Done. -
@challenger2010 said in Force [NumLock] On Boot Of RetroPie?:
greeter-setup-script=/usr/bin/numlockx on
Save. Reboot. Yer Done.Not really, RetroPie doesn't come with an X environment, what you posted works only when starting an X session from LightDM.
-
@mitu @challenger2010 If you are booting into the command line interface then this should work.
Optionally Boot with Numlock On To aid use of the menu, add a line of code to the keyboard configuration file to enable Numlock in the terminal when the Pi first boots. Open the config file: sudo nano /etc/kbd/config Locate and uncomment the following entry by removing the # from the start of the line (or create the line if it is not present), then save the changes: LEDS=+num Please note that the Raspbian desktop will still default to switching Numlock off; whilst there is a utility available, numlockx, to address this, it causes (harmless) errors to be displayed in the console.
This is an extract from this tutorial https://retroresolution.com/2016/04/19/multipurpose-raspberry-pi-part-2-adding-a-menu-to-access-retropie-kodi-and-the-raspbian-desktop/#li_numlock_on
EDIT* So... like everybody above the recent post said, then.
-
The etc/kbd/config is empty with Strech.
-
@challenger2010 Well, yes, that folder is no longer present. Use the
setleds
command to toggle the Num/Caps/ScrollLock on/off, which you can add to the your~/.bashrc
. -
@mitu I'm out of date. What's new?
I've never personally used it but it shows how out of touch I am.
Yes, it is gone. -
that folder
From now on I'm just going to say
directory
.
There is no such thing as a "folder" in Linux.
It might look like one but it's not. -
Sooo....this didn’t work for Stretch :(. If anyone knows how, please help me out. When I am in any of the Retropie menu screens, pushing numlock on the keyboard doesn’t work either.
Thanks :)
-
@challenger2010 As I said, earlier, use the
setleds
to toggle the numlock. Add the lines below to/etc/rc.local
:INITTY=/dev/tty[1-8] for tty in $INITTY; do setleds -D +num < $tty done
-
Thanks, that worked...but not for the emulator I am using. lr-o2em will not start a game with keypad numbers, only keyboard numbers. Strange, I hit F4 and tried the keypad and yes it produces numbers now. No clue why this is happening.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.