1

I have a script that depends on X server is started. So in the script, I check if X is started with the while loop below:

while xset q; do
  sleep 1
done

Everything works well if I run this script manually. But if it's started from rc.local during system start, it sticks in the loop.

How to check if X is started in the script under rc.local?

kadralievr
  • 11
  • 1
  • FYI: This kind of keep-alive listener is not necessary when using the systemd tools (instead of rc.local) already on your system. – user535733 Mar 10 '20 at 19:59

0 Answers0