Files
docker-etqw/server/openurl.sh
santic-zombie 74d595e003 Init Commit
2026-02-23 14:02:52 +03:00

30 lines
556 B
Bash
Executable File

#!/bin/sh
# how to open URLs in the default web browser,
# across distros, through KDE/GNOME/whatever settings, etc.
# - check a BROWSER env var
# - try x-www-browser (Debian and derivates)
# - check a few common browser names
# feel free to tweak this to your needs
if [ x$BROWSER != x ]
then
$BROWSER "$1"
elif [ x`which x-www-browser` != x ]
then
x-www-browser "$1"
elif [ x`which firefox` != x ]
then
firefox "$1"
elif [ x`which mozilla` != x ]
then
mozilla "$1"
elif [ x`which opera` != x ]
then
opera "$1"
else
xterm -e lynx "$1"
fi