diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-19 15:54:24 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-19 15:54:24 (GMT) |
commit | a3de3e6ad1aae1f7bb2c718eebd1d635e6717916 (patch) | |
tree | 2d6ac03fb0ff7ea01b7a137387da8a2f52a746cd /commands/run | |
parent | a96a6091c87492f56fe3f1169bf7608c2fa3d05c (diff) |
Run xephyr in a custom window
Xephyr doesn't work very well with multiple outputs. This should
allow us to customize our behavior in that case.
Diffstat (limited to 'commands/run')
-rwxr-xr-x | commands/run | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/commands/run b/commands/run index 70f9611..875d2a7 100755 --- a/commands/run +++ b/commands/run @@ -32,13 +32,17 @@ else screen_dpi=`$helpersdir/get-screen-dpi` xephyr_options="-dpi $screen_dpi" - if [ -z $RUN_IN_WINDOW ]; then - xephyr_options="$xephyr_options -fullscreen" - fi + xidfile=`mktemp -t sugar-xephyr-xid-XXXXXX` + $helpersdir/xephyr-window $RESOLUTION > $xidfile & + xephyrwindowpid=$! - if [ ! -z $RESOLUTION ]; then - xephyr_options="$xephyr_options -screen $RESOLUTION" - fi + while [ ! -s $xidfile ] + do + sleep 1 + done + xephyr_options="$xephyr_options -parent `cat $xidfile`" xinit $helpersdir/xinitrc -- /usr/bin/Xephyr $display $xephyr_options + + kill $xephyrwindowpid fi |