WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sometimes my script in ~/X.d/ does not get run  (Read 195 times)

Offline GNUser

  • Full Member
  • ***
  • Posts: 136
sometimes my script in ~/X.d/ does not get run
« on: September 13, 2019, 09:40:37 AM »
I have a single script in ~/X.d/ called "startup-applications" that runs some miscellaneous stuff I need. Sometimes after booting I notice that none of the jobs in that script got done, causing me to have to reboot.

Because it only happens about 1 out of every 10 boots, I'm guessing it's an unusual race condition that only happens sometimes. Anything I can do to make sure the script is successfully launched at every boot? Maybe I just need to put a sleep 1 somewhere?

Thanks for any tips.

Offline GNUser

  • Full Member
  • ***
  • Posts: 136
Re: sometimes my script in ~/X.d/ does not get run
« Reply #1 on: September 13, 2019, 09:55:59 AM »
P.S. My ~/.X.d/ directory is not persistent: It is restored from mydata.tgz at boot (i.e., it is one of the directories in my /opt/.filetool.lst)

It seems that whatever runs the scripts in ~/.X.d/ sometimes tries to do so before mydata.tgz has been completely restored.



Offline jazzbiker

  • Full Member
  • ***
  • Posts: 123
Re: sometimes my script in ~/X.d/ does not get run
« Reply #2 on: September 13, 2019, 10:44:41 AM »
Hi, GNUser!
As i can understand, you have removed your $HOME from .filetool.lst, and use separate entries for your $HOME/* files and directories. Does only .X.d disappear, or other files and directories play the same game?

Offline GNUser

  • Full Member
  • ***
  • Posts: 136
Re: sometimes my script in ~/X.d/ does not get run
« Reply #3 on: September 13, 2019, 11:00:09 AM »
Hi, jazzbiker. Thanks for the input. Correct, $HOME is not in .filetool.lst, just selected subdirectories of $HOME. 

Actually, I've refined my understanding of the problem: ~/.X.d/startup-scripts is there, and most of the jobs it lists get run. The one that tends to fail is xbindkeys & which is important to me because it enables all of my keyboard shortcuts.

I'm going to assume that xbindkeys sometimes butts heads with something else at boot. Will adding sleep 1 before it and see if it helps.