TomTravis / crouton_Penguin

Chromium OS Penguin multi user linux work station
https://drive.google.com/uc?export=download&id=1HFjX1OejjHAYbaHVL3l9krmBUkA1caZR
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

edit startxiwi to be startinit to start services via monit or supervisor for testing #32

Closed TomTravis closed 1 year ago

TomTravis commented 1 year ago

!/bin/sh -e

Copyright (c) 2016 The crouton Authors. All rights reserved.

Use of this source code is governed by a BSD-style license that can be

found in the LICENSE file.

set -e

APPLICATION="${0##*/}" ENTERCHROOT="$(dirname "$(readlink -f -- "$0")")/enter-chroot" OPTS_ENTER='' OPTS_XIWI=''

USAGE="$APPLICATION [options] chroot_app [parameters]

Wraps enter-chroot to launch a window or tab in Chromium OS for any graphical application. Applications launched in this way show in independent windows or tabs.

By default, it will use the primary user on the first xiwi-enabled chroot found and launch the chroot_app in a window.

Options: $("$ENTERCHROOT" -h 2>&1 | grep -e ' -[bckntu]') -F Launch the chroot_app full-screen. -T Launch the chroot_app in a tab. -f Prevent xiwi from quitting automatically. (see NOTE below)

NOTE: xiwi will normally close when the application returns. Some gui applications fork before or during normal operation, which can confuse xiwi and cause it to quit prematurely. If your application does not have a parameter that prevents it from forking, and crouton is unable to automatically detect the fork, you can use -f to prevent xiwi from quitting automatically. xiwi will quit if you close the Chromium OS window when nothing is displayed.

You can cycle through multiple windows inside the application via Ctrl-Alt-Tab/Ctrl-Alt-Shift-Tab, or close them via Ctrl-Alt-Shift-Escape. If the chroot_app begins with 'start' but you still want to use the default window manager, specify the full path of the application. "

while getopts 'bc:k:n:t:u:FTf' OPT; do case "$OPT" in b) OPTS_ENTER="$OPTS_ENTER -$OPT";; c|k|n|t|u) OPTARG="$(echo -n "$OPTARG" | sed -e "s/'/'\\\''/g")" OPTS_ENTER="$OPTS_ENTER -$OPT '$OPTARG'";; f|F|T) OPTS_XIWI="$OPTS_XIWI -$OPT";; \?) echo "$USAGE" 1>&2 exit 2;; esac done shift "$((OPTIND-1))"

if [ "$#" = "0" ]; then echo "$USAGE" 1>&2 exit 2 fi

eval "exec sh -e \"\$ENTERCHROOT\" -t xiwi $OPTS_ENTER \ exec xiwi $OPTS_XIWI \"\$@\""

TomTravis commented 1 year ago

this has started the dev env for local work is now working without error