1

i have some code like this:

#!bin/bash
Xephyr :2 -fullscreen
DISPLAY=:2 startplasma-x11

but Xephyr wont stop until you end it with ctrl+c is there anyway to execute Xephyr :2 -fullscreen and then, after a one second delay, run DISPLAY=:2 startplasma-x11 while Xephyr :2 -fullscreen is still running???

1 Answers1

3

You can do it like this:

#!bin/bash
Xephyr :2 -fullscreen & disown
DISPLAY=:2 startplasma-x11

Mind that the & will echo a job number. If you want you can add a redirect to > /dev/null so it does not show.

The disown will keep the process running even after you exit the shell. Otherwise it will get killed.

Rinzwind
  • 299,756