0

I put the the following in /etc/rc.local, to enable the Scroll Lock LED on my keyboard - it doesn't seem to take effect:

#!/bin/bash

enable scroll lock LED

xmodmap -e 'add mod3 = Scroll_Lock'

exit 0

I did do sudo chmod a+x /etc/rc.local to make it executable, and the script seems to work OK (makes the Scroll Lock LED work) when I execute /etc/rc.local from the terminal.

I know there are other ways to get scripts to run on boot, but I want to understand why this doesn't work.

1 Answers1

1

This command won't work for two reasons:

  1. You need to use full path to xmodmap.

  2. The command needs a user session, that is not started yet when rc.local is executed.

You an add the command to "Startup Applications".

Pilot6
  • 92,041