I see that easy OS (5.7) is using the 'regular' Xephyr ... sleep approach
ec-chroot lines 277-285
Code: Select all
Xephyr :${CNTxephyr} -fullscreen -title "${EXE}" -name "Xephyr${CNTxephyr}" -dpi "$DPI" -nolisten tcp &
#Xephyr :${CNTxephyr} -fullscreen -no-host-grab -title "${EXE}" -name "Xephyr${CNTxephyr}" -dpi "$DPI" -nolisten tcp &
echo "${CNTxephyr} ${EXE}" >> /tmp/easy_containers/xephyr-windows
#wait until ready to use...
CNT=0
while [ ! -S /tmp/.X11-unix/X${CNTxephyr} ];do
sleep 0.1
CNT=$(($CNT+1))
[ $CNT -gt 20 ] && exit 2
done
I've switched over to using xinit ... as indicated in
How to launch Xephyr without sleep-ing
https://unix.stackexchange.com/question ... -sleep-ing
xinit does this job. You can create a file your_xinitrc. Commands in your_xinitrc will be executed after Xephyr is initialized.
xinit your_xinitrc -- /usr/bin/Xephyr :4
The X server to run must be given with an absolute path if it is not X itself. See man xinit for details. After all commands in your_xinitrc are terminated, xinit terminates Xephyr.
Where in my Fatdog Xephyr session I run
Code: Select all
echo ". /etc/profile" > /tmp/my_xinitrc
echo "jwm" >> /tmp/my_xinitrc
xinit /tmp/my_xinitrc -- /usr/bin/Xephyr \
:2180 -ac -br -dpi 144 -glamor -fullscreen
rm /tmp/my_xinitrc
That said my prior code was more crude, just a 4 second wait time allowance for Xephyr to start before running jwm, which was hit and miss. I guess EasyOS code checking every 0.1 seconds for up to 20 seconds is just as good as using xinit, but thought I'd mention it as a point of possible interest.