neat-donk/xpra-run.sh

15 lines
451 B
Bash
Raw Permalink Normal View History

2021-04-09 15:06:55 -04:00
#! /bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
2021-04-24 06:00:28 -04:00
#ARGS=("--lua=$SCRIPT_DIR/neat-donk.lua")
ARGS=()
PORT=5309
(
while ! nc -z localhost $PORT ; do
sleep 0.1
done
xdg-open http://127.0.0.1:$PORT
) &
2021-04-24 06:00:28 -04:00
xpra start --bind-tcp=127.0.0.1:$PORT --html=on \
2021-05-01 22:03:09 -04:00
--start-child="/etc/alternatives/x-terminal-emulator -e 'lsnes ${ARGS[*]}'" \
2021-05-01 22:04:23 -04:00
--exit-with-child=yes --start-new-commands=no --daemon=no