Tiny Core Base > Raspberry Pi
failed in wait for X piCore16.0 on Raspi2,3,4 and 5
MrPorcine:
I use X without a display manager as well. Here is how I start up my app (dviii_m)
--- Code: ---#wait for framebuffer
Timeout=0
while [ $Timeout -lt 40 ] ; do
[ -c /dev/fb0 ] && break
Timeout=$(($Timeout + 1 ))
sleep 0.25
done
export DISPLAY=":0.0"
/usr/local/bin/Xorg -retro -s 0 vt07 &
sleep 2
/opt/DynaViewIII/bin/dviii_m /dev/ttyAMA0 &>/opt/dviii.log &
--- End code ---
X takes a while to start up, I have to use the sleep command to make sure it's ready. I've used
--- Code: ---/usr/local/bin/startx /opt/DynaViewIII/bin/dviii_m /dev/ttyAMA0 -- -retro -s 0 vt07
--- End code ---
And it sometimes works. :(
This script is run in the init process, so everything is as root. It works on a pi 3 and pi 4, I don't know about others.
beerstein:
Thank you mrporcine:
I do not understand your response.
How does your script look like?
What is the name of the script ?
Where does the script go within the file system?
BTW: I switched to piCore 15.0..0 and here I can install a GUI using the TC.tcz
I have no idea what the problem with piCore 16.0.0 might be.
MrPorcine:
I should have said before that I am using a Raspberry Pi display (the original, not the Display 2).
A startup script would normally be in /etc/init.d and have a link in /etc/rc3.d. In my case I keep all my private scripts in /opt, so the chain is like this:
/etc/rc3.d/S80startdv -> /etc/init.d/startdv -> /opt/startdv
where each file is a symbolic link to the next.
The actual startdv is as follows
--- Code: --- #!/bin/bash
export DISPLAY=":0.0"
Xorg -retro -s 0 vt07 &
sleep 2
/opt/DynaViewIII/bin/dviii_m /dev/ttyAMA0 >/opt/dviii.log 2>&1 &
--- End code ---
This is a real shortcut and does not follow the normal guidelines for startup scripts in /etc/init.d. You might want to look at other scripts in init.d and follow their pattern. A more normal way of starting an X11 app would be:
--- Code: ---startx /opt/DynaViewIII/bin/dviii_m /dev/ttyAMA0 >/opt/dviii.log 2>&1 -- -retro -s 0 vt07 &
--- End code ---
You need the ampersand ("&") as startx normally does not return until the app quits. As I mentioned before, startx doesn't always work for me. I have another system where I have using a Display 2 and using xrandr to rotate it. In this case startx works but calling Xorg directly doesn't rotate the screen. So YMMV.
Navigation
[0] Message Index
[*] Previous page
Go to full version