mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2025-06-20 09:37:55 +02:00
KASM-1550 Better container restarts.
This commit is contained in:
parent
8d5a70eb95
commit
4316cdec01
@ -1,32 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="brave-browser"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="brave"
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="--start-maximized"
|
DEFAULT_ARGS="--start-maximized"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x brave > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
brave-browser $ARGS $URL
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,30 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="google-chrome"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="chrome"
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="--start-maximized"
|
DEFAULT_ARGS="--start-maximized"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x chrome > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
google-chrome $ARGS $URL
|
set +e
|
||||||
|
$START_COMMAND $ARGS $URL
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,30 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="chromium-browser"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="chromium"
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="--start-maximized"
|
DEFAULT_ARGS="--start-maximized"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x chromium > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
chromium-browser $ARGS $URL
|
set +e
|
||||||
|
$START_COMMAND $ARGS $URL
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
||||||
|
@ -1,30 +1,82 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/usr/share/discord/Discord"
|
||||||
|
PGREP="Discord"
|
||||||
|
MAXIMUS="false"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
# Process non-option arguments.
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
for arg; do
|
||||||
echo "custom_startup already running!"
|
echo "arg! $arg"
|
||||||
exit 1
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x Discord > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/usr/share/discord/Discord $ARGS &
|
$START_COMMAND $ARGS $URL &
|
||||||
set -e
|
set -e
|
||||||
maximus &
|
maximus &
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,5 +1,82 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
sleep 3
|
set -ex
|
||||||
xfce4-terminal -e "/usr/games/chocolate-doom ${APP_ARGS}"
|
START_COMMAND="/usr/games/chocolate-doom"
|
||||||
|
PGREP="chocolate-doom"
|
||||||
|
DEFAULT_ARGS=""
|
||||||
|
MAXIMUS="false"
|
||||||
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
|
then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
set +e
|
||||||
|
source $STARTUPDIR/generate_container_user
|
||||||
|
$START_COMMAND $ARGS $URL &
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
|
fi
|
||||||
|
@ -1,33 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="microsoft-edge"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="msedge"
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="--start-maximized"
|
DEFAULT_ARGS="--start-maximized"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
while [[ $1 != -- ]]; do
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
case $1 in
|
||||||
echo "custom_startup already running!"
|
-g|--go) GO='true'; shift 1;;
|
||||||
exit 1
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
while true
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
do
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
if ! pgrep -x msedge > /dev/null
|
if [ -n "$URL" ] ; then
|
||||||
then
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
microsoft-edge $ARGS $URL
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
set -e
|
set -e
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
|
then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $URL
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,30 +1,76 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="firefox"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="firefox"
|
||||||
URL=$1
|
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="-width ${VNC_RESOLUTION/x*/} -height ${VNC_RESOLUTION/*x/}"
|
DEFAULT_ARGS="-width ${VNC_RESOLUTION/x*/} -height ${VNC_RESOLUTION/*x/}"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x firefox > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
firefox $ARGS $URL
|
set +e
|
||||||
|
$START_COMMAND $ARGS $URL
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -16,7 +16,6 @@ if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; t
|
|||||||
echo "custom_startup already running!"
|
echo "custom_startup already running!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x firefox > /dev/null
|
if ! pgrep -x firefox > /dev/null
|
||||||
@ -26,5 +25,4 @@ if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; t
|
|||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="gimp"
|
||||||
|
PGREP="gimp"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x gimp > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
gimp $ARGS &
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,28 +1,83 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="vmware-view"
|
||||||
|
PGREP="vmware-view"
|
||||||
|
MAXIMUS="false"
|
||||||
DEFAULT_ARGS="--fullscreen"
|
DEFAULT_ARGS="--fullscreen"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
cd $HOME
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x vmware-view > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
cd $HOME
|
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
cd $HOME
|
||||||
set +e
|
set +e
|
||||||
vmware-view $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="insomnia"
|
||||||
|
PGREP="insomnia"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x insomnia > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
insomnia $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,27 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/usr/bin/maltego"
|
||||||
|
PGREP="maltego"
|
||||||
|
MAXIMUS="false"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x maltego > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/usr/bin/maltego $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="onlyoffice-desktopeditors"
|
||||||
|
PGREP="DesktopEditors"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--system-title-bar"
|
DEFAULT_ARGS="--system-title-bar"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x DesktopEditors >> /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
onlyoffice-desktopeditors $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/opt/Postman/Postman"
|
||||||
|
PGREP="Postman"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x Postman > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/opt/Postman/Postman $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,28 +1,82 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="rdesktop"
|
||||||
|
PGREP="rdesktop"
|
||||||
|
MAXIMUS="false"
|
||||||
DEFAULT_ARGS="-f localhost "
|
DEFAULT_ARGS="-f localhost "
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x rdesktop > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
cd $HOME
|
cd $HOME
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
rdesktop $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,28 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -x
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="remmina"
|
||||||
|
PGREP="remmina"
|
||||||
DEFAULT_ARGS=" "
|
DEFAULT_ARGS=""
|
||||||
|
MAXIMUS="false"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x remmina > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
cd $HOME
|
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
remmina $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="signal-desktop"
|
||||||
|
PGREP="signal-desktop"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
|
MAXIMUS="true"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ]; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x signal-desktop > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
signal-desktop $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="slack"
|
||||||
|
PGREP="slack"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x slack > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
slack $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/usr/games/steam"
|
||||||
|
PGREP="steam"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x steam > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/usr/games/steam $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/opt/sublime_text/sublime_text"
|
||||||
|
PGREP="sublime_text"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x sublime_text > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/opt/sublime_text/sublime_text $ARGS &
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="teams"
|
||||||
|
PGREP="teams"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x teams > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
teams $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="/opt/Telegram/Telegram"
|
||||||
|
PGREP="Telegram"
|
||||||
DEFAULT_ARGS=""
|
MAXIMUS="false"
|
||||||
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
# Process non-option arguments.
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
for arg; do
|
||||||
echo "custom_startup already running!"
|
echo "arg! $arg"
|
||||||
exit 1
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x Telegram > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
/opt/Telegram/Telegram $ARGS &
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,32 +1,82 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="xfce4-terminal"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="xfce4-terminal "
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
|
||||||
URL=$LAUNCH_URL
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEFAULT_ARGS="--fullscreen --hide-borders --hide-menubar --zoom=-1 --hide-scrollbar"
|
DEFAULT_ARGS="--fullscreen --hide-borders --hide-menubar --zoom=-1 --hide-scrollbar"
|
||||||
ARGS=${TERMINAL_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x xfce4-terminal > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
cd $HOME
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
xfce4-terminal $ARGS
|
cd $HOME
|
||||||
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,84 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$2
|
START_COMMAND="$HOME/tor-browser/tor-browser_en-US/Browser/start-tor-browser"
|
||||||
if [ -n "$1" ] ; then
|
PGREP="firefox.real"
|
||||||
URL=$1
|
MAXIMUS="false"
|
||||||
else
|
DEFAULT_ARGS="--detach --allow-remote --new-tab"
|
||||||
URL=$LAUNCH_URL
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$URL" ] && ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
eval set -- "$options"
|
||||||
echo "custom_startup already running!"
|
|
||||||
exit 1
|
while [[ $1 != -- ]]; do
|
||||||
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
set +e
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
set -e
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep firefox > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
/usr/bin/desktop_ready
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
$HOME/tor-browser/tor-browser_en-US/Browser/start-tor-browser --detach --allow-remote --new-tab $URL
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,28 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="vlc"
|
||||||
|
PGREP="vlc"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--no-metadata-network-access --no-qt-privacy-ask"
|
DEFAULT_ARGS="--no-metadata-network-access --no-qt-privacy-ask"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
maximus &
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
eval set -- "$options"
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
|
||||||
echo "custom_startup already running!"
|
while [[ $1 != -- ]]; do
|
||||||
exit 1
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x vlc >> /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
vlc $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,81 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="code"
|
||||||
|
PGREP="code"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS="--no-sandbox"
|
DEFAULT_ARGS="--no-sandbox"
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x code > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
code $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
||||||
|
@ -1,28 +1,83 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="zoom"
|
||||||
|
PGREP="zoom"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
maximus &
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
eval set -- "$options"
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
|
||||||
echo "custom_startup already running!"
|
while [[ $1 != -- ]]; do
|
||||||
exit 1
|
case $1 in
|
||||||
|
-g|--go) GO='true'; shift 1;;
|
||||||
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x zoom >> /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
zoom $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
@ -1,29 +1,80 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
FORCE=$1
|
START_COMMAND="zsnes"
|
||||||
|
PGREP="zsnes"
|
||||||
|
MAXIMUS="true"
|
||||||
DEFAULT_ARGS=""
|
DEFAULT_ARGS=""
|
||||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||||
|
|
||||||
|
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
maximus &
|
while [[ $1 != -- ]]; do
|
||||||
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
|
case $1 in
|
||||||
if [ -f /tmp/custom_startup.lck ] ; then
|
-g|--go) GO='true'; shift 1;;
|
||||||
echo "custom_startup already running!"
|
-a|--assign) ASSIGN='true'; shift 1;;
|
||||||
exit 1
|
-u|--url) OPT_URL=$2; shift 2;;
|
||||||
|
*) echo "bad option: $1" >&2; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Process non-option arguments.
|
||||||
|
for arg; do
|
||||||
|
echo "arg! $arg"
|
||||||
|
done
|
||||||
|
|
||||||
|
FORCE=$2
|
||||||
|
|
||||||
|
kasm_exec() {
|
||||||
|
if [ -n "$OPT_URL" ] ; then
|
||||||
|
URL=$OPT_URL
|
||||||
|
elif [ -n "$1" ] ; then
|
||||||
|
URL=$1
|
||||||
fi
|
fi
|
||||||
touch /tmp/custom_startup.lck
|
|
||||||
|
# Since we are execing into a container that already has the browser running from startup,
|
||||||
|
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||||
|
if [ -n "$URL" ] ; then
|
||||||
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
|
$START_COMMAND $ARGS $OPT_URL
|
||||||
|
else
|
||||||
|
echo "No URL specified for exec command. Doing nothing."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
kasm_startup() {
|
||||||
|
if [ -n "$KASM_URL" ] ; then
|
||||||
|
URL=$KASM_URL
|
||||||
|
elif [ -z "$URL" ] ; then
|
||||||
|
URL=$LAUNCH_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $MAXIMUS == 'true' ]] ; then
|
||||||
|
maximus &
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if ! pgrep -x zsnes > /dev/null
|
if ! pgrep -x $PGREP > /dev/null
|
||||||
then
|
then
|
||||||
/usr/bin/desktop_ready
|
|
||||||
/usr/bin/filter_ready
|
/usr/bin/filter_ready
|
||||||
|
/usr/bin/desktop_ready
|
||||||
set +e
|
set +e
|
||||||
zsnes $ARGS
|
$START_COMMAND $ARGS $URL
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
rm /tmp/custom_startup.lck
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||||
|
kasm_exec
|
||||||
|
else
|
||||||
|
kasm_startup
|
||||||
fi
|
fi
|
Loading…
x
Reference in New Issue
Block a user