#!/bin/bash # test with sudo runuser -u root bash {script_path} set -x name=$(whoami) echo "start $0 with $name" exec="/usr/share/uosbrowser/uosbrowser" exec1=$(which browser) exec2=$(which uos-browser) if [ "${exec1}" != "" ]; then exec="/usr/share/browser/browser" fi echo "run $exec" # get env pid=$(pgrep startdde) # source env from $pid # shellcheck disable=SC1090 . <(xargs -0 bash -c 'printf "export %q\n" "$@"' --