#!/bin/bash #exec 2>>/tmp/log date >&2 dir1= if ! test "$XDG_RUNTIME_DIR" then dir1=`mktemp -d` export XDG_RUNTIME_DIR=$dir1 fi file1=`mktemp` file2=`mktemp` cat >$file1 <<. [shell] client=$file2 . chmod u+x $file2 args= wargs= while test $# -gt 0 do case "$1" in -keeptty | -novtswitch) ;; vt*) tmp="$1" tmp="${tmp#vt}" wargs="$wargs --tty=$tmp" ;; -seat) wargs="$wargs --seat=$2" args="$args $1" ;; *) args="$args $(printf %q "$1")" esac shift done cat >$file2 <<. #!/bin/sh Xwayland $args . echo wargs: "$wargs" >&2 echo args: "$args" >&2 weston -c$file1 $wargs rm -f $file1 $file2 test "$dir1" && rmdir $dir1