Regarding Xephyr

Riza Dindir riza.dindir at gmail.com
Mon Jul 3 09:41:25 UTC 2023


Hello,

I thought that it will set the background color, and this will be it.

I added an xterm in there like so (this is in a file run.sh and I am
running this shell script with (DISPLAY=:1 sh run.sh)

xsetroot -solid "#006060"
xterm -geometry +20+40

With this the background color turns to a blue then the background
goes black. But the xterm is seen, and if I exit xterm, the session
ends.

But if I do this (notice the ampersand at the end of the xsetroot line)

xsetroot -solid "#006060" &
xterm -geometry +20+40

the background color stays, and is not changed to black as it is the
case with the above example.

Regards,
Riza

On Mon, Jul 3, 2023 at 11:39 AM Carsten Haitzler <raster at rasterman.com> wrote:
>
> On Sat, 1 Jul 2023 13:08:54 +0300 Riza Dindir <riza.dindir at gmail.com> said:
>
> > Hello All,
> >
> > I want to use Xephyr to test out an x application.
> >
> > For starters I wanted to learn how to use Xephyr. Here is what I did.
> >
> > I started xephyr on display 1 like so (Xephyr :1 -screen 800x600). The
> > window opened where the background is black. Then ran (DISPLAY=:1
> > xsetroot -solid white) to change the background color. But when I set
> > the background to white, the background does not stay white. It
> > changes to black within 1 second.
> >
> > Is this default behavior? Why can't I set the background color on a
> > Xephyr window?
>
> because xsetroot is the only x client. it connects, sets root window bg color
> to white, then disconnects. now the xserver has zero clients left. it resets
> itself as from it's point of view the session ended. you can either ensure
> another client is always running (almost all the time this is a window manager
> at a minimum) until the session ends, or you can try the -noreset option to
> Xephyr
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> Carsten Haitzler - raster at rasterman.com
>


More information about the xorg mailing list