Page 1 of 1

Xephyr tip: eliminate need for sleep

Posted: Fri Mar 01, 2024 10:22 am
by fatdoguser

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.


Re: Xephyr tip: eliminate need for sleep

Posted: Fri Mar 01, 2024 2:29 pm
by rockedge

Interesting! I have always used Xnest and have not been familiar with Xephyr until now.