Linux-CapsLock-Delay-Fixer icon indicating copy to clipboard operation
Linux-CapsLock-Delay-Fixer copied to clipboard

Adding to startup doesn't work permanently

Open wiseboar-9 opened this issue 4 years ago • 2 comments

Hi!

First of all: THANK YOU for the script. This bug has been driving me nuts for years and I can't fathom why this isn't getting fixed. The number of times I've read *JuSt UsE sHiFt iNsTeAd" boggles my mind.

In any case, the script works but I can't get it to work permanently. I'm running on Ubuntu 20.04. and added the following command to the Startup Applications: bash -ic "sh /home/<REDACTED>/Linux-CapsLock-Delay-Fixer/bootstrap.sh" When I type in this exact command in the console, it performs the fix flawlessly.

From what I've seen any time the computer goes to sleep, the changes are revoked. I've tried to add it to pm-utils/sleep.d to get it to run on every wake-up, but couldn't get this to work either. From the repo-directory:

sudo cp ./bootstrap.sh /usr/lib/pm-utils/sleep.d/9999CapsDelayFix.sh
sudo chmod +x /usr/lib/pm-utils/sleep.d/9999CapsDelayFix.sh

I'm not sure what I'm missing.

wiseboar-9 avatar Aug 06 '21 06:08 wiseboar-9

What I tried just now, for example, always using this command: bash -ic "sh /home/<REDACTED>/Linux-CapsLock-Delay-Fixer/bootstrap.sh"

  • add command to .profile, so it runs on every login
  • add command to /lib/systemd/system-sleep/hdparm so it runs on every wake-up

for now I added it to the end of .zshrc so it runs every time I start zsh. It's a workaround but one step better than running the command manually every damn login.

wiseboar-9 avatar Aug 12 '21 05:08 wiseboar-9

I set up a cronjob yesterday to finally get rid of this issue for me It just runs the fix script every 10 minutes and I haven't noticed it since. Overkill? Yes, for sure. But I couldn't care less, at least it fixes this damn issue. I'm not sure if all the steps are necessary, but here it goes for posterity's sake:

  • install kdeadmin (probably not necessary) sudo apt-get install -y kdeadmin

  • activate cronjobs (probably necessary) sudo systemctl enable cron

  • edit cronjobs (definitely necessary) crontab -e

  • add the following line so the script is called every 10m */10 * * * * bash -ic "sh /home/<REDACTED_USERNAME>/Linux-CapsLock-Delay-Fixer/bootstrap.sh" > /dev/null 2>&1

wiseboar-9 avatar Sep 28 '21 07:09 wiseboar-9