This seems like a very basic thing to do, and I have even followed a few tutorials to get a simple script to be run at startup, but to no avail.
Here is what my script, which is in the root directory, looks like:
#! /bin/bash xmodmap ~/.xmodmaprc echo 0 | sudo tee /sys/module/hid_apple/parameters/iso_layout
The script basically changes my keymap, by switching control and command keys (as I'm on a macbook). It has been
chmod'ed to be executable, so that it executes successfully when I do
./keymap_fix.sh or I do
I have followed these simple tutorials https://www.cyberciti.biz/tips/linux-how-to-run-a-command-when-boots-up.html and https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/
So, I have copied the shell script to
/etc/init.d and did this also
update-rc.d keymap_fix.sh defaults 100
I even tried setting up crontab in a similar way, by adding
@reboot /root/keymap_fix.sh , but nothing works! Whenever I reboot, my keymap remains the same. :/
Would be grateful if someone could help me out here, thanks!