Commit 730dec4d authored by Jens Henrik  Goebbert's avatar Jens Henrik Goebbert

call wait4signal.exe from script

parent acae0c32
......@@ -2,12 +2,12 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-cpuquota-default
Name=cpu quota
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-cpuquota-default/infoterm-cpuquota-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
Icon=utilities-terminal
StartupNotify=false
Terminal=false
Hidden=false
Categories=FZJ-Infoterms
Categories=FZJ-Utilities
......@@ -2,12 +2,12 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-dataquota-default
Name=data quota
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-dataquota-default/infoterm-dataquota-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
Icon=utilities-terminal
StartupNotify=false
Terminal=false
Hidden=false
Categories=FZJ-Infoterms
Categories=FZJ-Utilities
......@@ -2,7 +2,7 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-htop-default
Name=cpu/mem usage (desktop-gadget)
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-htop-default/infoterm-htop-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
......
......@@ -2,7 +2,7 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-jobtime-default
Name=VNC timer (desktop-gadget)
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-jobtime-default/infoterm-jobtime-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
......
......@@ -2,12 +2,12 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-motd-default
Name=message-of-the-day
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-motd-default/infoterm-motd-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
Icon=utilities-terminal
StartupNotify=false
Terminal=false
Hidden=false
Categories=FZJ-Infoterms
Categories=FZJ-Utilities
......@@ -2,7 +2,7 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-vncperf-default
Name=VNC performance (desktop-gadget)
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-vncperf-default/infoterm-vncperf-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
......
......@@ -2,9 +2,9 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-wall-default
Name=wall message daemon (background service)
Comment=
Exec=bash -c '/usr/bin/wait4signal.exe ${XDG_PROFILES_DIR}/default/data/infoterm-wall-default/infoterm-wall-default.sh'
Exec=bash -c '${XDG_PROFILES_DIR}/default/data/infoterm-wall-default/infoterm-wall-default.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
StartupNotify=false
Terminal=false
......
#!/bin/bash
# create tmp file
TMP_FILE=`mktemp`;
PROGNAME=$(basename $0)
echo "tmp file = $TMP_FILE"
function clean_up {
# Perform program exit housekeeping
# Optionally accepts an exit status
rm -f $TMP_FILE
exit $1
}
trap clean_up SIGHUP SIGINT SIGTERM
# read stdin to TMP_FILE
while read line
do
echo "$line" >> ${TMP_FILE}
done
cat ${TMP_FILE}
# set the XDG_CONFIG_HOME for infoterm to the directory infoterm.sh is stored
# and start terminal to show TMP_FILE
XDG_CONFIG_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" \
xfce4-terminal \
--disable-server \
--title=infoterm-wall-default \
--hide-menubar \
--hide-toolbar \
-e 'sh -c "cat ${TMP_FILE}; read -p \"Press [Enter] key to close...\""'
clean_up
#!/bin/bash
# create tmp file
TMP_FILE=`mktemp`;
PROGNAME=$(basename $0)
echo "tmp file = $TMP_FILE"
function clean_up {
# Perform program exit housekeeping
# Optionally accepts an exit status
rm -f $TMP_FILE
#echo "trap called clean_up" > ${HOME}/trap.out <- we do not reach this point on logout (why?)
exit $1
}
trap clean_up SIGHUP SIGINT SIGTERM
# read stdin to TMP_FILE
while read line
do
echo "$line" >> ${TMP_FILE}
done
cat ${TMP_FILE}
# set the XDG_CONFIG_HOME for infoterm to the directory infoterm.sh is stored
# and start terminal to show TMP_FILE
XDG_CONFIG_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" \
xfce4-terminal \
--disable-server \
--title=infoterm-wall-default \
--hide-menubar \
--hide-toolbar \
-e 'sh -c "cat ${TMP_FILE}; read -p \"Press [Enter] key to close...\""'
# run in foreground and never come back
/usr/bin/wait4signal.exe ${XDG_PROFILES_DIR}/default/data/infoterm-wall-default/infoterm-wall-default-script.sh
# we never reach this point
clean_up
......@@ -2,7 +2,7 @@
Encoding=UTF-8
Version=1.0
Type=Application
Name=infoterm-nvidia-vis
Name=gpu/mem usage (desktop-gadget)
Comment=
Exec=bash -c '${XDG_PROFILES_DIR}/vis/data/infoterm-nvidia-vis/infoterm-nvidia-vis.sh'
Icon=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles/default/data/icons/fzj-utils-infoterms-logo_32x32.png
......
#!/bin/bash
# settings
PROFILE=default
PROFILE=vis
OLD_PATH=/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/profiles
NEW_PATH=/usr/local/jsc/etc/xdg/profiles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment