diff --git a/appvm-xpra b/appvm-xpra index a6afe06..a514b64 100755 --- a/appvm-xpra +++ b/appvm-xpra @@ -5,19 +5,17 @@ xpra_host="$1" xpra_display=10 conn_str="ssh/${xpra_host}/${xpra_display}" -# try to determine if we need to attach or not -#xpra info "$conn_str" 2>&1 >/dev/null && attach=1 -ssh "${xpra_host}" :${xpra_display} 2>&1 >/dev/null && attach=1 +systemctl --user start appvm-ssh@${xpra_host}.service -if [[ $attach -eq 1 ]]; then - xpra attach "${conn_str}" \ - --encoding=rgb \ - --title="@title@ on ${xpra_host}" \ - --tray=no \ - --notifications=no \ - --username=user \ - --desktop-scaling=no -else +xpra attach "${conn_str}" \ + --encoding=rgb \ + --title="@title@ on ${xpra_host}" \ + --tray=no \ + --notifications=no \ + --username=user \ + --desktop-scaling=no + +if [[ $? != 0 ]]; then shift 1 app="${@:-firefox}" diff --git a/appvm-xpra-torbrowser b/appvm-xpra-torbrowser index 7a48fa4..00aee30 100755 --- a/appvm-xpra-torbrowser +++ b/appvm-xpra-torbrowser @@ -5,18 +5,17 @@ xpra_host="$1" conn_str="ssh/${xpra_host}/10" scale_factor=${GDK_SCALE:-1} -# try to determine if we need to attach or not -xpra info "$conn_str" 2>&1 >/dev/null && attach=1 +systemctl --user start appvm-ssh@${xpra_host}.service -if [[ $attach -eq 1 ]]; then - xpra attach "${conn_str}" \ - --encoding=rgb \ - --title="@title@ on ${xpra_host}" \ - --tray=no \ - --notifications=no \ - --username=user \ - --desktop-scaling=${scale_factor} -else +xpra attach "${conn_str}" \ + --encoding=rgb \ + --title="@title@ on ${xpra_host}" \ + --tray=no \ + --notifications=no \ + --username=user \ + --desktop-scaling=${scale_factor} + +if [[ $? != 0 ]]; then app="env TOR_CONTROL_PORT=9151 sandboxed-tor-browser" xpra start "${conn_str}" \ --encoding=rgb \