commit c7740ea2debf35723b5728ebbd78d2cab0296cdf
parent b9382b8115c77a746cfef4fe1566e26082dbcf5a
Author: ccx <ccx@te2000.cz>
Date: Sun, 7 Apr 2024 17:39:58 +0000
Start xpra container along with xsession
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/bin/zshaskpass_lock b/bin/zshaskpass_lock
@@ -28,6 +28,7 @@ if [[ $TTY == /dev/tty[1234] ]]; then
fi
die_color=%F{red}
+warn_color=%F{yellow}
prompt_end=%f
die() {
@@ -42,6 +43,7 @@ if [[ -n $X ]]; then
typeset -g plumber_fifo terminal_exec_socket terminal_el x_container_service x_container_tmpfs
x_container_tmpfs=/run/containers/xsession.$X.$USER
x_container_service=/run/service/container.xsession.$X.$USER
+ xpra_container_service=/run/service/container.xpra.$USER
plumber_fifo=$x_container_tmpfs/run/plumber_fifo
terminal_exec_socket=$x_container_tmpfs/run/exec/urxvt
terminal_el="redirfd -w 1 /dev/null redirfd -w 2 /dev/null s6-sudo ${(qqq)terminal_exec_socket:A}"
@@ -139,6 +141,11 @@ cmd() {
printf '%s\n' "${(%)die_color}Error:${(%)prompt_end} ${(qqq)x_container_service} already running"
break
fi
+ if run s6-svc -wU -T 8000 -o $xpra_container_service; then
+ run s6-svstat $xpra_container_service
+ else
+ printf '%s\n' "${(%)warn_color}Warning:${(%)prompt_end} ${(qqq)xpra_container_service} failed to start"
+ fi
logincap X\ $X || break
if run s6-svc -wU -T 8000 -o $x_container_service; then
run s6-svstat $x_container_service