If you use/start Xephyr then typically that is followed by a sleep for some guesstimated time before you load jwm or whatever into that. A bit hit and miss as to whether the sleep time is too short, or delayed waiting time if the sleep is too long
Xephyr :1 -ac -br -dpi 96 -glamor -fullscreen &
sleep 3 # is 3 seconds too short, or too long ?
DISPLAY=:1 jwm
A better choice is the following
Code: Select all
#!/bin/sh
echo ". /etc/profile" > /tmp/my_xinitrc
echo "jwm" >> /tmp/my_xinitrc
xinit /tmp/my_xinitrc -- /usr/bin/Xephyr :1 -ac -br -dpi 96 -glamor -fullscreen
as that eliminates any need for 'sleep' time guesswork.