Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: GNUser on September 13, 2019, 09:40:37 AM

Title: sometimes my script in ~/X.d/ does not get run
Post by: GNUser 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.
Title: Re: sometimes my script in ~/X.d/ does not get run
Post by: GNUser 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.


Title: Re: sometimes my script in ~/X.d/ does not get run
Post by: jazzbiker 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?
Title: Re: sometimes my script in ~/X.d/ does not get run
Post by: GNUser 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.