diff --git a/lobby_scripts/README.md b/lobby_scripts/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f29ec7d8885032afc2636241934a079985c2aea9 --- /dev/null +++ b/lobby_scripts/README.md @@ -0,0 +1,47 @@ +# SSEC Lobby Display + +The scripts and other files in this directory are used to configure the +displays in the lobby of the AOSS building. + +## Mini-dashboard + +In the lobby there is a small monitor to the left after entering that displays +a real-time display of data from the AOSS Tower instrument. This display shows +a fullscreen Firefox window showing: + + https://metobs.ssec.wisc.edu/aoss/tower/lobby + +This page is designed after the legacy Java application by Tom Whittaker. To +burn-in on the monitor the display will go black at certain times of the day. +A version that does not go black is at https://metobs.ssec.wisc.edu/aoss/tower/lobby24-7. +The display is also configured to not start any screensavers or other +power-saving techniques to keep it showing the dashboard. + +The system driving the monitor is called `lobby-rig`. It is currently a CentOS +system with Gnome desktop environment. The machine is configured to auto-login +to the `tomw` user account (this may be changed in the future). Various scripts +are placed in `/home/tomw/.config/autostart` and `/home/tomw` in order to get +the Firefox window displayed and other configurations set on startup. These +files are in the `https://gitlab.ssec.wisc.edu/metobs/MetObs` Git repository +in the `lobby_scripts` directory and are described below: + +* `lobby.desktop`: Placed in the autostart directory, this initializes the + dashboard by calling the `startup.sh` script. +* `startup.sh`: Placed in the home directory, this starts Firefox pointed to + the lobby web page. It also uses the `xdotool` to make Firefox fullscreen + and refresh the page after it is fullscreen. This refresh is a workaround + for font sizing issue and can be removed in the future. Currently the + version of `xdotool` that comes with CentOS6 has bugs which cause these + `xdotool` commands to not do anything. As a workaround the "Auto Fullscreen" + Firefox extension was installed. After the machine is upgraded to a newer + CentOS this shouldn't be needed anymore (hopefully). +* `noscreensaver.desktop`: This runs `xset.sh` at startup. +* `xset.sh`: This script sets various settings to make sure a screensaver is + is never started. + +## Weather Underground Data Upload + +In the past the `lobby-rig` machine was also responsible for uploading +realtime data to the Weather Underground service (https://wunderground.com). +This was done by Java code and used the legacy RAIN API. This is now handled +by the AOSS Tower InfluxDB ingest scripts. diff --git a/lobby_scripts/lobby.desktop b/lobby_scripts/lobby.desktop new file mode 100644 index 0000000000000000000000000000000000000000..bf413ba5a6ab96e318e6c2e3fd61eee9640cf784 --- /dev/null +++ b/lobby_scripts/lobby.desktop @@ -0,0 +1,10 @@ +# Copy this file to `/home/tomw/.config/autostart/` +[Desktop Entry] +Type=Application +Exec=/home/tomw/startup.sh +Hidden=false +X-GNOME-Autostart-enabled=true +Name[en_US]=lobby rig +Name=lobby rig +Comment[en_US]= +Comment= \ No newline at end of file diff --git a/lobby_scripts/noscreensaver.desktop b/lobby_scripts/noscreensaver.desktop new file mode 100644 index 0000000000000000000000000000000000000000..3b00adc387a8744935156a8a3051b106b5d1d914 --- /dev/null +++ b/lobby_scripts/noscreensaver.desktop @@ -0,0 +1,10 @@ +# Copy this file to `/home/tomw/.config/autostart/` +[Desktop Entry] +Type=Application +Exec=sh /home/tomw/xset.sh +Hidden=false +X-GNOME-Autostart-enabled=true +Name[en_US]=screensaver disable +Name=screensaver disable +Comment[en_US]=disables dpms and xscreensaver +Comment=disables dpms and xscreensaver \ No newline at end of file diff --git a/lobby_scripts/startup.sh b/lobby_scripts/startup.sh new file mode 100755 index 0000000000000000000000000000000000000000..2533618b7e4f57012e377acdf745708746419e2f --- /dev/null +++ b/lobby_scripts/startup.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Source: https://gitlab.ssec.wisc.edu/metobs/MetObsSite + +#xset -dpms s off + +firefox -url https://metobs.ssec.wisc.edu/aoss/tower/lobby & +firefox_pid=$! +sleep 45 + +# These should be used on CentOS 7+ but the version of xdotool that comes +# with CentOS 6 is too old and buggy it seems. +# Resorted to "Auto Fullscreen" Firefox extension: +# https://addons.mozilla.org/en-US/firefox/addon/autofullscreen/ +xdotool search --onlyvisible --desktop 0 --class "Firefox" windowactivate key F11 +# force refresh until webpage text auto-updates when window size changes +xdotool search --onlyvisible --desktop 0 --class "Firefox" windowactivate key F5 +# wait on firefox +wait $! \ No newline at end of file diff --git a/lobby_scripts/xset.sh b/lobby_scripts/xset.sh new file mode 100644 index 0000000000000000000000000000000000000000..1173a3d5626a23378a69a1759a27a66147523dc5 --- /dev/null +++ b/lobby_scripts/xset.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +xset -dpms +xset s off \ No newline at end of file