Xephyr tip: eliminate need for sleep

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
fatdoguser
Posts: 175
Joined: Sat Aug 05, 2023 10:54 am
Has thanked: 22 times
Been thanked: 79 times

Xephyr tip: eliminate need for sleep

Post 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.

User avatar
rockedge
Site Admin
Posts: 5714
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1994 times
Been thanked: 2097 times
Contact:

Re: Xephyr tip: eliminate need for sleep

Post by rockedge »

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

Post Reply

Return to “Software”