Skip to content

Commit

Permalink
add pkg download+install and executing support in qutselect_connect_a…
Browse files Browse the repository at this point in the history
…pp.sh
  • Loading branch information
jens-maus committed Sep 27, 2024
1 parent 4c2b7ef commit 54f3c5a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ endif()
project(qutselect)
set(PROJECT_LONGNAME "qutselect")
set(PROJECT_VERSION_MAJOR 3)
set(PROJECT_VERSION_MINOR 5)
set(PROJECT_VERSION_MINOR 6)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})

# change output directory to top-level 'bin' dir.
Expand Down
66 changes: 64 additions & 2 deletions scripts/qutselect_connect_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,71 @@ fi
#keyLayout="${7}"
#domain="${8}"
#username="${9}"
serverName="${10}"
app="${10}"

if [[ "${serverName}" == "firefox" ]]; then
TMPDIR=/tmp

if [[ "${app}" == "zoom" ]]; then

if [[ ! -d /opt/zoom ]]; then
yad --center --text="Downloading zoom.pkg...." --title "Zoom Installation" --no-buttons &
yad_pid=$!
/usr/bin/wget -q "${BASE_PATH}/pkgs/zoom.pkg" -O "${TMPDIR}/zoom.pkg"
kill -9 ${yad_pid}

yad --center --text="Installing zoom.pkg...." --title "Zoom Installation" --no-buttons &
yad_pid=$!
tar -C / -xf "${TMPDIR}/zoom.pkg"
rm -f "${TMPDIR}/zoom.pkg"
kill -9 ${yad_pid}
fi

if [[ ! -x /opt/zoom/ZoomLauncher ]]; then
yad --center --text="ERROR: Installation of Zoom failed"
else
yad --center --text="Starting zoom..." --no-buttons &
yad_pid=$!

# remove all previous data
rm -rf ${HOME}/.zoom ${HOME}/.config/zoom*

/opt/zoom/ZoomLauncher &
kill -9 ${yad_pid}
fi

elif [[ "${app}" == "chrome" ]] || [[ "${app}" == "bbb" ]]; then

if [[ ! -d /opt/chrome ]]; then
yad --center --text="Downloading chrome.pkg...." --title "Chrome Installation" --no-buttons &
yad_pid=$!
/usr/bin/wget -q "${BASE_PATH}/pkgs/chrome.pkg" -O "${TMPDIR}/chrome.pkg"
kill -9 ${yad_pid}

yad --center --text="Installing chrome.pkg...." --title "Chrome Installation" --no-buttons &
yad_pid=$!
tar -C / -xf "${TMPDIR}/chrome.pkg"
rm -f "${TMPDIR}/chrome.pkg"
kill -9 ${yad_pid}
fi

if [[ ! -x /opt/chrome/chrome ]]; then
yad --center --text="ERROR: Installation of Chrome failed"
else
yad --center --text="Starting chrome..." --no-buttons &
yad_pid=$!
# remove all previous data
rm -rf ${HOME}/.config/chrome

# start chromium in kiosk mode
if [[ "${app}" == "bbb" ]]; then
/opt/chrome/chrome --app=https://bbb.hzdr.de --start-fullscreen --kiosk --test-type --noerrdialogs --no-first-run --disable-translate --disk-cache-dir=/dev/null --no-sandbox --disable-extensions &
else
/opt/chrome/chrome --start-maximized --test-type --noerrdialogs --no-first-run --disable-translate --disk-cache-dir=/dev/null --no-sandbox --disable-extensions &
fi
kill -9 ${yad_pid}
fi

elif [[ "${app}" == "firefox" ]]; then

# start the firefox browser
if ! /bin/firefox-startup.sh; then
Expand Down

0 comments on commit 54f3c5a

Please sign in to comment.