executable_firefox 438 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. set -o errexit -o pipefail
  3. PULSE_SERVER="${PULSE_SERVER:-192.168.0.137}"
  4. if [[ -n $VNCDESKTOP ]]
  5. then
  6. if [[ $(ss --no-header --options state connected --options sport 5902) == *"$PULSE_SERVER"* ]] \
  7. || [[ $(ss --no-header --options state connected --options sport 5903) == *"$PULSE_SERVER"* ]]
  8. then
  9. export PULSE_SERVER
  10. fi
  11. fi
  12. exec -a "$0" "${HOME}/.guix-profile/bin/firefox" "$@"