On Wednesday, 28 June 2017 0:20:43 ACST Paul Groves wrote:
[...] put them in ~/.xmodmap and they will be read when <user> logs in, iiuc.
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
Anyway as I said If found the Launch keycodes which work fine so it solves that problem but I need to run the script with all the setkeycode commands at boot
I tried the usual /etc/init.d /etc/init.d/rc.local /etc/rc.local
A few places online say ubuntu no longer uses rc.local ans uses /etc/rc#.d where # is the runlevel, So i ran the command runlevel which told me normal boot is runlevel 5
So I put my script in /etc/rc5.d and gave it execute permissions, reboot and it didn't run :(
Where on earth am I supposed to put this script to run at boot? If I drop to tty2 and run it manually it works but if I run it under X or from cron it cannot change key maps.
You don’t put scripts in the rcX.d directories - put them in /etc/init.d, then (on Ubuntu) use update-rc.d to create the symlinks in the appropriate rcX.d directories. You’ll need to have all the correct headers in the file (required-start, required-stop, runlevels etc), so look at existing init.d scripts and use them as a template. Bear in mind that debian/Ubuntu has now moved to systemd, and sysvinit is now deprecated (although lots of packages still use init scripts). Instead of writing an init script, you could write a systemd unit file and have systemd execute the script. The final result should be the same, but you’re “future proofing” it by not relying on a deprecated subsystem. HTH. Rodney. -- ============================================================== Rodney Baker rodney@jeremiah31-10.net ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org