-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The script was taken from NOIRLabs distribution and heavily adjusted
- Loading branch information
Showing
5 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
# | ||
# XGTerm.app start script | ||
# | ||
# Based on a script that is | ||
# Copyright(c) 2023 Association of Universities for Research in Astronomy Inc. | ||
|
||
set -e | ||
|
||
SCRIPT_DIR=$(dirname -- "${0}") | ||
CONTENT_DIR=$(dirname -- "${SCRIPT_DIR}") | ||
RESOURCES_DIR=$(dirname -- "${SCRIPT_DIR}")/Resources | ||
APP_DIR=$(dirname -- "${CONTENT_DIR}") | ||
APP_NAME=$(echo $(basename -- "$APP_DIR") | sed 's/\.app$//') | ||
|
||
# First check whether XQuartz is already running, If not, start it. | ||
xpid=`ps -efw | egrep -e "startx" | egrep -v grep | awk '{printf("%s",$2)}'| wc -c` | ||
if [ $xpid == 0 ]; then | ||
if test -d /Applications/Utilities/XQuartz.app; then | ||
# XQuartz application directory. | ||
open -a XQuartz | ||
elif test -f /opt/X11/bin/Xquartz; then | ||
# Homebrew installation directory. | ||
/opt/X11/bin/Xquartz | ||
else | ||
# Throw a popup that X11 couldn't be found. | ||
osascript -e "display dialog \"ERROR: XQuartz required but not found. Please install before running ${APP_NAME}\"" | ||
exit 1 | ||
fi | ||
sleep 2 # Wait for it to start. | ||
fi | ||
|
||
cd "${HOME}" | ||
export TERMINFO=${RESOURCES_DIR}/terminfo | ||
export DISPLAY=:0 | ||
${RESOURCES_DIR}/bin/xgterm -title "${APP_NAME}" -ls & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
# | ||
# XImtool.app start script | ||
# | ||
# Based on a script that is | ||
# Copyright(c) 2023 Association of Universities for Research in Astronomy Inc. | ||
|
||
set -e | ||
|
||
SCRIPT_DIR=$(dirname -- "${0}") | ||
CONTENT_DIR=$(dirname -- "${SCRIPT_DIR}") | ||
RESOURCES_DIR=$(dirname -- "${SCRIPT_DIR}")/Resources | ||
APP_DIR=$(dirname -- "${CONTENT_DIR}") | ||
APP_NAME=$(echo $(basename -- "$APP_DIR") | sed 's/\.app$//') | ||
|
||
# First check whether XQuartz is already running, If not, start it. | ||
xpid=`ps -efw | egrep -e "startx" | egrep -v grep | awk '{printf("%s",$2)}'| wc -c` | ||
if [ $xpid == 0 ]; then | ||
if test -d /Applications/Utilities/XQuartz.app; then | ||
# XQuartz application directory. | ||
open -a XQuartz | ||
elif test -f /opt/X11/bin/Xquartz; then | ||
# Homebrew installation directory. | ||
/opt/X11/bin/Xquartz | ||
else | ||
# Throw a popup that X11 couldn't be found. | ||
osascript -e "display dialog \"ERROR: XQuartz required but not found. Please install before running ${APP_NAME}\"" | ||
exit 1 | ||
fi | ||
sleep 2 # Wait for it to start. | ||
fi | ||
|
||
cd "${HOME}" | ||
export DISPLAY=:0 | ||
${RESOURCES_DIR}/bin/ximtool & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters