문제

I'd like to write a small script that will search for my touchscreen in /dev, and if present, use one xorg.conf file (sudo mv /etc/X11/xorg-touch.conf /etc/X11/xorg.conf), and if it's not present, use a different xorg.conf (sudo mv /etc/X11/xorg-NOtouch.conf /etc/X11/xorg.conf)

I would need the script to run on boot, before x11 reads the xorg file, but after USB is populated. I tried adding some simple mkdir commands to test if things were working when I tried /etc/X11/xinit/xinitrc and a couple other files, but nothing seemed to be called.

Is this possible? Any pointers on where to start? I don't necessarily need the code to do it (although I always like seeing different ways of accomplishing it), but more where to put the code so that it executes at the right time.

Thanks!

올바른 솔루션이 없습니다

다른 팁

You could try placing your script in the /etc/init.d file. For more information check out this guide.

http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html

If you want to be sure that everything is up and running before you execute your script you could add $all to the LSB header, for details check:

https://wiki.debian.org/LSBInitScripts

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top