diff --git a/Makefile b/Makefile index 8e10f07c1..75005ceba 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ generate-Spark: all: @echo 'Did you mean to generate all Dockerfiles? That has been renamed to `make generate-dockerfiles`' -generate-dockerfiles: clean jupyterlab rstudio remote-desktop sas docker-stacks-datascience-notebook +generate-dockerfiles: clean jupyterlab rstudio sas docker-stacks-datascience-notebook @echo "All dockerfiles created." ############################## @@ -161,24 +161,6 @@ jupyterlab: pytorch tensorflow cpu > $(OUT)/$@-$${type}/Dockerfile; \ done -# Remote Desktop -remote-desktop: - mkdir -p $(OUT)/$@ - echo "REMOTE DESKTOP" - cp -r scripts/remote-desktop $(OUT)/$@ - cp -r resources/common/. $(OUT)/$@ - cp -r resources/remote-desktop/. $(OUT)/$@ - - $(CAT) \ - $(SRC)/0_Rocker.Dockerfile \ - $(SRC)/3_Kubeflow.Dockerfile \ - $(SRC)/4_CLI.Dockerfile \ - $(SRC)/6_remote-desktop.Dockerfile \ - $(SRC)/7_remove_vulnerabilities.Dockerfile \ - $(SRC)/8_platform.Dockerfile \ - $(SRC)/∞_CMD_remote-desktop.Dockerfile \ - > $(OUT)/$@/Dockerfile - # Debugging Dockerfile generator that essentially uses docker-stacks images # Used for when you need something to build quickly during debugging docker-stacks-datascience-notebook: diff --git a/docker-bits/0_Rocker.Dockerfile b/docker-bits/0_Rocker.Dockerfile deleted file mode 100644 index 299b85c13..000000000 --- a/docker-bits/0_Rocker.Dockerfile +++ /dev/null @@ -1,99 +0,0 @@ -# Rocker/geospatial is tagged by R version number. They are not clear on whether they'll change those tagged -# images for hotfixes, so always pin tag and digest to prevent unexpected upstream changes - -FROM rocker/geospatial:4.2.1@sha256:5caca36b8962233f8636540b7c349d3f493f09e864b6e278cb46946ccf60d4d2 - -# For compatibility with docker stacks -ARG HOME=/home/$NB_USER -ARG NB_USER="jovyan" -ARG NB_UID="1000" -ARG NB_GID="100" - -ENV NB_USER="${NB_USER}" \ - NB_UID=${NB_UID} \ - NB_GID=${NB_GID} \ - CONDA_DIR=/opt/conda \ - PATH=$PATH:/opt/conda/bin \ - NB_USER="jovyan" \ - HOME="/home/${NB_USER}" - -USER root -ENV PATH="/home/jovyan/.local/bin/:${PATH}" - -#Fix-permissions -COPY remote-desktop/fix-permissions /usr/bin/fix-permissions -#clean up -COPY clean-layer.sh /usr/bin/clean-layer.sh - -RUN chmod u+x /usr/bin/fix-permissions \ - && chmod +x /usr/bin/clean-layer.sh - -RUN apt-get update --yes \ - && apt-get install --yes python3-pip tini language-pack-fr \ - && rm -rf /var/lib/apt/lists/* - -RUN pip3 install jupyter \ - && rm -rf /var/lib/apt/lists/* - -# Users should install R packages in their home directory -RUN chmod 555 /usr/local/lib/R /usr/local/lib/R/site-library/ - - -# ARG CONDA_VERSION=py38_4.10.3 -# ARG CONDA_MD5=14da4a9a44b337f7ccb8363537f65b9c -ARG PYTHON_VERSION=3.11 - -# #Install Miniconda -# #Has to be appended, else messes with qgis -# RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O miniconda.sh && \ -# echo "${CONDA_MD5} miniconda.sh" > miniconda.md5 && \ -# if ! md5sum --status -c miniconda.md5; then exit 1; fi && \ -# mkdir -p /opt && \ -# sh miniconda.sh -b -p /opt/conda && \ -# rm miniconda.sh miniconda.md5 && \ -# ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ -# echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ -# echo "conda activate base" >> ~/.bashrc && \ -# find /opt/conda/ -follow -type f -name '*.a' -delete && \ -# find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ -# /opt/conda/bin/conda clean -afy && \ -# chown -R $NB_UID:$NB_GID /opt/conda -# -# Download and install Micromamba, and initialize Conda prefix. -# -# Similar projects using Micromamba: -# - Micromamba-Docker: -# - repo2docker: -# Install Python, Mamba and jupyter_core -# Cleanup temporary files and remove Micromamba -# Correct permissions -# Do all this in a single RUN command to avoid duplicating all of the -# files across image layers when the permissions change -COPY initial-condarc "${CONDA_DIR}/.condarc" -WORKDIR /tmp -RUN set -x && \ - arch=$(uname -m) && \ - if [ "${arch}" = "x86_64" ]; then \ - # Should be simpler, see - arch="64"; \ - fi && \ - wget --progress=dot:giga -O /tmp/micromamba.tar.bz2 \ - "https://micromamba.snakepit.net/api/micromamba/linux-${arch}/latest" && \ - tar -xvjf /tmp/micromamba.tar.bz2 --strip-components=1 bin/micromamba && \ - rm /tmp/micromamba.tar.bz2 && \ - PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \ - if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \ - # Install the packages - ./micromamba install \ - --root-prefix="${CONDA_DIR}" \ - --prefix="${CONDA_DIR}" \ - --yes \ - "${PYTHON_SPECIFIER}" \ - 'mamba' \ - 'jupyter_core' && \ - rm micromamba && \ - # Pin major.minor version of python - mamba list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \ - clean-layer.sh && \ - fix-permissions "${CONDA_DIR}" && \ - fix-permissions "/home/${NB_USER}" \ No newline at end of file diff --git a/docker-bits/6_remote-desktop.Dockerfile b/docker-bits/6_remote-desktop.Dockerfile deleted file mode 100644 index 1272a55ec..000000000 --- a/docker-bits/6_remote-desktop.Dockerfile +++ /dev/null @@ -1,370 +0,0 @@ -USER root - -ENV NB_UID=1000 -ENV NB_GID=100 -ENV XDG_DATA_HOME=/etc/share -ENV VSCODE_DIR=$XDG_DATA_HOME/code -ENV VSCODE_EXTENSIONS=$VSCODE_DIR/extensions - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -y update \ - && apt-get install -y dbus-x11 \ - xfce4 \ - xfce4-panel \ - xfce4-session \ - xfce4-settings \ - xorg \ - xubuntu-icon-theme \ - && clean-layer.sh - -ENV RESOURCES_PATH="/resources" -RUN mkdir $RESOURCES_PATH - -# Copy installation scripts -COPY remote-desktop $RESOURCES_PATH - -# Install the French Locale. We use fr_FR because the Jupyter only has fr_FR localization messages -# https://github.com/jupyter/notebook/tree/master/notebook/i18n/fr_FR/LC_MESSAGES -RUN \ - apt-get update && \ - apt-get install -y locales && \ - sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ - locale-gen && \ - dpkg-reconfigure --frontend=noninteractive locales && \ - apt-get install -y language-pack-fr-base && \ - #Needed for right click functions - apt-get install -y language-pack-gnome-fr && \ - clean-layer.sh - -# Install Terminal / GDebi (Package Manager) / & archive tools -RUN \ - apt-get update && \ - # Configuration database - required by git kraken / atom and other tools (1MB) - apt-get install -y --no-install-recommends gconf2 && \ - apt-get install -y --no-install-recommends xfce4-terminal && \ - apt-get install -y --no-install-recommends --allow-unauthenticated xfce4-taskmanager && \ - # Install gdebi deb installer - apt-get install -y --no-install-recommends gdebi && \ - # Search for files - apt-get install -y --no-install-recommends catfish && \ - # vs support for thunar - apt-get install -y thunar-vcs-plugin && \ - apt-get install -y --no-install-recommends baobab && \ - # Lightweight text editor - apt-get install -y mousepad && \ - apt-get install -y --no-install-recommends vim && \ - # Process monitoring - apt-get install -y htop && \ - # Install Archive/Compression Tools: https://wiki.ubuntuusers.de/Archivmanager/ - apt-get install -y p7zip p7zip-rar && \ - apt-get install -y --no-install-recommends thunar-archive-plugin && \ - apt-get install -y xarchiver && \ - # DB Utils - apt-get install -y --no-install-recommends sqlitebrowser && \ - # Install nautilus and support for sftp mounting - apt-get install -y --no-install-recommends nautilus gvfs-backends && \ - # Install gigolo - Access remote systems - apt-get install -y --no-install-recommends gigolo gvfs-bin && \ - # xfce systemload panel plugin - needs to be activated - apt-get install -y --no-install-recommends xfce4-systemload-plugin && \ - # Leightweight ftp client that supports sftp, http, ... - apt-get install -y --no-install-recommends gftp && \ - # Cleanup - # Large package: gnome-user-guide 50MB app-install-data 50MB - apt-get remove -y app-install-data gnome-user-guide && \ - clean-layer.sh - -#None of these are installed in upstream docker images but are present in current remote -RUN \ - apt-get update --fix-missing && \ - apt-get install -y sudo apt-utils && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - # This is necessary for apt to access HTTPS sources: - apt-transport-https \ - gnupg-agent \ - gpg-agent \ - gnupg2 \ - ca-certificates \ - build-essential \ - pkg-config \ - software-properties-common \ - lsof \ - net-tools \ - libcurl4 \ - curl \ - wget \ - cron \ - openssl \ - iproute2 \ - psmisc \ - tmux \ - dpkg-sig \ - uuid-dev \ - csh \ - xclip \ - clinfo \ - libgdbm-dev \ - libncurses5-dev \ - gawk \ - # Simplified Wrapper and Interface Generator (5.8MB) - required by lots of py-libs - swig \ - # Graphviz (graph visualization software) (4MB) - graphviz libgraphviz-dev \ - # Terminal multiplexer - screen \ - # Editor - nano \ - # Find files, already have catfish remove? - locate \ - # XML Utils - xmlstarlet \ - # R*-tree implementation - Required for earthpy, geoviews (3MB) - libspatialindex-dev \ - # Search text and binary files - yara \ - # Minimalistic C client for Redis - libhiredis-dev \ - libleptonica-dev \ - # GEOS library (3MB) - libgeos-dev \ - # style sheet preprocessor - less \ - # Print dir tree - tree \ - # Bash autocompletion functionality - bash-completion \ - # ping support - iputils-ping \ - # Json Processor - jq \ - rsync \ - # VCS: - subversion \ - jed \ - git \ - git-gui \ - # odbc drivers - unixodbc unixodbc-dev \ - # Image support - libtiff-dev \ - libjpeg-dev \ - libpng-dev \ - # protobuffer support - protobuf-compiler \ - libprotobuf-dev \ - libprotoc-dev \ - autoconf \ - automake \ - libtool \ - cmake \ - fonts-liberation \ - google-perftools \ - # Compression Libs - zip \ - gzip \ - unzip \ - bzip2 \ - lzop \ - libarchive-tools \ - zlibc \ - # unpack (almost) everything with one command - unp \ - libbz2-dev \ - liblzma-dev \ - zlib1g-dev && \ - # configure dynamic linker run-time bindings - ldconfig && \ - # Fix permissions - fix-permissions && \ - # Cleanup - clean-layer.sh - -RUN pip3 install --quiet 'selenium' && \ - fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER - -#Install geckodriver -RUN wget --quiet https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz -O /tmp/geckodriver-v0.28.0-linux64.tar.gz && \ - tar -xf /tmp/geckodriver-v0.28.0-linux64.tar.gz -C /tmp/ && \ - chmod +x /tmp/geckodriver && \ - mv /tmp/geckodriver /usr/bin/geckodriver && \ - rm /tmp/geckodriver-v0.28.0-linux64.tar.gz && \ - clean-layer.sh - -# Install Firefox -RUN /bin/bash $RESOURCES_PATH/firefox.sh --install && \ - # Cleanup - clean-layer.sh - -#Copy the French language pack file, must be the 86 version -RUN wget https://addons.mozilla.org/firefox/downloads/file/3731010/francais_language_pack-86.0buildid20210222142601-fx.xpi -O langpack-fr@firefox.mozilla.org.xpi && \ - mkdir --parents /usr/lib/firefox/distribution/extensions/ && \ - mv langpack-fr@firefox.mozilla.org.xpi /usr/lib/firefox/distribution/extensions/ - -#Configure and set up Firefox to start up in a specific language (depends on LANG env variable) -COPY French/Firefox/autoconfig.js /usr/lib/firefox/defaults/pref/ -COPY French/Firefox/firefox.cfg /usr/lib/firefox/ - - -#Install VsCode -RUN apt-get update --yes \ - && apt-get install --yes nodejs npm \ - && /bin/bash $RESOURCES_PATH/vs-code-desktop.sh --install \ - && clean-layer.sh - -# Install Visual Studio Code extensions -# https://github.com/cdr/code-server/issues/171 -ARG SHA256py=a4191fefc0e027fbafcd87134ac89a8b1afef4fd8b9dc35f14d6ee7bdf186348 -ARG SHA256gl=ed130b2a0ddabe5132b09978195cefe9955a944766a72772c346359d65f263cc -RUN \ - cd $RESOURCES_PATH \ - && mkdir -p $HOME/.local/share \ - && mkdir -p $VSCODE_DIR/extensions \ - && VS_PYTHON_VERSION="2020.5.86806" \ - && wget --quiet --no-check-certificate https://github.com/microsoft/vscode-python/releases/download/$VS_PYTHON_VERSION/ms-python-release.vsix \ - && echo "${SHA256py} ms-python-release.vsix" | sha256sum -c - \ - && bsdtar -xf ms-python-release.vsix extension \ - && rm ms-python-release.vsix \ - && mv extension $VSCODE_DIR/extensions/ms-python.python-$VS_PYTHON_VERSION \ - && VS_FRENCH_VERSION="1.68.3" \ - && VS_LOCALE_REPO_VERSION="1.68.3" \ - && git clone -b release/$VS_LOCALE_REPO_VERSION https://github.com/microsoft/vscode-loc.git \ - && cd vscode-loc \ - && npm install -g --unsafe-perm vsce@1.103.1 \ - && cd i18n/vscode-language-pack-fr \ - && vsce package \ - && bsdtar -xf vscode-language-pack-fr-$VS_FRENCH_VERSION.vsix extension \ - && mv extension $VSCODE_DIR/extensions/ms-ceintl.vscode-language-pack-fr-$VS_FRENCH_VERSION \ - && cd ../../../ \ - # -fr option is required. git clone protects the directory and cannot delete it without -fr - && rm -fr vscode-loc \ - && npm uninstall -g vsce \ - && fix-permissions $XDG_DATA_HOME \ - && clean-layer.sh - -#QGIS -COPY qgis-2022.gpg.key $RESOURCES_PATH/qgis-2022.gpg.key -COPY remote-desktop/qgis.sh $RESOURCES_PATH/qgis.sh -RUN /bin/bash $RESOURCES_PATH/qgis.sh \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists - -#R-Studio -RUN /bin/bash $RESOURCES_PATH/r-studio-desktop.sh && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists - -#Libre office -RUN add-apt-repository ppa:libreoffice/ppa && \ - apt-get install -y eog && \ - apt-get install -y libreoffice libreoffice-gtk3 && \ - apt-get install -y libreoffice-help-fr libreoffice-l10n-fr && \ - clean-layer.sh - -#Install PSPP -RUN /bin/bash $RESOURCES_PATH/pspp.sh \ - && clean-layer.sh - -#Install Minio -COPY minio-icon.png $RESOURCES_PATH/minio-icon.png -COPY remote-desktop/minio-launch.py /usr/bin/minio-launch.py - -# Install OpenM++ -ENV OMPP_VERSION="1.15.6" -# IMPORTANT: Don't forget to update the version number in the openmpp.desktop file!! -ENV OMPP_PKG_DATE="20231115" -ARG SHA256ompp=75372202c66f31c0b8d7c87967bdf7c75c300858841d10dad0b4230887de6856 -# OpenM++ environment settings -ENV OMPP_USER=$NB_USER -ENV OMPP_GROUP=100 -ENV OMPP_UID=$NB_UID -ENV OMPP_GID=$NB_GID -# OpenM++ expects sqlite to be installed (not just libsqlite) -RUN apt-get update --yes \ - && apt-get install --yes sqlite3 \ - && wget https://github.com/openmpp/main/releases/download/v${OMPP_VERSION}/openmpp_debian-11_${OMPP_PKG_DATE}.tar.gz -O /tmp/ompp.tar.gz \ - && echo "${SHA256ompp} /tmp/ompp.tar.gz" | sha256sum -c - \ - && tar -xf /tmp/ompp.tar.gz -C /tmp/ \ - && mkdir /opt/openmpp \ - && mv /tmp/openmpp_debian-11_${OMPP_PKG_DATE} /opt/openmpp/${OMPP_VERSION} \ - && chown -R $NB_UID:$NB_GID /opt/openmpp -# Copy the desktop icon into place for the web UI -COPY openmpp.png $RESOURCES_PATH/openmpp.png - -#Copy over french config for vscode -#Both of these are required to have the language pack be recognized on install. -COPY French/vscode/argv.json /home/$NB_USER/.vscode/ -COPY French/vscode/languagepacks.json /home/$NB_USER/.config/Code/ - -#Tiger VNC -ARG SHA256tigervnc=fb8f94a5a1d77de95ec8fccac26cb9eaa9f9446c664734c68efdffa577f96a31 -RUN \ - cd ${RESOURCES_PATH} && \ - wget --quiet https://sourceforge.net/projects/tigervnc/files/stable/1.10.1/tigervnc-1.10.1.x86_64.tar.gz/ -O /tmp/tigervnc.tar.gz && \ - echo "${SHA256tigervnc} /tmp/tigervnc.tar.gz" | sha256sum -c - && \ - tar xzf /tmp/tigervnc.tar.gz --strip 1 -C / && \ - rm /tmp/tigervnc.tar.gz && \ - clean-layer.sh - -#MISC Configuration Area -#Copy over desktop files. First location is dropdown, then desktop, and make them executable -COPY /desktop-files /usr/share/applications -COPY /desktop-files $RESOURCES_PATH/desktop-files - -#Copy over French Language files -COPY French/mo-files/ /usr/share/locale/fr/LC_MESSAGES - -#Configure the panel -# Done at runtime -# COPY ./desktop-files/.config/xfce4/xfce4-panel.xml /home/jovyan/.config/xfce4/xfconf/xfce-perchannel-xml/ - -#Removal area -#Extra Icons -RUN rm /usr/share/applications/exo-mail-reader.desktop -#Prevent screen from locking -RUN apt-get remove -y -q light-locker - - -# apt-get may result in root-owned directories/files under $HOME -RUN usermod -l $NB_USER rstudio && \ - chown -R $NB_UID:$NB_GID $HOME - -ENV NB_USER=$NB_USER -ENV NB_NAMESPACE=$NB_NAMESPACE -# https://github.com/novnc/websockify/issues/413#issuecomment-664026092 -RUN apt-get update && apt-get install --yes websockify \ - && cp /usr/lib/websockify/rebind.cpython-38-x86_64-linux-gnu.so /usr/lib/websockify/rebind.so \ - && clean-layer.sh - - -#Set Defaults -ENV HOME=/home/$NB_USER -COPY /novnc $RESOURCES_PATH/novnc -ARG NO_VNC_VERSION=1.3.0 -ARG NO_VNC_SHA=ee8f91514c9ce9f4054d132f5f97167ee87d9faa6630379267e569d789290336 -RUN pip3 install --force websockify==0.9.0 \ - && wget https://github.com/novnc/noVNC/archive/refs/tags/v${NO_VNC_VERSION}.tar.gz -O /tmp/novnc.tar.gz \ - && echo "${NO_VNC_SHA} /tmp/novnc.tar.gz" | sha256sum -c - \ - && tar -xf /tmp/novnc.tar.gz -C /tmp/ \ - && mv /tmp/noVNC-${NO_VNC_VERSION} /opt/novnc \ - && rm /tmp/novnc.tar.gz \ - && mv ${RESOURCES_PATH}/novnc/ui.js /opt/novnc/app/ui.js \ - && mv ${RESOURCES_PATH}/novnc/vnc_lite.html /opt/novnc/vnc_lite.html \ - && chown -R $NB_UID:$NB_GID /opt/novnc - -COPY --chown=$NB_USER:100 canada.ico $RESOURCES_PATH/favicon.ico - -USER root -RUN apt-get update --yes \ - && apt-get install --yes nginx \ - && chown -R $NB_USER:100 /var/log/nginx \ - && chown $NB_USER:100 /etc/nginx \ - && chmod -R 755 /var/log/nginx \ - && rm -rf /var/lib/apt/lists/* -RUN chown -R $NB_USER /home/$NB_USER -USER $NB_USER -COPY --chown=$NB_USER:100 nginx.conf /etc/nginx/nginx.conf - -USER root - diff --git "a/docker-bits/\342\210\236_CMD_remote-desktop.Dockerfile" "b/docker-bits/\342\210\236_CMD_remote-desktop.Dockerfile" deleted file mode 100644 index 12b4002e3..000000000 --- "a/docker-bits/\342\210\236_CMD_remote-desktop.Dockerfile" +++ /dev/null @@ -1,33 +0,0 @@ -# Configure container startup - -USER root - -WORKDIR /home/$NB_USER -EXPOSE 8888 -COPY start-remote-desktop.sh /usr/local/bin/ -COPY trino-wrapper.sh /usr/local/bin/trino - -RUN chmod +x /usr/local/bin/trino -RUN chsh -s /bin/bash $NB_USER - -# Add --user to all pip install calls and point pip to Artifactory repository -COPY pip.conf /tmp/pip.conf -RUN cat /tmp/pip.conf >> /etc/pip.conf && rm /tmp/pip.conf \ - && pip config set global.timeout 300 - -# Point conda to Artifactory repository -COPY .condarc /tmp/.condarc -RUN cat /tmp/.condarc > /opt/conda/.condarc && rm /tmp/.condarc - -# Point R to Artifactory repository -COPY Rprofile.site /tmp/Rprofile.site -RUN cat /tmp/Rprofile.site >> /usr/local/lib/R/etc/Rprofile.site && rm /tmp/Rprofile.site - -# Removal area -# Prevent screen from locking -RUN apt-get remove -y -q light-locker xfce4-screensaver \ - && apt-get autoremove -y - -USER $NB_USER -ENTRYPOINT ["tini", "--"] -CMD ["start-remote-desktop.sh"] diff --git a/output/remote-desktop/.Rprofile b/output/remote-desktop/.Rprofile deleted file mode 100644 index f909634ee..000000000 --- a/output/remote-desktop/.Rprofile +++ /dev/null @@ -1,18 +0,0 @@ -# Set Personal Package Directory -#------------------------------- -home_dir <- Sys.getenv("HOME") -package_dir <- paste0(home_dir, "/R/", "r-packages-", R.Version()$major, ".", R.Version()$minor) -dir.create(package_dir, recursive = T, showWarnings = F) -.libPaths(new = package_dir) -# Clean up -rm(home_dir) -rm(package_dir) - -# Add any customizations below -#----------------------------- -#options(stringsAsFactors = FALSE) -#options(prompt = "AAW> ") - -# using wget because https://github.com/StatCan/aaw-kubeflow-containers/issues/569 -# https://stackoverflow.com/questions/70559397/r-internet-routines-cannot-be-loaded-when-starting-from-rstudio -options(download.file.method="wget") diff --git a/output/remote-desktop/.condarc b/output/remote-desktop/.condarc deleted file mode 100644 index 2c570f90f..000000000 --- a/output/remote-desktop/.condarc +++ /dev/null @@ -1,5 +0,0 @@ -channels: - - https://artifactory.cloud.statcan.ca/artifactory/rpug-conda/ - -auto_update_conda: false -show_channel_urls: true diff --git a/output/remote-desktop/Dockerfile b/output/remote-desktop/Dockerfile deleted file mode 100644 index 11ab4b64b..000000000 --- a/output/remote-desktop/Dockerfile +++ /dev/null @@ -1,699 +0,0 @@ - -############################### -### docker-bits/0_Rocker.Dockerfile -############################### - -# Rocker/geospatial is tagged by R version number. They are not clear on whether they'll change those tagged -# images for hotfixes, so always pin tag and digest to prevent unexpected upstream changes - -FROM rocker/geospatial:4.2.1@sha256:5caca36b8962233f8636540b7c349d3f493f09e864b6e278cb46946ccf60d4d2 - -# For compatibility with docker stacks -ARG HOME=/home/$NB_USER -ARG NB_USER="jovyan" -ARG NB_UID="1000" -ARG NB_GID="100" - -ENV NB_USER="${NB_USER}" \ - NB_UID=${NB_UID} \ - NB_GID=${NB_GID} \ - CONDA_DIR=/opt/conda \ - PATH=$PATH:/opt/conda/bin \ - NB_USER="jovyan" \ - HOME="/home/${NB_USER}" - -USER root -ENV PATH="/home/jovyan/.local/bin/:${PATH}" - -#Fix-permissions -COPY remote-desktop/fix-permissions /usr/bin/fix-permissions -#clean up -COPY clean-layer.sh /usr/bin/clean-layer.sh - -RUN chmod u+x /usr/bin/fix-permissions \ - && chmod +x /usr/bin/clean-layer.sh - -RUN apt-get update --yes \ - && apt-get install --yes python3-pip tini language-pack-fr \ - && rm -rf /var/lib/apt/lists/* - -RUN pip3 install jupyter \ - && rm -rf /var/lib/apt/lists/* - -# Users should install R packages in their home directory -RUN chmod 555 /usr/local/lib/R /usr/local/lib/R/site-library/ - - -# ARG CONDA_VERSION=py38_4.10.3 -# ARG CONDA_MD5=14da4a9a44b337f7ccb8363537f65b9c -ARG PYTHON_VERSION=3.11 - -# #Install Miniconda -# #Has to be appended, else messes with qgis -# RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O miniconda.sh && \ -# echo "${CONDA_MD5} miniconda.sh" > miniconda.md5 && \ -# if ! md5sum --status -c miniconda.md5; then exit 1; fi && \ -# mkdir -p /opt && \ -# sh miniconda.sh -b -p /opt/conda && \ -# rm miniconda.sh miniconda.md5 && \ -# ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ -# echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ -# echo "conda activate base" >> ~/.bashrc && \ -# find /opt/conda/ -follow -type f -name '*.a' -delete && \ -# find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ -# /opt/conda/bin/conda clean -afy && \ -# chown -R $NB_UID:$NB_GID /opt/conda -# -# Download and install Micromamba, and initialize Conda prefix. -# -# Similar projects using Micromamba: -# - Micromamba-Docker: -# - repo2docker: -# Install Python, Mamba and jupyter_core -# Cleanup temporary files and remove Micromamba -# Correct permissions -# Do all this in a single RUN command to avoid duplicating all of the -# files across image layers when the permissions change -COPY initial-condarc "${CONDA_DIR}/.condarc" -WORKDIR /tmp -RUN set -x && \ - arch=$(uname -m) && \ - if [ "${arch}" = "x86_64" ]; then \ - # Should be simpler, see - arch="64"; \ - fi && \ - wget --progress=dot:giga -O /tmp/micromamba.tar.bz2 \ - "https://micromamba.snakepit.net/api/micromamba/linux-${arch}/latest" && \ - tar -xvjf /tmp/micromamba.tar.bz2 --strip-components=1 bin/micromamba && \ - rm /tmp/micromamba.tar.bz2 && \ - PYTHON_SPECIFIER="python=${PYTHON_VERSION}" && \ - if [[ "${PYTHON_VERSION}" == "default" ]]; then PYTHON_SPECIFIER="python"; fi && \ - # Install the packages - ./micromamba install \ - --root-prefix="${CONDA_DIR}" \ - --prefix="${CONDA_DIR}" \ - --yes \ - "${PYTHON_SPECIFIER}" \ - 'mamba' \ - 'jupyter_core' && \ - rm micromamba && \ - # Pin major.minor version of python - mamba list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> "${CONDA_DIR}/conda-meta/pinned" && \ - clean-layer.sh && \ - fix-permissions "${CONDA_DIR}" && \ - fix-permissions "/home/${NB_USER}" - -############################### -### docker-bits/3_Kubeflow.Dockerfile -############################### - -USER root -COPY suspend-server.sh /usr/local/bin - -# https://github.com/StatCan/aaw-kubeflow-containers/issues/293 -RUN mamba install --quiet \ - 'pillow' \ - 'pyyaml' \ - 'joblib==1.2.0' \ - # s3 file system tool forked by Zach, ~4 years old, to be upgraded - 's3fs' \ - 'fire==0.5.0' \ - 'graphviz' && \ - pip install 'kubeflow-training' && \ - clean-layer.sh && \ - fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER && \ - chmod +x /usr/local/bin/suspend-server.sh - -############################### -### docker-bits/4_CLI.Dockerfile -############################### - -USER root - -# Add helpers for shell initialization -COPY shell_helpers.sh /tmp/shell_helpers.sh - -# Dependencies -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - 'byobu' \ - 'pass' \ - 'htop' \ - 'jq' \ - 'openssl' \ - 'ranger' \ - 'tig' \ - 'tmux' \ - 'tree' \ - 'vim' \ - 'zip' \ - 'zsh' \ - 'dos2unix' \ - # these are required by some r packages, adding these here so they get - # installed into all images. - 'libfreetype6-dev' \ - 'libpng-dev' \ - 'libtiff5-dev' \ - 'libjpeg-dev' \ - 'libtiff-dev' \ - 'libfreetype-dev' \ - 'libfreetype6' && \ - rm -rf /var/lib/apt/lists/* - - -ARG KUBECTL_VERSION=v1.28.2 -ARG KUBECTL_URL=https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -ARG KUBECTL_SHA=c922440b043e5de1afa3c1382f8c663a25f055978cbc6e8423493ec157579ec5 - -ARG AZCLI_URL=https://aka.ms/InstallAzureCLIDeb - -ARG OH_MY_ZSH_URL=https://raw.githubusercontent.com/loket/oh-my-zsh/feature/batch-mode/tools/install.sh -ARG OH_MY_ZSH_SHA=22811faf34455a5aeaba6f6b36f2c79a0a454a74c8b4ea9c0760d1b2d7022b03 - -ARG TRINO_URL=https://repo1.maven.org/maven2/io/trino/trino-cli/410/trino-cli-410-executable.jar -ARG TRINO_SHA=f32c257b9cfc38e15e8c0b01292ae1f11bda2b23b5ce1b75332e108ca7bf2e9b - -ARG ARGO_CLI_VERSION=v3.4.5 -ARG ARGO_CLI_URL=https://github.com/argoproj/argo-workflows/releases/download/${ARGO_CLI_VERSION}/argo-linux-amd64.gz -ARG ARGO_CLI_SHA=0528ff0c0aa87a3f150376eee2f1b26e8b41eb96578c43d715c906304627d3a1 - -RUN \ - # OpenJDK-8 - apt-get update && \ - apt-get install -y openjdk-8-jre && \ - apt-get clean && \ - fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER \ - && \ - # kubectl - curl -LO "${KUBECTL_URL}" \ - && echo "${KUBECTL_SHA} kubectl" | sha256sum -c - \ - && chmod +x ./kubectl \ - && sudo mv ./kubectl /usr/local/bin/kubectl \ - && \ - # AzureCLI - installation script from Azure - curl -sLO "${AZCLI_URL}" \ - && bash InstallAzureCLIDeb \ - && rm InstallAzureCLIDeb \ - && echo "azcli: ok" \ - && \ - # zsh - wget -q "${OH_MY_ZSH_URL}" -O /tmp/oh-my-zsh-install.sh \ - && echo "${OH_MY_ZSH_SHA} /tmp/oh-my-zsh-install.sh" | sha256sum -c \ - && echo "oh-my-zsh: ok" \ - && \ - # trino cli - wget -q "${TRINO_URL}" -O /tmp/trino-original \ - && echo ${TRINO_SHA} /tmp/trino-original | sha256sum -c \ - && echo "trinocli: ok" \ - && chmod +x /tmp/trino-original \ - && sudo mv /tmp/trino-original /usr/local/bin/trino-original \ - && \ - # argo cli - curl -sLO ${ARGO_CLI_URL}\ - && echo "${ARGO_CLI_SHA} argo-linux-amd64.gz" | sha256sum -c - \ - && gunzip argo-linux-amd64.gz \ - && chmod +x argo-linux-amd64 \ - && sudo mv ./argo-linux-amd64 /usr/local/bin/argo \ - && argo version - -ARG GIT_CRED_MANAGER_VERSION=2.5.1 -ARG GIT_CRED_MANAGER_URL=https://github.com/git-ecosystem/git-credential-manager/releases/download/v${GIT_CRED_MANAGER_VERSION}/gcm-linux_amd64.${GIT_CRED_MANAGER_VERSION}.deb -ARG GIT_CRED_MANAGER_SHA=03c7b174a6f90e1ae860980ba5fda4490f04e5b9aaa802e2d469e72ec5dae6a4 - -RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \ - && echo "${GIT_CRED_MANAGER_SHA} ./gcm.deb" | sha256sum -c - \ - && dpkg -i ./gcm.deb \ - && rm ./gcm.deb - -############################### -### docker-bits/6_remote-desktop.Dockerfile -############################### - -USER root - -ENV NB_UID=1000 -ENV NB_GID=100 -ENV XDG_DATA_HOME=/etc/share -ENV VSCODE_DIR=$XDG_DATA_HOME/code -ENV VSCODE_EXTENSIONS=$VSCODE_DIR/extensions - -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -y update \ - && apt-get install -y dbus-x11 \ - xfce4 \ - xfce4-panel \ - xfce4-session \ - xfce4-settings \ - xorg \ - xubuntu-icon-theme \ - && clean-layer.sh - -ENV RESOURCES_PATH="/resources" -RUN mkdir $RESOURCES_PATH - -# Copy installation scripts -COPY remote-desktop $RESOURCES_PATH - -# Install the French Locale. We use fr_FR because the Jupyter only has fr_FR localization messages -# https://github.com/jupyter/notebook/tree/master/notebook/i18n/fr_FR/LC_MESSAGES -RUN \ - apt-get update && \ - apt-get install -y locales && \ - sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ - locale-gen && \ - dpkg-reconfigure --frontend=noninteractive locales && \ - apt-get install -y language-pack-fr-base && \ - #Needed for right click functions - apt-get install -y language-pack-gnome-fr && \ - clean-layer.sh - -# Install Terminal / GDebi (Package Manager) / & archive tools -RUN \ - apt-get update && \ - # Configuration database - required by git kraken / atom and other tools (1MB) - apt-get install -y --no-install-recommends gconf2 && \ - apt-get install -y --no-install-recommends xfce4-terminal && \ - apt-get install -y --no-install-recommends --allow-unauthenticated xfce4-taskmanager && \ - # Install gdebi deb installer - apt-get install -y --no-install-recommends gdebi && \ - # Search for files - apt-get install -y --no-install-recommends catfish && \ - # vs support for thunar - apt-get install -y thunar-vcs-plugin && \ - apt-get install -y --no-install-recommends baobab && \ - # Lightweight text editor - apt-get install -y mousepad && \ - apt-get install -y --no-install-recommends vim && \ - # Process monitoring - apt-get install -y htop && \ - # Install Archive/Compression Tools: https://wiki.ubuntuusers.de/Archivmanager/ - apt-get install -y p7zip p7zip-rar && \ - apt-get install -y --no-install-recommends thunar-archive-plugin && \ - apt-get install -y xarchiver && \ - # DB Utils - apt-get install -y --no-install-recommends sqlitebrowser && \ - # Install nautilus and support for sftp mounting - apt-get install -y --no-install-recommends nautilus gvfs-backends && \ - # Install gigolo - Access remote systems - apt-get install -y --no-install-recommends gigolo gvfs-bin && \ - # xfce systemload panel plugin - needs to be activated - apt-get install -y --no-install-recommends xfce4-systemload-plugin && \ - # Leightweight ftp client that supports sftp, http, ... - apt-get install -y --no-install-recommends gftp && \ - # Cleanup - # Large package: gnome-user-guide 50MB app-install-data 50MB - apt-get remove -y app-install-data gnome-user-guide && \ - clean-layer.sh - -#None of these are installed in upstream docker images but are present in current remote -RUN \ - apt-get update --fix-missing && \ - apt-get install -y sudo apt-utils && \ - apt-get upgrade -y && \ - apt-get install -y --no-install-recommends \ - # This is necessary for apt to access HTTPS sources: - apt-transport-https \ - gnupg-agent \ - gpg-agent \ - gnupg2 \ - ca-certificates \ - build-essential \ - pkg-config \ - software-properties-common \ - lsof \ - net-tools \ - libcurl4 \ - curl \ - wget \ - cron \ - openssl \ - iproute2 \ - psmisc \ - tmux \ - dpkg-sig \ - uuid-dev \ - csh \ - xclip \ - clinfo \ - libgdbm-dev \ - libncurses5-dev \ - gawk \ - # Simplified Wrapper and Interface Generator (5.8MB) - required by lots of py-libs - swig \ - # Graphviz (graph visualization software) (4MB) - graphviz libgraphviz-dev \ - # Terminal multiplexer - screen \ - # Editor - nano \ - # Find files, already have catfish remove? - locate \ - # XML Utils - xmlstarlet \ - # R*-tree implementation - Required for earthpy, geoviews (3MB) - libspatialindex-dev \ - # Search text and binary files - yara \ - # Minimalistic C client for Redis - libhiredis-dev \ - libleptonica-dev \ - # GEOS library (3MB) - libgeos-dev \ - # style sheet preprocessor - less \ - # Print dir tree - tree \ - # Bash autocompletion functionality - bash-completion \ - # ping support - iputils-ping \ - # Json Processor - jq \ - rsync \ - # VCS: - subversion \ - jed \ - git \ - git-gui \ - # odbc drivers - unixodbc unixodbc-dev \ - # Image support - libtiff-dev \ - libjpeg-dev \ - libpng-dev \ - # protobuffer support - protobuf-compiler \ - libprotobuf-dev \ - libprotoc-dev \ - autoconf \ - automake \ - libtool \ - cmake \ - fonts-liberation \ - google-perftools \ - # Compression Libs - zip \ - gzip \ - unzip \ - bzip2 \ - lzop \ - libarchive-tools \ - zlibc \ - # unpack (almost) everything with one command - unp \ - libbz2-dev \ - liblzma-dev \ - zlib1g-dev && \ - # configure dynamic linker run-time bindings - ldconfig && \ - # Fix permissions - fix-permissions && \ - # Cleanup - clean-layer.sh - -RUN pip3 install --quiet 'selenium' && \ - fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER - -#Install geckodriver -RUN wget --quiet https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-linux64.tar.gz -O /tmp/geckodriver-v0.28.0-linux64.tar.gz && \ - tar -xf /tmp/geckodriver-v0.28.0-linux64.tar.gz -C /tmp/ && \ - chmod +x /tmp/geckodriver && \ - mv /tmp/geckodriver /usr/bin/geckodriver && \ - rm /tmp/geckodriver-v0.28.0-linux64.tar.gz && \ - clean-layer.sh - -# Install Firefox -RUN /bin/bash $RESOURCES_PATH/firefox.sh --install && \ - # Cleanup - clean-layer.sh - -#Copy the French language pack file, must be the 86 version -RUN wget https://addons.mozilla.org/firefox/downloads/file/3731010/francais_language_pack-86.0buildid20210222142601-fx.xpi -O langpack-fr@firefox.mozilla.org.xpi && \ - mkdir --parents /usr/lib/firefox/distribution/extensions/ && \ - mv langpack-fr@firefox.mozilla.org.xpi /usr/lib/firefox/distribution/extensions/ - -#Configure and set up Firefox to start up in a specific language (depends on LANG env variable) -COPY French/Firefox/autoconfig.js /usr/lib/firefox/defaults/pref/ -COPY French/Firefox/firefox.cfg /usr/lib/firefox/ - - -#Install VsCode -RUN apt-get update --yes \ - && apt-get install --yes nodejs npm \ - && /bin/bash $RESOURCES_PATH/vs-code-desktop.sh --install \ - && clean-layer.sh - -# Install Visual Studio Code extensions -# https://github.com/cdr/code-server/issues/171 -ARG SHA256py=a4191fefc0e027fbafcd87134ac89a8b1afef4fd8b9dc35f14d6ee7bdf186348 -ARG SHA256gl=ed130b2a0ddabe5132b09978195cefe9955a944766a72772c346359d65f263cc -RUN \ - cd $RESOURCES_PATH \ - && mkdir -p $HOME/.local/share \ - && mkdir -p $VSCODE_DIR/extensions \ - && VS_PYTHON_VERSION="2020.5.86806" \ - && wget --quiet --no-check-certificate https://github.com/microsoft/vscode-python/releases/download/$VS_PYTHON_VERSION/ms-python-release.vsix \ - && echo "${SHA256py} ms-python-release.vsix" | sha256sum -c - \ - && bsdtar -xf ms-python-release.vsix extension \ - && rm ms-python-release.vsix \ - && mv extension $VSCODE_DIR/extensions/ms-python.python-$VS_PYTHON_VERSION \ - && VS_FRENCH_VERSION="1.68.3" \ - && VS_LOCALE_REPO_VERSION="1.68.3" \ - && git clone -b release/$VS_LOCALE_REPO_VERSION https://github.com/microsoft/vscode-loc.git \ - && cd vscode-loc \ - && npm install -g --unsafe-perm vsce@1.103.1 \ - && cd i18n/vscode-language-pack-fr \ - && vsce package \ - && bsdtar -xf vscode-language-pack-fr-$VS_FRENCH_VERSION.vsix extension \ - && mv extension $VSCODE_DIR/extensions/ms-ceintl.vscode-language-pack-fr-$VS_FRENCH_VERSION \ - && cd ../../../ \ - # -fr option is required. git clone protects the directory and cannot delete it without -fr - && rm -fr vscode-loc \ - && npm uninstall -g vsce \ - && fix-permissions $XDG_DATA_HOME \ - && clean-layer.sh - -#QGIS -COPY qgis-2022.gpg.key $RESOURCES_PATH/qgis-2022.gpg.key -COPY remote-desktop/qgis.sh $RESOURCES_PATH/qgis.sh -RUN /bin/bash $RESOURCES_PATH/qgis.sh \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists - -#R-Studio -RUN /bin/bash $RESOURCES_PATH/r-studio-desktop.sh && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists - -#Libre office -RUN add-apt-repository ppa:libreoffice/ppa && \ - apt-get install -y eog && \ - apt-get install -y libreoffice libreoffice-gtk3 && \ - apt-get install -y libreoffice-help-fr libreoffice-l10n-fr && \ - clean-layer.sh - -#Install PSPP -RUN /bin/bash $RESOURCES_PATH/pspp.sh \ - && clean-layer.sh - -#Install Minio -COPY minio-icon.png $RESOURCES_PATH/minio-icon.png -COPY remote-desktop/minio-launch.py /usr/bin/minio-launch.py - -# Install OpenM++ -ENV OMPP_VERSION="1.15.6" -# IMPORTANT: Don't forget to update the version number in the openmpp.desktop file!! -ENV OMPP_PKG_DATE="20231115" -ARG SHA256ompp=75372202c66f31c0b8d7c87967bdf7c75c300858841d10dad0b4230887de6856 -# OpenM++ environment settings -ENV OMPP_USER=$NB_USER -ENV OMPP_GROUP=100 -ENV OMPP_UID=$NB_UID -ENV OMPP_GID=$NB_GID -# OpenM++ expects sqlite to be installed (not just libsqlite) -RUN apt-get update --yes \ - && apt-get install --yes sqlite3 \ - && wget https://github.com/openmpp/main/releases/download/v${OMPP_VERSION}/openmpp_debian-11_${OMPP_PKG_DATE}.tar.gz -O /tmp/ompp.tar.gz \ - && echo "${SHA256ompp} /tmp/ompp.tar.gz" | sha256sum -c - \ - && tar -xf /tmp/ompp.tar.gz -C /tmp/ \ - && mkdir /opt/openmpp \ - && mv /tmp/openmpp_debian-11_${OMPP_PKG_DATE} /opt/openmpp/${OMPP_VERSION} \ - && chown -R $NB_UID:$NB_GID /opt/openmpp -# Copy the desktop icon into place for the web UI -COPY openmpp.png $RESOURCES_PATH/openmpp.png - -#Copy over french config for vscode -#Both of these are required to have the language pack be recognized on install. -COPY French/vscode/argv.json /home/$NB_USER/.vscode/ -COPY French/vscode/languagepacks.json /home/$NB_USER/.config/Code/ - -#Tiger VNC -ARG SHA256tigervnc=fb8f94a5a1d77de95ec8fccac26cb9eaa9f9446c664734c68efdffa577f96a31 -RUN \ - cd ${RESOURCES_PATH} && \ - wget --quiet https://sourceforge.net/projects/tigervnc/files/stable/1.10.1/tigervnc-1.10.1.x86_64.tar.gz/ -O /tmp/tigervnc.tar.gz && \ - echo "${SHA256tigervnc} /tmp/tigervnc.tar.gz" | sha256sum -c - && \ - tar xzf /tmp/tigervnc.tar.gz --strip 1 -C / && \ - rm /tmp/tigervnc.tar.gz && \ - clean-layer.sh - -#MISC Configuration Area -#Copy over desktop files. First location is dropdown, then desktop, and make them executable -COPY /desktop-files /usr/share/applications -COPY /desktop-files $RESOURCES_PATH/desktop-files - -#Copy over French Language files -COPY French/mo-files/ /usr/share/locale/fr/LC_MESSAGES - -#Configure the panel -# Done at runtime -# COPY ./desktop-files/.config/xfce4/xfce4-panel.xml /home/jovyan/.config/xfce4/xfconf/xfce-perchannel-xml/ - -#Removal area -#Extra Icons -RUN rm /usr/share/applications/exo-mail-reader.desktop -#Prevent screen from locking -RUN apt-get remove -y -q light-locker - - -# apt-get may result in root-owned directories/files under $HOME -RUN usermod -l $NB_USER rstudio && \ - chown -R $NB_UID:$NB_GID $HOME - -ENV NB_USER=$NB_USER -ENV NB_NAMESPACE=$NB_NAMESPACE -# https://github.com/novnc/websockify/issues/413#issuecomment-664026092 -RUN apt-get update && apt-get install --yes websockify \ - && cp /usr/lib/websockify/rebind.cpython-38-x86_64-linux-gnu.so /usr/lib/websockify/rebind.so \ - && clean-layer.sh - - -#Set Defaults -ENV HOME=/home/$NB_USER -COPY /novnc $RESOURCES_PATH/novnc -ARG NO_VNC_VERSION=1.3.0 -ARG NO_VNC_SHA=ee8f91514c9ce9f4054d132f5f97167ee87d9faa6630379267e569d789290336 -RUN pip3 install --force websockify==0.9.0 \ - && wget https://github.com/novnc/noVNC/archive/refs/tags/v${NO_VNC_VERSION}.tar.gz -O /tmp/novnc.tar.gz \ - && echo "${NO_VNC_SHA} /tmp/novnc.tar.gz" | sha256sum -c - \ - && tar -xf /tmp/novnc.tar.gz -C /tmp/ \ - && mv /tmp/noVNC-${NO_VNC_VERSION} /opt/novnc \ - && rm /tmp/novnc.tar.gz \ - && mv ${RESOURCES_PATH}/novnc/ui.js /opt/novnc/app/ui.js \ - && mv ${RESOURCES_PATH}/novnc/vnc_lite.html /opt/novnc/vnc_lite.html \ - && chown -R $NB_UID:$NB_GID /opt/novnc - -COPY --chown=$NB_USER:100 canada.ico $RESOURCES_PATH/favicon.ico - -USER root -RUN apt-get update --yes \ - && apt-get install --yes nginx \ - && chown -R $NB_USER:100 /var/log/nginx \ - && chown $NB_USER:100 /etc/nginx \ - && chmod -R 755 /var/log/nginx \ - && rm -rf /var/lib/apt/lists/* -RUN chown -R $NB_USER /home/$NB_USER -USER $NB_USER -COPY --chown=$NB_USER:100 nginx.conf /etc/nginx/nginx.conf - -USER root - - -############################### -### docker-bits/7_remove_vulnerabilities.Dockerfile -############################### - -# Remove libpdfbox-java due to CVE-2019-0228. See https://github.com/StatCan/aaw-kubeflow-containers/issues/249#issuecomment-834808115 for details. -# Issue opened https://github.com/jupyter/docker-stacks/issues/1299. -# This line of code should be removed once a solution or better alternative is found. -USER root -RUN apt-get update --yes \ - && dpkg -r --force-depends libpdfbox-java \ - && rm -rf /var/lib/apt/lists/* - -# Forcibly upgrade packages to patch vulnerabilities -# See https://github.com/StatCan/aaw-private/issues/58#issuecomment-1471863092 for more details. -RUN pip3 --no-cache-dir install --quiet \ - 'wheel==0.40.0' \ - 'setuptools==67.6.0' \ - 'pyjwt==2.6.0' \ - 'oauthlib==3.2.2' \ - 'mpmath==1.3.0' \ - 'lxml==4.9.2' \ - 'pyarrow==14.0.1' \ - 'cryptography==41.0.6' \ - && fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER - -USER $NB_USER - -############################### -### docker-bits/8_platform.Dockerfile -############################### - -USER root - -# Install AMD AOCL -ARG AOCL_VERSION=4.0 -ENV AOCL_PATH=/opt/amd/aocl/${AOCL_VERSION} -ARG AOCL_SHA256=8a249e727beb8005639b4887074e1ea75020267ed1ac25520876a7ad21d0f4f6 -RUN cd ${RESOURCES_PATH} && \ - wget --quiet https://download.amd.com/developer/eula/aocl/aocl-4-0/aocl-linux-aocc-${AOCL_VERSION}.tar.gz -O /tmp/aocl-linux-aocc-${AOCL_VERSION}.tar && \ - echo "${AOCL_SHA256} /tmp/aocl-linux-aocc-${AOCL_VERSION}.tar" | sha256sum -c - && \ - tar xf /tmp/aocl-linux-aocc-${AOCL_VERSION}.tar -C ./ && \ - cd ./aocl-linux-aocc-${AOCL_VERSION} && \ - /bin/bash ./install.sh -t /opt/amd/aocl && \ - cp setenv_aocl.sh ${AOCL_PATH} &&\ - rm /tmp/aocl-linux-aocc-${AOCL_VERSION}.tar - -# Install AMD AOCC -ARG AOCC_VERSION=4.0.0 -ARG AOCC_SHA256=2729ec524cbc927618e479994330eeb72df5947e90cfcc49434009eee29bf7d4 -RUN cd ${RESOURCES_PATH} && \ - wget --quiet https://download.amd.com/developer/eula/aocc-compiler/aocc-compiler-${AOCC_VERSION}.tar -O /tmp/aocc-compiler-${AOCC_VERSION}.tar && \ - echo "${AOCC_SHA256} /tmp/aocc-compiler-${AOCC_VERSION}.tar" | sha256sum -c - && \ - tar xf /tmp/aocc-compiler-${AOCC_VERSION}.tar -C ./ && \ - cd ./aocc-compiler-${AOCC_VERSION} && \ - /bin/bash ./install.sh && \ - rm /tmp/aocc-compiler-${AOCC_VERSION}.tar - -############################### -### docker-bits/∞_CMD_remote-desktop.Dockerfile -############################### - -# Configure container startup - -USER root - -WORKDIR /home/$NB_USER -EXPOSE 8888 -COPY start-remote-desktop.sh /usr/local/bin/ -COPY trino-wrapper.sh /usr/local/bin/trino - -RUN chmod +x /usr/local/bin/trino -RUN chsh -s /bin/bash $NB_USER - -# Add --user to all pip install calls and point pip to Artifactory repository -COPY pip.conf /tmp/pip.conf -RUN cat /tmp/pip.conf >> /etc/pip.conf && rm /tmp/pip.conf \ - && pip config set global.timeout 300 - -# Point conda to Artifactory repository -COPY .condarc /tmp/.condarc -RUN cat /tmp/.condarc > /opt/conda/.condarc && rm /tmp/.condarc - -# Point R to Artifactory repository -COPY Rprofile.site /tmp/Rprofile.site -RUN cat /tmp/Rprofile.site >> /usr/local/lib/R/etc/Rprofile.site && rm /tmp/Rprofile.site - -# Removal area -# Prevent screen from locking -RUN apt-get remove -y -q light-locker xfce4-screensaver \ - && apt-get autoremove -y - -USER $NB_USER -ENTRYPOINT ["tini", "--"] -CMD ["start-remote-desktop.sh"] diff --git a/output/remote-desktop/French/Firefox/autoconfig.js b/output/remote-desktop/French/Firefox/autoconfig.js deleted file mode 100644 index 7c6fba9c2..000000000 --- a/output/remote-desktop/French/Firefox/autoconfig.js +++ /dev/null @@ -1,2 +0,0 @@ -pref("general.config.filename", "firefox.cfg"); -pref("general.config.obscure_value", 0); diff --git a/output/remote-desktop/French/Firefox/firefox.cfg b/output/remote-desktop/French/Firefox/firefox.cfg deleted file mode 100644 index 23c99f5e6..000000000 --- a/output/remote-desktop/French/Firefox/firefox.cfg +++ /dev/null @@ -1,3 +0,0 @@ -// IMPORTANT: Start your code on 2nd line https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig -var user = getenv("LANG"); -pref("intl.locale.requested", user.substring(0,2)); diff --git a/output/remote-desktop/French/mo-files/apt.mo b/output/remote-desktop/French/mo-files/apt.mo deleted file mode 100644 index cd60b8d8c..000000000 Binary files a/output/remote-desktop/French/mo-files/apt.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/baobab.mo b/output/remote-desktop/French/mo-files/baobab.mo deleted file mode 100644 index 1d76674e0..000000000 Binary files a/output/remote-desktop/French/mo-files/baobab.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/catfish.mo b/output/remote-desktop/French/mo-files/catfish.mo deleted file mode 100644 index a92ca26da..000000000 Binary files a/output/remote-desktop/French/mo-files/catfish.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/dpkg.mo b/output/remote-desktop/French/mo-files/dpkg.mo deleted file mode 100644 index f0d2114e7..000000000 Binary files a/output/remote-desktop/French/mo-files/dpkg.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/e2fsprogs.mo b/output/remote-desktop/French/mo-files/e2fsprogs.mo deleted file mode 100644 index f5a732a20..000000000 Binary files a/output/remote-desktop/French/mo-files/e2fsprogs.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/eog.mo b/output/remote-desktop/French/mo-files/eog.mo deleted file mode 100644 index 1c62065d7..000000000 Binary files a/output/remote-desktop/French/mo-files/eog.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/exo-1.mo b/output/remote-desktop/French/mo-files/exo-1.mo deleted file mode 100644 index fb104ef3e..000000000 Binary files a/output/remote-desktop/French/mo-files/exo-1.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/garcon.mo b/output/remote-desktop/French/mo-files/garcon.mo deleted file mode 100644 index 6acf41aa5..000000000 Binary files a/output/remote-desktop/French/mo-files/garcon.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/gdebi.mo b/output/remote-desktop/French/mo-files/gdebi.mo deleted file mode 100644 index 425dcdd05..000000000 Binary files a/output/remote-desktop/French/mo-files/gdebi.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/gftp.mo b/output/remote-desktop/French/mo-files/gftp.mo deleted file mode 100644 index a473f4b7d..000000000 Binary files a/output/remote-desktop/French/mo-files/gftp.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/gigolo.mo b/output/remote-desktop/French/mo-files/gigolo.mo deleted file mode 100644 index bc91c35b8..000000000 Binary files a/output/remote-desktop/French/mo-files/gigolo.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/libapt-inst2.0.mo b/output/remote-desktop/French/mo-files/libapt-inst2.0.mo deleted file mode 100644 index f6587eb8b..000000000 Binary files a/output/remote-desktop/French/mo-files/libapt-inst2.0.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/libapt-pkg5.0.mo b/output/remote-desktop/French/mo-files/libapt-pkg5.0.mo deleted file mode 100644 index ee09db194..000000000 Binary files a/output/remote-desktop/French/mo-files/libapt-pkg5.0.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/libwnck.mo b/output/remote-desktop/French/mo-files/libwnck.mo deleted file mode 100644 index 340013fcd..000000000 Binary files a/output/remote-desktop/French/mo-files/libwnck.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/libxfce4ui.mo b/output/remote-desktop/French/mo-files/libxfce4ui.mo deleted file mode 100644 index 340756420..000000000 Binary files a/output/remote-desktop/French/mo-files/libxfce4ui.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/libxfce4util.mo b/output/remote-desktop/French/mo-files/libxfce4util.mo deleted file mode 100644 index 5edac1b75..000000000 Binary files a/output/remote-desktop/French/mo-files/libxfce4util.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/mousepad.mo b/output/remote-desktop/French/mo-files/mousepad.mo deleted file mode 100644 index 4f6fd4643..000000000 Binary files a/output/remote-desktop/French/mo-files/mousepad.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/orage.mo b/output/remote-desktop/French/mo-files/orage.mo deleted file mode 100644 index 3ea2a832b..000000000 Binary files a/output/remote-desktop/French/mo-files/orage.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/pavucontrol.mo b/output/remote-desktop/French/mo-files/pavucontrol.mo deleted file mode 100644 index c84caeb9e..000000000 Binary files a/output/remote-desktop/French/mo-files/pavucontrol.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/pspp.mo b/output/remote-desktop/French/mo-files/pspp.mo deleted file mode 100644 index 6fbc2f5be..000000000 Binary files a/output/remote-desktop/French/mo-files/pspp.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/thunar-archive-plugin.mo b/output/remote-desktop/French/mo-files/thunar-archive-plugin.mo deleted file mode 100644 index f2fa438c3..000000000 Binary files a/output/remote-desktop/French/mo-files/thunar-archive-plugin.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/thunar-vcs-plugin.mo b/output/remote-desktop/French/mo-files/thunar-vcs-plugin.mo deleted file mode 100644 index 77372efa0..000000000 Binary files a/output/remote-desktop/French/mo-files/thunar-vcs-plugin.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/thunar-volman.mo b/output/remote-desktop/French/mo-files/thunar-volman.mo deleted file mode 100644 index c5be24066..000000000 Binary files a/output/remote-desktop/French/mo-files/thunar-volman.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/thunar.mo b/output/remote-desktop/French/mo-files/thunar.mo deleted file mode 100644 index 2f0f14654..000000000 Binary files a/output/remote-desktop/French/mo-files/thunar.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/tigervnc.mo b/output/remote-desktop/French/mo-files/tigervnc.mo deleted file mode 100644 index df1caed98..000000000 Binary files a/output/remote-desktop/French/mo-files/tigervnc.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/tumbler.mo b/output/remote-desktop/French/mo-files/tumbler.mo deleted file mode 100644 index aaae74103..000000000 Binary files a/output/remote-desktop/French/mo-files/tumbler.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/unp.mo b/output/remote-desktop/French/mo-files/unp.mo deleted file mode 100644 index 91486b62c..000000000 Binary files a/output/remote-desktop/French/mo-files/unp.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xarchiver.mo b/output/remote-desktop/French/mo-files/xarchiver.mo deleted file mode 100644 index c8c2a4eba..000000000 Binary files a/output/remote-desktop/French/mo-files/xarchiver.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xdg-user-dirs.mo b/output/remote-desktop/French/mo-files/xdg-user-dirs.mo deleted file mode 100644 index fc14f7065..000000000 Binary files a/output/remote-desktop/French/mo-files/xdg-user-dirs.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-appfinder.mo b/output/remote-desktop/French/mo-files/xfce4-appfinder.mo deleted file mode 100644 index 0ef48a8fb..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-appfinder.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-notifyd.mo b/output/remote-desktop/French/mo-files/xfce4-notifyd.mo deleted file mode 100644 index 566f10859..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-notifyd.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-panel.mo b/output/remote-desktop/French/mo-files/xfce4-panel.mo deleted file mode 100644 index 80a7e8f4e..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-panel.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-session.mo b/output/remote-desktop/French/mo-files/xfce4-session.mo deleted file mode 100644 index fd7d1507d..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-session.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-settings.mo b/output/remote-desktop/French/mo-files/xfce4-settings.mo deleted file mode 100644 index 4f717ec83..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-settings.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo b/output/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo deleted file mode 100644 index e272924e0..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-taskmanager.mo b/output/remote-desktop/French/mo-files/xfce4-taskmanager.mo deleted file mode 100644 index 1bb820b1e..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-taskmanager.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfce4-terminal.mo b/output/remote-desktop/French/mo-files/xfce4-terminal.mo deleted file mode 100644 index 826bb49a1..000000000 Binary files a/output/remote-desktop/French/mo-files/xfce4-terminal.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfconf.mo b/output/remote-desktop/French/mo-files/xfconf.mo deleted file mode 100644 index 15be68c41..000000000 Binary files a/output/remote-desktop/French/mo-files/xfconf.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfdesktop.mo b/output/remote-desktop/French/mo-files/xfdesktop.mo deleted file mode 100644 index bafa98e5b..000000000 Binary files a/output/remote-desktop/French/mo-files/xfdesktop.mo and /dev/null differ diff --git a/output/remote-desktop/French/mo-files/xfwm4.mo b/output/remote-desktop/French/mo-files/xfwm4.mo deleted file mode 100644 index 30a09d596..000000000 Binary files a/output/remote-desktop/French/mo-files/xfwm4.mo and /dev/null differ diff --git a/output/remote-desktop/French/vscode/argv.json b/output/remote-desktop/French/vscode/argv.json deleted file mode 100644 index 618c748e9..000000000 --- a/output/remote-desktop/French/vscode/argv.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "locale":"en" -} diff --git a/output/remote-desktop/French/vscode/languagepacks.json b/output/remote-desktop/French/vscode/languagepacks.json deleted file mode 100644 index c2fe7609a..000000000 --- a/output/remote-desktop/French/vscode/languagepacks.json +++ /dev/null @@ -1,2 +0,0 @@ -{"fr":{"hash":"43334e1e218440bc8e2cc41185eed29b","extensions":[{"extensionIdentifier":{"id":"ms-ceintl.vscode-language-pack-fr","uuid":"MS-CEINTL.vscode-language-pack-fr"},"version":"1.50.2"}],"translations":{"vscode":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/main.i18n.json","vscode.bat":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/bat.i18n.json","vscode.clojure":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/clojure.i18n.json","vscode.coffeescript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/coffeescript.i18n.json","vscode.configuration-editing":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/configuration-editing.i18n.json","vscode.cpp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/cpp.i18n.json","vscode.csharp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/csharp.i18n.json","vscode.css-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/css-language-features.i18n.json","vscode.css":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/css.i18n.json","vscode.debug-auto-launch":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/debug-auto-launch.i18n.json","vscode.debug-server-ready":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/debug-server-ready.i18n.json","vscode.docker":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/docker.i18n.json","vscode.emmet":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/emmet.i18n.json","vscode.extension-editing":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/extension-editing.i18n.json","vscode.fsharp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/fsharp.i18n.json","vscode.git-ui":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/git-ui.i18n.json","vscode.git":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/git.i18n.json","vscode.github-authentication":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github-authentication.i18n.json","vscode.github-browser":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github-browser.i18n.json","vscode.github":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github.i18n.json","vscode.go":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/go.i18n.json","vscode.groovy":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/groovy.i18n.json","vscode.grunt":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/grunt.i18n.json","vscode.gulp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/gulp.i18n.json","vscode.handlebars":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/handlebars.i18n.json","vscode.hlsl":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/hlsl.i18n.json","vscode.html-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/html-language-features.i18n.json","vscode.html":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/html.i18n.json","vscode.image-preview":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/image-preview.i18n.json","vscode.ini":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ini.i18n.json","vscode.jake":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/jake.i18n.json","vscode.java":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/java.i18n.json","vscode.javascript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/javascript.i18n.json","vscode.json-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/json-language-features.i18n.json","vscode.json":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/json.i18n.json","vscode.less":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/less.i18n.json","vscode.log":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/log.i18n.json","vscode.lua":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/lua.i18n.json","vscode.make":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/make.i18n.json","vscode.markdown-basics":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/markdown-basics.i18n.json","vscode.markdown-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/markdown-language-features.i18n.json","vscode.merge-conflict":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/merge-conflict.i18n.json","vscode.microsoft-authentication":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/microsoft-authentication.i18n.json","vscode.ms-vscode.github-browser":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.github-browser.i18n.json","vscode.ms-vscode.js-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.js-debug.i18n.json","vscode.ms-vscode.node-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.node-debug.i18n.json","vscode.ms-vscode.node-debug2":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.node-debug2.i18n.json","vscode.npm":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/npm.i18n.json","vscode.objective-c":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/objective-c.i18n.json","vscode.perl":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/perl.i18n.json","vscode.php-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/php-language-features.i18n.json","vscode.php":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/php.i18n.json","vscode.powershell":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/powershell.i18n.json","vscode.pug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/pug.i18n.json","vscode.python":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/python.i18n.json","vscode.r":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/r.i18n.json","vscode.razor":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/razor.i18n.json","vscode.ruby":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ruby.i18n.json","vscode.rust":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/rust.i18n.json","vscode.scss":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/scss.i18n.json","vscode.search-result":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/search-result.i18n.json","vscode.shaderlab":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/shaderlab.i18n.json","vscode.shellscript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/shellscript.i18n.json","vscode.sql":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/sql.i18n.json","vscode.swift":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/swift.i18n.json","vscode.theme-abyss":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-abyss.i18n.json","vscode.theme-defaults":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-defaults.i18n.json","vscode.theme-kimbie-dark":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-kimbie-dark.i18n.json","vscode.theme-monokai-dimmed":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-monokai-dimmed.i18n.json","vscode.theme-monokai":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-monokai.i18n.json","vscode.theme-quietlight":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-quietlight.i18n.json","vscode.theme-red":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-red.i18n.json","vscode.theme-seti":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-seti.i18n.json","vscode.theme-solarized-dark":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-solarized-dark.i18n.json","vscode.theme-solarized-light":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-solarized-light.i18n.json","vscode.theme-tomorrow-night-blue":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-tomorrow-night-blue.i18n.json","vscode.typescript-basics":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/typescript-basics.i18n.json","vscode.typescript-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/typescript-language-features.i18n.json","vscode.vb":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vb.i18n.json","vscode.vscode-chrome-debug-core":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-chrome-debug-core.i18n.json","ms-vscode.node-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-node-debug.i18n.json","ms-vscode.node-debug2":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-node-debug2.i18n.json","vscode.xml":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/xml.i18n.json","vscode.yaml":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/yaml.i18n.json"}}} - diff --git a/output/remote-desktop/G-CONFID107003ELNX6494M7/G-Confid_LogAccess.ini b/output/remote-desktop/G-CONFID107003ELNX6494M7/G-Confid_LogAccess.ini deleted file mode 100644 index 088b30ff1..000000000 --- a/output/remote-desktop/G-CONFID107003ELNX6494M7/G-Confid_LogAccess.ini +++ /dev/null @@ -1 +0,0 @@ -HOST=NONE \ No newline at end of file diff --git a/output/remote-desktop/G-CONFID107003ELNX6494M7/sasmacr.sas7bcat b/output/remote-desktop/G-CONFID107003ELNX6494M7/sasmacr.sas7bcat deleted file mode 100644 index 5248dc712..000000000 Binary files a/output/remote-desktop/G-CONFID107003ELNX6494M7/sasmacr.sas7bcat and /dev/null differ diff --git a/output/remote-desktop/G-CONFID107003ELNX6494M7/sensitiv b/output/remote-desktop/G-CONFID107003ELNX6494M7/sensitiv deleted file mode 100644 index d9bfe795d..000000000 Binary files a/output/remote-desktop/G-CONFID107003ELNX6494M7/sensitiv and /dev/null differ diff --git a/output/remote-desktop/README.md b/output/remote-desktop/README.md deleted file mode 100644 index 0add74656..000000000 --- a/output/remote-desktop/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Remote-Desktop -`desktop-files` contains files that are copied to the 'desktop' to provide information on the icons as well -as any other information such as how the xfce4 panel should look. - -`French` contains configuration and translation files necessary for the i18n of remote desktop. `mo-files` contains translations -for the applications, while `Firefox` and `vscode` require extra installations and configuration (ie not set by ENV variables) - -`qgis-2022.gpg.key` is used by qgis.sh to aid in installing qgis, this key expires on Aug 8, 2023 and will need to be rotated ex. https://github.com/StatCan/aaw-kubeflow-containers/pull/378 - -`start-remote-desktop.sh` a more custom version of `start-custom.sh` as it also sets -the other ENV variables of `LC_ALL` and `LANGUAGE` and modifies the vscode json file to set the preferred locale. diff --git a/output/remote-desktop/Rprofile.site b/output/remote-desktop/Rprofile.site deleted file mode 100644 index 9665a2bfc..000000000 --- a/output/remote-desktop/Rprofile.site +++ /dev/null @@ -1,4 +0,0 @@ -local({ - r <- list("dev-cran-remote" = "https://artifactory.cloud.statcan.ca/artifactory/cran-remote/") - options(repos = r) -}) diff --git a/output/remote-desktop/canada.ico b/output/remote-desktop/canada.ico deleted file mode 100644 index 1eeda6d8a..000000000 Binary files a/output/remote-desktop/canada.ico and /dev/null differ diff --git a/output/remote-desktop/clean-layer.sh b/output/remote-desktop/clean-layer.sh deleted file mode 100755 index ae31dc3a3..000000000 --- a/output/remote-desktop/clean-layer.sh +++ /dev/null @@ -1,41 +0,0 @@ - -#!/bin/bash -# -# This scripts should be called at the end of each RUN command -# in the Dockerfiles. -# -# Each RUN command creates a new layer that is stored separately. -# At the end of each command, we should ensure we clean up downloaded -# archives and source files used to produce binary to reduce the size -# of the layer. -set -e -set -x - -# Delete old downloaded archive files -apt-get autoremove -y -# Delete downloaded archive files -apt-get clean -# Delete source files used for building binaries -rm -rf /usr/local/src/* -# Delete cache and temp folders -rm -rf /tmp/* /var/tmp/* $HOME/.cache/* /var/cache/apt/* -# Remove apt lists -rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* - -# Clean conda -if [ -x "$(command -v mamba)" ]; then - # Full Conda Cleanup - mamba clean --all -f -y - # Remove source cache files - if [ -d $CONDA_DIR ]; then - # Cleanup python bytecode files - not needed: https://jcrist.github.io/conda-docker-tips.html - find $CONDA_DIR -type f -name '*.pyc' -delete - find $CONDA_DIR -type l -name '*.pyc' -delete - fi -fi - -# Clean npm -if [ -x "$(command -v npm)" ]; then - npm cache clean --force - rm -rf $HOME/.npm/* $HOME/.node-gyp/* -fi \ No newline at end of file diff --git a/output/remote-desktop/coder.json b/output/remote-desktop/coder.json deleted file mode 100644 index 3b4396d3d..000000000 --- a/output/remote-desktop/coder.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "query": { - "folder": "/home/jovyan/workspace" - } -} \ No newline at end of file diff --git a/output/remote-desktop/connect-to-filer.md b/output/remote-desktop/connect-to-filer.md deleted file mode 100644 index 041d552a2..000000000 --- a/output/remote-desktop/connect-to-filer.md +++ /dev/null @@ -1,35 +0,0 @@ -Welcome! These are instructions to connect to your filer. -To connect to the filer we make use of the minio client as seen here https://min.io/docs/minio/linux/reference/minio-mc.html - -## Connecting to the Filer -To connect to your filer, you will need the following, the URL, the ACCESS KEY, and the SECRET KEY. All of these can be found in a secret in your namespace. - -You will have a secret for each filer and share you have access to. You can view this by executing `kubectl get secrets -ns $NB_NAMESPACE` -NB_NAMESPACE is an environment variable that contains your notebook namespace - -This will produce a list of secrets. Your filer related secrets should look something like; -`fld9filer-conn-secret` - -Now that you know which secret you want, you can get the values needed by executing -`S3_URL=$(kubectl get secret fld9filer-conn-secret -n $NB_NAMESPACE -o jsonpath='{.data.S3_URL}' | base64 --decode)` -`S3_ACCESS=$(kubectl get secret fld9filer-conn-secret -n $NB_NAMESPACE -o jsonpath='{.data.S3_ACCESS}' | base64 --decode)` -`S3_SECRET=$(kubectl get secret fld9filer-conn-secret -n $NB_NAMESPACE -o jsonpath='{.data.S3_SECRET}' | base64 --decode)` - -## Setting your bucket alias -You must create an alias for `mc` to use when referring to the bucket to perform actions. -Using the information from the previous step run the following in the terminal; -`mc alias $nameofChoice $S3_URL $S3_ACCESS $S3_SECRET` The $nameOfChoice is up to you, but I would suggest you choose the name of the filer or share at which this account was created. -In this case, the account will be created at the fld9filer level so my command looked like; -`mc alias fld9filer $S3_URL $S3_ACCESS $S3_SECRET` - - -## Copying files to and from the filer -Your command will look like a regular `cp` command where the first argument is SOURCE and the second is DESTINATION except with `mc` in front of it. -For example -`mc cp fld9filer/s3bucket/Q1/Samsung.txt ~/LocalSamsung.txt --insecure` -Will provide -``` -jovyan@pat-jl-testing:~$ mc cp fld9filer/s3bucket/Q1/Samsung.txt ~/LocalSamsung.txt --insecure -...ca/s3bucket/Q1/Samsung.txt: 32 B / 32 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 81 B/s 0s(base) jovyan@pat-jl-testing:~$ ls -LocalSamsung.txt -``` \ No newline at end of file diff --git a/output/remote-desktop/desktop-files/.config/mimeapps.list b/output/remote-desktop/desktop-files/.config/mimeapps.list deleted file mode 100644 index cd1d4caa7..000000000 --- a/output/remote-desktop/desktop-files/.config/mimeapps.list +++ /dev/null @@ -1,9 +0,0 @@ -[Default Applications] -text/plain=code.desktop; -application/pdf=firefox.desktop -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop -[Added Associations] -application/pdf=userapp-firefox-Y32KO0.desktop;firefox.desktop; -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop diff --git a/output/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml b/output/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml deleted file mode 100644 index 5e9e4c422..000000000 --- a/output/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/output/remote-desktop/desktop-files/code.desktop b/output/remote-desktop/desktop-files/code.desktop deleted file mode 100644 index 83b37810f..000000000 --- a/output/remote-desktop/desktop-files/code.desktop +++ /dev/null @@ -1,21 +0,0 @@ -[Desktop Entry] -Name=Visual Studio Code -Comment=Code Editing. Redefined. -Comment[fr]=Modification du code. Redéfini -GenericName=Text Editor -Exec=/usr/share/code/code --no-sandbox --unity-launch %F -Icon=/usr/share/code/resources/app/resources/linux/code.png -Type=Application -StartupNotify=false -StartupWMClass=Code -Categories=Utility;TextEditor;Development;IDE; -MimeType=text/plain;inode/directory; -Actions=new-empty-window; -Keywords=vscode; - -X-Desktop-File-Install-Version=0.23 - -[Desktop Action new-empty-window] -Name=New Empty Window -Exec=/usr/share/code/code --no-sandbox --new-window %F -Icon=/usr/share/code/resources/app/resources/linux/code.png diff --git a/output/remote-desktop/desktop-files/firefox.desktop b/output/remote-desktop/desktop-files/firefox.desktop deleted file mode 100644 index 393749645..000000000 --- a/output/remote-desktop/desktop-files/firefox.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=Firefox -Comment=Browse the World Wide Web -Comment[fr]=Naviguer sure le Web -Exec=firefox -Terminal=false -X-MultipleArgs=false -Type=Application -Icon=/usr/lib/firefox/browser/chrome/icons/default/default128.png -Categories=GNOME;GTK;Network;WebBrowser; -StartupNotify=true; diff --git a/output/remote-desktop/desktop-files/openmpp.desktop b/output/remote-desktop/desktop-files/openmpp.desktop deleted file mode 100644 index 3ec7c0562..000000000 --- a/output/remote-desktop/desktop-files/openmpp.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=OpenM++ -Exec=/opt/openmpp/1.15.6/bin/ompp_ui_linux.sh -Icon=/resources/openmpp.png -Terminal=false -Categories=Development; diff --git a/output/remote-desktop/desktop-files/pspp.desktop b/output/remote-desktop/desktop-files/pspp.desktop deleted file mode 100644 index aa78f9599..000000000 --- a/output/remote-desktop/desktop-files/pspp.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=PSPP -Exec=/usr/bin/psppire %F -Icon=pspp -Terminal=false -Categories=Development;IDE; diff --git a/output/remote-desktop/desktop-files/qgis.desktop b/output/remote-desktop/desktop-files/qgis.desktop deleted file mode 100644 index 331abdd47..000000000 --- a/output/remote-desktop/desktop-files/qgis.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=QGIS Desktop -Comment= -Exec=/usr/bin/qgis %F -Icon=qgis -Path= -Terminal=false -StartupNotify=false diff --git a/output/remote-desktop/desktop-files/rstudio.desktop b/output/remote-desktop/desktop-files/rstudio.desktop deleted file mode 100644 index 8c2212348..000000000 --- a/output/remote-desktop/desktop-files/rstudio.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Exec=/usr/bin/rstudio %F -Icon=rstudio -Type=Application -Terminal=False -Name=RStudio -Categories=Development;IDE; diff --git a/output/remote-desktop/desktop-files/sqlitebrowser.desktop b/output/remote-desktop/desktop-files/sqlitebrowser.desktop deleted file mode 100644 index d849d3c97..000000000 --- a/output/remote-desktop/desktop-files/sqlitebrowser.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=DB Browser for SQLite -Name[fr]=DB Browser pour SQLite -Comment=DB Browser for SQLite is a light GUI editor for SQLite databases -Comment[fr]=Un éditeur graphique léger pour les bases de données SQLite -Exec=sqlitebrowser %f -Icon=sqlitebrowser -Terminal=false -X-MultipleArgs=false -Type=Application -Categories=Development;Utility;Database; -MimeType=application/vnd.db4s-project+xml;application/sqlitebrowser;application/x-sqlitebrowser;application/vnd.sqlite3;application/geopackage+sqlite3;application/x-sqlite2;application/x-sqlite3; diff --git a/output/remote-desktop/initial-condarc b/output/remote-desktop/initial-condarc deleted file mode 100644 index 66ecf6081..000000000 --- a/output/remote-desktop/initial-condarc +++ /dev/null @@ -1,6 +0,0 @@ -# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html - -auto_update_conda: false -show_channel_urls: true -channels: - - conda-forge \ No newline at end of file diff --git a/output/remote-desktop/jupyter-ompp-proxy/jupyter_ompp_proxy/__init__.py b/output/remote-desktop/jupyter-ompp-proxy/jupyter_ompp_proxy/__init__.py deleted file mode 100644 index 0c0cd4c28..000000000 --- a/output/remote-desktop/jupyter-ompp-proxy/jupyter_ompp_proxy/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import logging - -logger = logging.getLogger(__name__) -logger.setLevel("INFO") - -def setup_ompp(): - - def _get_cmd(): - - return [ - "bash", - "-c", - "/usr/local/bin/start-oms.sh >> /tmp/oms_logfile.log" - ] - - def _rewrite_response(response): - if 'Location' in response.headers: - response.headers['Location'] = response.headers['Location'].replace('/SASStudio', os.environ.get('NB_PREFIX') + '/sasstudio/SASStudio') - - return { - "command": _get_cmd, - "timeout": 60, - "port": 4040, - "launcher_entry": { - "title": "OpenM++", - "icon_path": os.path.join(os.getenv("OMPP_INSTALL_DIR", None), "html", "icons", "openmpp.svg"), - }, - "rewrite_response": _rewrite_response, - } diff --git a/output/remote-desktop/jupyter-ompp-proxy/setup.py b/output/remote-desktop/jupyter-ompp-proxy/setup.py deleted file mode 100644 index 1c071802a..000000000 --- a/output/remote-desktop/jupyter-ompp-proxy/setup.py +++ /dev/null @@ -1,23 +0,0 @@ -import setuptools - -setuptools.setup( - name="jupyter-ompp-proxy", - version='0.0.1', - url="https://github.com/StatCan/jupyter-ompp-proxy", - author="Her Majesty The Queen In Right of Canada", - description="Jupyter extension to proxy OpenM++ webui", - packages=setuptools.find_packages(), - keywords=['SAS'], - classifiers=['Framework :: Jupyter'], - install_requires=[ - 'jupyter-server-proxy>=3.2.0' - ], - entry_points={ - 'jupyter_serverproxy_servers': [ - 'ompp = jupyter_ompp_proxy:setup_ompp' - ] - }, - # package_data={ - # 'jupyter_sasstudio_proxy': ['icons/sasstudio.svg'], - # }, -) diff --git a/output/remote-desktop/jupyterlab-overrides.json b/output/remote-desktop/jupyterlab-overrides.json deleted file mode 100644 index 4b2a1f770..000000000 --- a/output/remote-desktop/jupyterlab-overrides.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "@jupyterlab/notebook-extension:tracker" : { - "recordTiming": true - } -} diff --git a/output/remote-desktop/languagepacks.json b/output/remote-desktop/languagepacks.json deleted file mode 100644 index 8156e69a4..000000000 --- a/output/remote-desktop/languagepacks.json +++ /dev/null @@ -1 +0,0 @@ -{"fr":{"hash":"08d7e56153cc68770718dc00903ab3b2","extensions":[{"extensionIdentifier":{"id":"ms-ceintl.vscode-language-pack-fr","uuid":"3851b234-107a-4b82-a50d-0414e166220d"},"version":"1.82.0"}],"translations":{"vscode":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/main.i18n.json","ms-vscode.js-debug":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/ms-vscode.js-debug.i18n.json","vscode.bat":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.bat.i18n.json","vscode.builtin-notebook-renderers":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.builtin-notebook-renderers.i18n.json","vscode.clojure":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.clojure.i18n.json","vscode.coffeescript":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.coffeescript.i18n.json","vscode.configuration-editing":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.configuration-editing.i18n.json","vscode.cpp":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.cpp.i18n.json","vscode.csharp":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.csharp.i18n.json","vscode.css-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.css-language-features.i18n.json","vscode.css":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.css.i18n.json","vscode.dart":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.dart.i18n.json","vscode.debug-auto-launch":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.debug-auto-launch.i18n.json","vscode.debug-server-ready":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.debug-server-ready.i18n.json","vscode.diff":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.diff.i18n.json","vscode.docker":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.docker.i18n.json","vscode.emmet":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.emmet.i18n.json","vscode.extension-editing":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.extension-editing.i18n.json","vscode.fsharp":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.fsharp.i18n.json","vscode.git-base":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.git-base.i18n.json","vscode.git":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.git.i18n.json","vscode.github-authentication":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.github-authentication.i18n.json","vscode.github":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.github.i18n.json","vscode.go":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.go.i18n.json","vscode.groovy":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.groovy.i18n.json","vscode.grunt":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.grunt.i18n.json","vscode.gulp":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.gulp.i18n.json","vscode.handlebars":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.handlebars.i18n.json","vscode.hlsl":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.hlsl.i18n.json","vscode.html-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.html-language-features.i18n.json","vscode.html":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.html.i18n.json","vscode.ini":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.ini.i18n.json","vscode.ipynb":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.ipynb.i18n.json","vscode.jake":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.jake.i18n.json","vscode.java":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.java.i18n.json","vscode.javascript":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.javascript.i18n.json","vscode.json-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.json-language-features.i18n.json","vscode.json":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.json.i18n.json","vscode.julia":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.julia.i18n.json","vscode.latex":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.latex.i18n.json","vscode.less":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.less.i18n.json","vscode.log":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.log.i18n.json","vscode.lua":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.lua.i18n.json","vscode.make":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.make.i18n.json","vscode.markdown-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.markdown-language-features.i18n.json","vscode.markdown-math":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.markdown-math.i18n.json","vscode.markdown":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.markdown.i18n.json","vscode.media-preview":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.media-preview.i18n.json","vscode.merge-conflict":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.merge-conflict.i18n.json","vscode.microsoft-authentication":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.microsoft-authentication.i18n.json","vscode.npm":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.npm.i18n.json","vscode.objective-c":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.objective-c.i18n.json","vscode.perl":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.perl.i18n.json","vscode.php-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.php-language-features.i18n.json","vscode.php":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.php.i18n.json","vscode.powershell":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.powershell.i18n.json","vscode.pug":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.pug.i18n.json","vscode.python":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.python.i18n.json","vscode.r":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.r.i18n.json","vscode.razor":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.razor.i18n.json","vscode.references-view":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.references-view.i18n.json","vscode.restructuredtext":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.restructuredtext.i18n.json","vscode.ruby":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.ruby.i18n.json","vscode.rust":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.rust.i18n.json","vscode.scss":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.scss.i18n.json","vscode.search-result":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.search-result.i18n.json","vscode.shaderlab":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.shaderlab.i18n.json","vscode.shellscript":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.shellscript.i18n.json","vscode.simple-browser":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.simple-browser.i18n.json","vscode.sql":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.sql.i18n.json","vscode.swift":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.swift.i18n.json","vscode.theme-abyss":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-abyss.i18n.json","vscode.theme-defaults":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-defaults.i18n.json","vscode.theme-kimbie-dark":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-kimbie-dark.i18n.json","vscode.theme-monokai-dimmed":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-monokai-dimmed.i18n.json","vscode.theme-monokai":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-monokai.i18n.json","vscode.theme-quietlight":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-quietlight.i18n.json","vscode.theme-red":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-red.i18n.json","vscode.theme-solarized-dark":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-solarized-dark.i18n.json","vscode.theme-solarized-light":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-solarized-light.i18n.json","vscode.theme-tomorrow-night-blue":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.theme-tomorrow-night-blue.i18n.json","vscode.typescript-language-features":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.typescript-language-features.i18n.json","vscode.typescript":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.typescript.i18n.json","vscode.vb":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.vb.i18n.json","vscode.vscode-theme-seti":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.vscode-theme-seti.i18n.json","vscode.xml":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.xml.i18n.json","vscode.yaml":"/etc/share/code-server/extensions/ms-ceintl.vscode-language-pack-fr-1.82.0-universal/translations/extensions/vscode.yaml.i18n.json"},"label":"français"}} \ No newline at end of file diff --git a/output/remote-desktop/minio-icon.png b/output/remote-desktop/minio-icon.png deleted file mode 100644 index d1b32be9e..000000000 Binary files a/output/remote-desktop/minio-icon.png and /dev/null differ diff --git a/output/remote-desktop/nginx.conf b/output/remote-desktop/nginx.conf deleted file mode 100644 index f0b6f1b28..000000000 --- a/output/remote-desktop/nginx.conf +++ /dev/null @@ -1,224 +0,0 @@ -pid /tmp/nginx.pid; - -events { - # No special events for this simple setup - #worker_connections 100; -} - -http { - - include mime.types; - #map $http_upgrade $connection_upgrade { - # default upgrade; - # '' close; - #} - - # map $upstream_http_location $new_location { - # default .$upstream_http_location; - #} - - - client_max_body_size 10G; - client_body_timeout 300s; - client_header_timeout 120s; - - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - send_timeout 600; - - - upstream vnc_proxy { - server 0.0.0.0:5678; - } - - server { - - absolute_redirect off; - # Set a number of log, temp and cache file options that will otherwise - # default to restricted locations accessible only to root. - access_log /tmp/nginx_host.access.log; - error_log /tmp/nginx_error.log; - client_body_temp_path /tmp/client_body; - fastcgi_temp_path /tmp/fastcgi_temp; - proxy_temp_path /tmp/proxy_temp; - scgi_temp_path /tmp/scgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - - # Port forwarding stuff - listen 8888 default_server; - listen [::]:8888 default_server; - - # root /var/www/html; - root /tmp/novnc; - - # Add index.php to the list if you are using PHP - index vnc.html; - - server_name _; - - location = "/favicon.ico" { - # use favicon in resources folder - auth_basic off; - alias /tmp/favicon.ico; - } - - #location /app/ { - # autoindex on; - # root /tmp/novnc/app; - #} - - #location ~ \.css { - # add_header Content-Type text/css; - #} - #location ~ \.js { - # add_header Content-Type application/x-javascript; - #} - - # 301 try_file for trailing slash - location ~ ^([^.\?]*[^/])$ { - try_files $request_uri @addslash; - } - - # 301 redirect for trailing slash - location @addslash { - return 301 $request_uri/$is_args$args; - } - - - location ${NB_PREFIX} { - rewrite ${NB_PREFIX}(.*) $1 break; - proxy_pass http://0.0.0.0:8888; - proxy_redirect off; - proxy_set_header Host $host; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location = ${NB_PREFIX}/websockify { - rewrite ${NB_PREFIX}/(.*) /$1 break; - - set $delimeter ""; - - if ($is_args) { - set $delimeter "&"; - } - - set $args "$args${delimeter}resize=true"; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 61s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location /websockify { - #rewrite ${NB_PREFIX}/(.*) /$1 break; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 3600s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - - location ${NB_PREFIX}/websockify { - #rewrite ${NB_PREFIX}/(.*) /$1 break; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 3600s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location / { - index vnc.html; - root /opt/novnc/; - try_files $uri $uri/ /vnc.html?resize=true; - } - - location = /healthy { - auth_basic off; - return 200; - } - - location = /ping { - auth_basic off; - return 200; - } - - error_page 404 ${NB_PREFIX}/; - # location @error_page { - # root /var/www/html/; - # rewrite ^ https://domain.com/error/index.html; - # break; - # } - - # Access all-ports via /tools/PORT - location ~* "^${NB_PREFIX}/(proxy|tools)/(?[0-9]+)/(?.*)" { - # Allow CORS requests - if ($request_method = OPTIONS) { - add_header Access-Control-Allow-Origin "$http_origin"; - add_header Access-Control-Allow-Credentials "true"; - add_header Access-Control-Allow-Methods "GET, OPTIONS, DELETE, POST, PUT"; - add_header Access-Control-Allow-Headers "Authorization, Content-Type"; - add_header Content-Length 0; - add_header Content-Type text/plain; - return 200; - } - - add_header Access-Control-Allow-Origin "$http_origin"; - add_header Access-Control-Allow-Credentials "true"; - # Disable proxy buffering - applications like guacamole have problems with this setting - proxy_buffering off; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_http_version 1.1; - proxy_pass_request_headers on; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_store off; - - proxy_pass http://0.0.0.0:$access_port/$remaining_part$is_args$args; - gzip on; - gzip_proxied any; - gzip_types *; - } - } -} diff --git a/output/remote-desktop/novnc/ui.js b/output/remote-desktop/novnc/ui.js deleted file mode 100644 index 8a2a067a2..000000000 --- a/output/remote-desktop/novnc/ui.js +++ /dev/null @@ -1,1735 +0,0 @@ -/* - * noVNC: HTML5 VNC client - * Copyright (C) 2019 The noVNC Authors - * Licensed under MPL 2.0 (see LICENSE.txt) - * - * See README.md for usage and integration instructions. - * Additions made by Will https://gist.github.com/sylus/cb01e59056780a2161186139b25818fb - */ - -import * as Log from '../core/util/logging.js'; -import _, { l10n } from './localization.js'; -import { isTouchDevice, isSafari, hasScrollbarGutter, dragThreshold } - from '../core/util/browser.js'; -import { setCapture, getPointerEvent } from '../core/util/events.js'; -import KeyTable from "../core/input/keysym.js"; -import keysyms from "../core/input/keysymdef.js"; -import Keyboard from "../core/input/keyboard.js"; -import RFB from "../core/rfb.js"; -import * as WebUtil from "./webutil.js"; - -const PAGE_TITLE = "noVNC"; - -const UI = { - - connected: false, - desktopName: "", - - statusTimeout: null, - hideKeyboardTimeout: null, - idleControlbarTimeout: null, - closeControlbarTimeout: null, - - controlbarGrabbed: false, - controlbarDrag: false, - controlbarMouseDownClientY: 0, - controlbarMouseDownOffsetY: 0, - - lastKeyboardinput: null, - defaultKeyboardinputLen: 100, - - inhibitReconnect: true, - reconnectCallback: null, - reconnectPassword: null, - - prime() { - return WebUtil.initSettings().then(() => { - if (document.readyState === "interactive" || document.readyState === "complete") { - return UI.start(); - } - - return new Promise((resolve, reject) => { - document.addEventListener('DOMContentLoaded', () => UI.start().then(resolve).catch(reject)); - }); - }); - }, - - // Render default UI and initialize settings menu - start() { - - UI.initSettings(); - - // Translate the DOM - l10n.translateDOM(); - - fetch('./package.json') - .then((response) => { - if (!response.ok) { - throw Error("" + response.status + " " + response.statusText); - } - return response.json(); - }) - .then((packageInfo) => { - Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version); - }) - .catch((err) => { - Log.Error("Couldn't fetch package.json: " + err); - Array.from(document.getElementsByClassName('noVNC_version_wrapper')) - .concat(Array.from(document.getElementsByClassName('noVNC_version_separator'))) - .forEach(el => el.style.display = 'none'); - }); - - // Adapt the interface for touch screen devices - if (isTouchDevice) { - document.documentElement.classList.add("noVNC_touch"); - // Remove the address bar - setTimeout(() => window.scrollTo(0, 1), 100); - } - - // Restore control bar position - if (WebUtil.readSetting('controlbar_pos') === 'right') { - UI.toggleControlbarSide(); - } - - UI.initFullscreen(); - - // Setup event handlers - UI.addControlbarHandlers(); - UI.addTouchSpecificHandlers(); - UI.addExtraKeysHandlers(); - UI.addMachineHandlers(); - UI.addConnectionControlHandlers(); - UI.addClipboardHandlers(); - UI.addSettingsHandlers(); - document.getElementById("noVNC_status") - .addEventListener('click', UI.hideStatus); - - // Bootstrap fallback input handler - UI.keyboardinputReset(); - - UI.openControlbar(); - - UI.updateVisualState('init'); - - document.documentElement.classList.remove("noVNC_loading"); - - let autoconnect = WebUtil.getConfigVar('autoconnect', false); - if (autoconnect === 'true' || autoconnect == '1') { - autoconnect = true; - UI.connect(); - } else { - autoconnect = false; - // Show the connect panel on first load unless autoconnecting - UI.openConnectPanel(); - } - - return Promise.resolve(UI.rfb); - }, - - initFullscreen() { - // Only show the button if fullscreen is properly supported - // * Safari doesn't support alphanumerical input while in fullscreen - if (!isSafari() && - (document.documentElement.requestFullscreen || - document.documentElement.mozRequestFullScreen || - document.documentElement.webkitRequestFullscreen || - document.body.msRequestFullscreen)) { - document.getElementById('noVNC_fullscreen_button') - .classList.remove("noVNC_hidden"); - UI.addFullscreenHandlers(); - } - }, - - initSettings() { - // Logging selection dropdown - const llevels = ['error', 'warn', 'info', 'debug']; - for (let i = 0; i < llevels.length; i += 1) { - UI.addOption(document.getElementById('noVNC_setting_logging'), llevels[i], llevels[i]); - } - - // Settings with immediate effects - UI.initSetting('logging', 'warn'); - UI.updateLogging(); - - // if port == 80 (or 443) then it won't be present and should be - // set manually - let port = window.location.port; - if (!port) { - if (window.location.protocol.substring(0, 5) == 'https') { - port = 443; - } else if (window.location.protocol.substring(0, 4) == 'http') { - port = 80; - } - } - - /* Populate the controls if defaults are provided in the URL */ - UI.initSetting('host', window.location.hostname); - UI.initSetting('port', port); - UI.initSetting('encrypt', (window.location.protocol === "https:")); - UI.initSetting('view_clip', false); - // AAW CHANGE, default resize to remote - UI.initSetting('resize', 'remote'); - UI.initSetting('quality', 6); - UI.initSetting('compression', 2); - UI.initSetting('shared', true); - UI.initSetting('view_only', false); - UI.initSetting('show_dot', false); - UI.initSetting('path', 'websockify'); - UI.initSetting('repeaterID', ''); - // AAW CHANGE, default reconnect to true and delay to 0 - UI.initSetting('reconnect', true); - UI.initSetting('reconnect_delay', 0); - - UI.setupSettingLabels(); - }, - // Adds a link to the label elements on the corresponding input elements - setupSettingLabels() { - const labels = document.getElementsByTagName('LABEL'); - for (let i = 0; i < labels.length; i++) { - const htmlFor = labels[i].htmlFor; - if (htmlFor != '') { - const elem = document.getElementById(htmlFor); - if (elem) elem.label = labels[i]; - } else { - // If 'for' isn't set, use the first input element child - const children = labels[i].children; - for (let j = 0; j < children.length; j++) { - if (children[j].form !== undefined) { - children[j].label = labels[i]; - break; - } - } - } - } - }, - -/* ------^------- -* /INIT -* ============== -* EVENT HANDLERS -* ------v------*/ - - addControlbarHandlers() { - document.getElementById("noVNC_control_bar") - .addEventListener('mousemove', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('mouseup', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('mousedown', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('keydown', UI.activateControlbar); - - document.getElementById("noVNC_control_bar") - .addEventListener('mousedown', UI.keepControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('keydown', UI.keepControlbar); - - document.getElementById("noVNC_view_drag_button") - .addEventListener('click', UI.toggleViewDrag); - - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mousedown', UI.controlbarHandleMouseDown); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mouseup', UI.controlbarHandleMouseUp); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mousemove', UI.dragControlbarHandle); - // resize events aren't available for elements - window.addEventListener('resize', UI.updateControlbarHandle); - - const exps = document.getElementsByClassName("noVNC_expander"); - for (let i = 0;i < exps.length;i++) { - exps[i].addEventListener('click', UI.toggleExpander); - } - }, - - addTouchSpecificHandlers() { - document.getElementById("noVNC_keyboard_button") - .addEventListener('click', UI.toggleVirtualKeyboard); - - UI.touchKeyboard = new Keyboard(document.getElementById('noVNC_keyboardinput')); - UI.touchKeyboard.onkeyevent = UI.keyEvent; - UI.touchKeyboard.grab(); - document.getElementById("noVNC_keyboardinput") - .addEventListener('input', UI.keyInput); - document.getElementById("noVNC_keyboardinput") - .addEventListener('focus', UI.onfocusVirtualKeyboard); - document.getElementById("noVNC_keyboardinput") - .addEventListener('blur', UI.onblurVirtualKeyboard); - document.getElementById("noVNC_keyboardinput") - .addEventListener('submit', () => false); - - document.documentElement - .addEventListener('mousedown', UI.keepVirtualKeyboard, true); - - document.getElementById("noVNC_control_bar") - .addEventListener('touchstart', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('touchmove', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('touchend', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('input', UI.activateControlbar); - - document.getElementById("noVNC_control_bar") - .addEventListener('touchstart', UI.keepControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('input', UI.keepControlbar); - - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchstart', UI.controlbarHandleMouseDown); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchend', UI.controlbarHandleMouseUp); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchmove', UI.dragControlbarHandle); - }, - - addExtraKeysHandlers() { - document.getElementById("noVNC_toggle_extra_keys_button") - .addEventListener('click', UI.toggleExtraKeys); - document.getElementById("noVNC_toggle_ctrl_button") - .addEventListener('click', UI.toggleCtrl); - document.getElementById("noVNC_toggle_windows_button") - .addEventListener('click', UI.toggleWindows); - document.getElementById("noVNC_toggle_alt_button") - .addEventListener('click', UI.toggleAlt); - document.getElementById("noVNC_send_tab_button") - .addEventListener('click', UI.sendTab); - document.getElementById("noVNC_send_esc_button") - .addEventListener('click', UI.sendEsc); - document.getElementById("noVNC_send_ctrl_alt_del_button") - .addEventListener('click', UI.sendCtrlAltDel); - }, - - addMachineHandlers() { - document.getElementById("noVNC_shutdown_button") - .addEventListener('click', () => UI.rfb.machineShutdown()); - document.getElementById("noVNC_reboot_button") - .addEventListener('click', () => UI.rfb.machineReboot()); - document.getElementById("noVNC_reset_button") - .addEventListener('click', () => UI.rfb.machineReset()); - document.getElementById("noVNC_power_button") - .addEventListener('click', UI.togglePowerPanel); - }, - - addConnectionControlHandlers() { - document.getElementById("noVNC_disconnect_button") - .addEventListener('click', UI.disconnect); - document.getElementById("noVNC_connect_button") - .addEventListener('click', UI.connect); - document.getElementById("noVNC_cancel_reconnect_button") - .addEventListener('click', UI.cancelReconnect); - - document.getElementById("noVNC_credentials_button") - .addEventListener('click', UI.setCredentials); - }, - - addClipboardHandlers() { - document.getElementById("noVNC_clipboard_button") - .addEventListener('click', UI.toggleClipboardPanel); - document.getElementById("noVNC_clipboard_text") - .addEventListener('change', UI.clipboardSend); - document.getElementById("noVNC_clipboard_clear_button") - .addEventListener('click', UI.clipboardClear); - }, - - // Add a call to save settings when the element changes, - // unless the optional parameter changeFunc is used instead. - addSettingChangeHandler(name, changeFunc) { - const settingElem = document.getElementById("noVNC_setting_" + name); - if (changeFunc === undefined) { - changeFunc = () => UI.saveSetting(name); - } - settingElem.addEventListener('change', changeFunc); - }, - - addSettingsHandlers() { - document.getElementById("noVNC_settings_button") - .addEventListener('click', UI.toggleSettingsPanel); - - UI.addSettingChangeHandler('encrypt'); - UI.addSettingChangeHandler('resize'); - UI.addSettingChangeHandler('resize', UI.applyResizeMode); - UI.addSettingChangeHandler('resize', UI.updateViewClip); - UI.addSettingChangeHandler('quality'); - UI.addSettingChangeHandler('quality', UI.updateQuality); - UI.addSettingChangeHandler('compression'); - UI.addSettingChangeHandler('compression', UI.updateCompression); - UI.addSettingChangeHandler('view_clip'); - UI.addSettingChangeHandler('view_clip', UI.updateViewClip); - UI.addSettingChangeHandler('shared'); - UI.addSettingChangeHandler('view_only'); - UI.addSettingChangeHandler('view_only', UI.updateViewOnly); - UI.addSettingChangeHandler('show_dot'); - UI.addSettingChangeHandler('show_dot', UI.updateShowDotCursor); - UI.addSettingChangeHandler('host'); - UI.addSettingChangeHandler('port'); - UI.addSettingChangeHandler('path'); - UI.addSettingChangeHandler('repeaterID'); - UI.addSettingChangeHandler('logging'); - UI.addSettingChangeHandler('logging', UI.updateLogging); - UI.addSettingChangeHandler('reconnect'); - UI.addSettingChangeHandler('reconnect_delay'); - }, - - addFullscreenHandlers() { - document.getElementById("noVNC_fullscreen_button") - .addEventListener('click', UI.toggleFullscreen); - - window.addEventListener('fullscreenchange', UI.updateFullscreenButton); - window.addEventListener('mozfullscreenchange', UI.updateFullscreenButton); - window.addEventListener('webkitfullscreenchange', UI.updateFullscreenButton); - window.addEventListener('msfullscreenchange', UI.updateFullscreenButton); - }, - -/* ------^------- - * /EVENT HANDLERS - * ============== - * VISUAL - * ------v------*/ - - // Disable/enable controls depending on connection state - updateVisualState(state) { - - document.documentElement.classList.remove("noVNC_connecting"); - document.documentElement.classList.remove("noVNC_connected"); - document.documentElement.classList.remove("noVNC_disconnecting"); - document.documentElement.classList.remove("noVNC_reconnecting"); - - const transitionElem = document.getElementById("noVNC_transition_text"); - switch (state) { - case 'init': - break; - case 'connecting': - transitionElem.textContent = _("Connecting..."); - document.documentElement.classList.add("noVNC_connecting"); - break; - case 'connected': - document.documentElement.classList.add("noVNC_connected"); - break; - case 'disconnecting': - transitionElem.textContent = _("Disconnecting..."); - document.documentElement.classList.add("noVNC_disconnecting"); - break; - case 'disconnected': - break; - case 'reconnecting': - transitionElem.textContent = _("Reconnecting..."); - document.documentElement.classList.add("noVNC_reconnecting"); - break; - default: - Log.Error("Invalid visual state: " + state); - UI.showStatus(_("Internal error"), 'error'); - return; - } - - if (UI.connected) { - UI.updateViewClip(); - - UI.disableSetting('encrypt'); - UI.disableSetting('shared'); - UI.disableSetting('host'); - UI.disableSetting('port'); - UI.disableSetting('path'); - UI.disableSetting('repeaterID'); - - // Hide the controlbar after 2 seconds - UI.closeControlbarTimeout = setTimeout(UI.closeControlbar, 2000); - } else { - UI.enableSetting('encrypt'); - UI.enableSetting('shared'); - UI.enableSetting('host'); - UI.enableSetting('port'); - UI.enableSetting('path'); - UI.enableSetting('repeaterID'); - UI.updatePowerButton(); - UI.keepControlbar(); - } - - // State change closes dialogs as they may not be relevant - // anymore - UI.closeAllPanels(); - document.getElementById('noVNC_credentials_dlg') - .classList.remove('noVNC_open'); - }, - - showStatus(text, statusType, time) { - const statusElem = document.getElementById('noVNC_status'); - - if (typeof statusType === 'undefined') { - statusType = 'normal'; - } - - // Don't overwrite more severe visible statuses and never - // errors. Only shows the first error. - if (statusElem.classList.contains("noVNC_open")) { - if (statusElem.classList.contains("noVNC_status_error")) { - return; - } - if (statusElem.classList.contains("noVNC_status_warn") && - statusType === 'normal') { - return; - } - } - - clearTimeout(UI.statusTimeout); - - switch (statusType) { - case 'error': - statusElem.classList.remove("noVNC_status_warn"); - statusElem.classList.remove("noVNC_status_normal"); - statusElem.classList.add("noVNC_status_error"); - break; - case 'warning': - case 'warn': - statusElem.classList.remove("noVNC_status_error"); - statusElem.classList.remove("noVNC_status_normal"); - statusElem.classList.add("noVNC_status_warn"); - break; - case 'normal': - case 'info': - default: - statusElem.classList.remove("noVNC_status_error"); - statusElem.classList.remove("noVNC_status_warn"); - statusElem.classList.add("noVNC_status_normal"); - break; - } - - statusElem.textContent = text; - statusElem.classList.add("noVNC_open"); - - // If no time was specified, show the status for 1.5 seconds - if (typeof time === 'undefined') { - time = 1500; - } - - // Error messages do not timeout - if (statusType !== 'error') { - UI.statusTimeout = window.setTimeout(UI.hideStatus, time); - } - }, - - hideStatus() { - clearTimeout(UI.statusTimeout); - document.getElementById('noVNC_status').classList.remove("noVNC_open"); - }, - - activateControlbar(event) { - clearTimeout(UI.idleControlbarTimeout); - // We manipulate the anchor instead of the actual control - // bar in order to avoid creating new a stacking group - document.getElementById('noVNC_control_bar_anchor') - .classList.remove("noVNC_idle"); - UI.idleControlbarTimeout = window.setTimeout(UI.idleControlbar, 2000); - }, - - idleControlbar() { - // Don't fade if a child of the control bar has focus - if (document.getElementById('noVNC_control_bar') - .contains(document.activeElement) && document.hasFocus()) { - UI.activateControlbar(); - return; - } - - document.getElementById('noVNC_control_bar_anchor') - .classList.add("noVNC_idle"); - }, - - keepControlbar() { - clearTimeout(UI.closeControlbarTimeout); - }, - - openControlbar() { - document.getElementById('noVNC_control_bar') - .classList.add("noVNC_open"); - }, - - closeControlbar() { - UI.closeAllPanels(); - document.getElementById('noVNC_control_bar') - .classList.remove("noVNC_open"); - UI.rfb.focus(); - }, - - toggleControlbar() { - if (document.getElementById('noVNC_control_bar') - .classList.contains("noVNC_open")) { - UI.closeControlbar(); - } else { - UI.openControlbar(); - } - }, - - toggleControlbarSide() { - // Temporarily disable animation, if bar is displayed, to avoid weird - // movement. The transitionend-event will not fire when display=none. - const bar = document.getElementById('noVNC_control_bar'); - const barDisplayStyle = window.getComputedStyle(bar).display; - if (barDisplayStyle !== 'none') { - bar.style.transitionDuration = '0s'; - bar.addEventListener('transitionend', () => bar.style.transitionDuration = ''); - } - - const anchor = document.getElementById('noVNC_control_bar_anchor'); - if (anchor.classList.contains("noVNC_right")) { - WebUtil.writeSetting('controlbar_pos', 'left'); - anchor.classList.remove("noVNC_right"); - } else { - WebUtil.writeSetting('controlbar_pos', 'right'); - anchor.classList.add("noVNC_right"); - } - - // Consider this a movement of the handle - UI.controlbarDrag = true; - }, - - showControlbarHint(show) { - const hint = document.getElementById('noVNC_control_bar_hint'); - if (show) { - hint.classList.add("noVNC_active"); - } else { - hint.classList.remove("noVNC_active"); - } - }, - - dragControlbarHandle(e) { - if (!UI.controlbarGrabbed) return; - - const ptr = getPointerEvent(e); - - const anchor = document.getElementById('noVNC_control_bar_anchor'); - if (ptr.clientX < (window.innerWidth * 0.1)) { - if (anchor.classList.contains("noVNC_right")) { - UI.toggleControlbarSide(); - } - } else if (ptr.clientX > (window.innerWidth * 0.9)) { - if (!anchor.classList.contains("noVNC_right")) { - UI.toggleControlbarSide(); - } - } - - if (!UI.controlbarDrag) { - const dragDistance = Math.abs(ptr.clientY - UI.controlbarMouseDownClientY); - - if (dragDistance < dragThreshold) return; - - UI.controlbarDrag = true; - } - - const eventY = ptr.clientY - UI.controlbarMouseDownOffsetY; - - UI.moveControlbarHandle(eventY); - - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - }, - - // Move the handle but don't allow any position outside the bounds - moveControlbarHandle(viewportRelativeY) { - const handle = document.getElementById("noVNC_control_bar_handle"); - const handleHeight = handle.getBoundingClientRect().height; - const controlbarBounds = document.getElementById("noVNC_control_bar") - .getBoundingClientRect(); - const margin = 10; - - // These heights need to be non-zero for the below logic to work - if (handleHeight === 0 || controlbarBounds.height === 0) { - return; - } - - let newY = viewportRelativeY; - - // Check if the coordinates are outside the control bar - if (newY < controlbarBounds.top + margin) { - // Force coordinates to be below the top of the control bar - newY = controlbarBounds.top + margin; - - } else if (newY > controlbarBounds.top + - controlbarBounds.height - handleHeight - margin) { - // Force coordinates to be above the bottom of the control bar - newY = controlbarBounds.top + - controlbarBounds.height - handleHeight - margin; - } - - // Corner case: control bar too small for stable position - if (controlbarBounds.height < (handleHeight + margin * 2)) { - newY = controlbarBounds.top + - (controlbarBounds.height - handleHeight) / 2; - } - - // The transform needs coordinates that are relative to the parent - const parentRelativeY = newY - controlbarBounds.top; - handle.style.transform = "translateY(" + parentRelativeY + "px)"; - }, - - updateControlbarHandle() { - // Since the control bar is fixed on the viewport and not the page, - // the move function expects coordinates relative the the viewport. - const handle = document.getElementById("noVNC_control_bar_handle"); - const handleBounds = handle.getBoundingClientRect(); - UI.moveControlbarHandle(handleBounds.top); - }, - - controlbarHandleMouseUp(e) { - if ((e.type == "mouseup") && (e.button != 0)) return; - - // mouseup and mousedown on the same place toggles the controlbar - if (UI.controlbarGrabbed && !UI.controlbarDrag) { - UI.toggleControlbar(); - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - } - UI.controlbarGrabbed = false; - UI.showControlbarHint(false); - }, - - controlbarHandleMouseDown(e) { - if ((e.type == "mousedown") && (e.button != 0)) return; - - const ptr = getPointerEvent(e); - - const handle = document.getElementById("noVNC_control_bar_handle"); - const bounds = handle.getBoundingClientRect(); - - // Touch events have implicit capture - if (e.type === "mousedown") { - setCapture(handle); - } - - UI.controlbarGrabbed = true; - UI.controlbarDrag = false; - - UI.showControlbarHint(true); - - UI.controlbarMouseDownClientY = ptr.clientY; - UI.controlbarMouseDownOffsetY = ptr.clientY - bounds.top; - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - }, - - toggleExpander(e) { - if (this.classList.contains("noVNC_open")) { - this.classList.remove("noVNC_open"); - } else { - this.classList.add("noVNC_open"); - } - }, - -/* ------^------- - * /VISUAL - * ============== - * SETTINGS - * ------v------*/ - - // Initial page load read/initialization of settings - initSetting(name, defVal) { - // Check Query string followed by cookie - let val = WebUtil.getConfigVar(name); - if (val === null) { - val = WebUtil.readSetting(name, defVal); - } - WebUtil.setSetting(name, val); - UI.updateSetting(name); - return val; - }, - - // Set the new value, update and disable form control setting - forceSetting(name, val) { - WebUtil.setSetting(name, val); - UI.updateSetting(name); - UI.disableSetting(name); - }, - - // Update cookie and form control setting. If value is not set, then - // updates from control to current cookie setting. - updateSetting(name) { - - // Update the settings control - let value = UI.getSetting(name); - - const ctrl = document.getElementById('noVNC_setting_' + name); - if (ctrl.type === 'checkbox') { - ctrl.checked = value; - - } else if (typeof ctrl.options !== 'undefined') { - for (let i = 0; i < ctrl.options.length; i += 1) { - if (ctrl.options[i].value === value) { - ctrl.selectedIndex = i; - break; - } - } - } else { - ctrl.value = value; - } - }, - - // Save control setting to cookie - saveSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - let val; - if (ctrl.type === 'checkbox') { - val = ctrl.checked; - } else if (typeof ctrl.options !== 'undefined') { - val = ctrl.options[ctrl.selectedIndex].value; - } else { - val = ctrl.value; - } - WebUtil.writeSetting(name, val); - //Log.Debug("Setting saved '" + name + "=" + val + "'"); - return val; - }, - - // Read form control compatible setting from cookie - getSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - let val = WebUtil.readSetting(name); - if (typeof val !== 'undefined' && val !== null && ctrl.type === 'checkbox') { - if (val.toString().toLowerCase() in {'0': 1, 'no': 1, 'false': 1}) { - val = false; - } else { - val = true; - } - } - return val; - }, - - // These helpers compensate for the lack of parent-selectors and - // previous-sibling-selectors in CSS which are needed when we want to - // disable the labels that belong to disabled input elements. - disableSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - ctrl.disabled = true; - ctrl.label.classList.add('noVNC_disabled'); - }, - - enableSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - ctrl.disabled = false; - ctrl.label.classList.remove('noVNC_disabled'); - }, - -/* ------^------- - * /SETTINGS - * ============== - * PANELS - * ------v------*/ - - closeAllPanels() { - UI.closeSettingsPanel(); - UI.closePowerPanel(); - UI.closeClipboardPanel(); - UI.closeExtraKeys(); - }, - -/* ------^------- - * /PANELS - * ============== - * SETTINGS (panel) - * ------v------*/ - - openSettingsPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - // Refresh UI elements from saved cookies - UI.updateSetting('encrypt'); - UI.updateSetting('view_clip'); - UI.updateSetting('resize'); - UI.updateSetting('quality'); - UI.updateSetting('compression'); - UI.updateSetting('shared'); - UI.updateSetting('view_only'); - UI.updateSetting('path'); - UI.updateSetting('repeaterID'); - UI.updateSetting('logging'); - UI.updateSetting('reconnect'); - UI.updateSetting('reconnect_delay'); - - document.getElementById('noVNC_settings') - .classList.add("noVNC_open"); - document.getElementById('noVNC_settings_button') - .classList.add("noVNC_selected"); - }, - - closeSettingsPanel() { - document.getElementById('noVNC_settings') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_settings_button') - .classList.remove("noVNC_selected"); - }, - - toggleSettingsPanel() { - if (document.getElementById('noVNC_settings') - .classList.contains("noVNC_open")) { - UI.closeSettingsPanel(); - } else { - UI.openSettingsPanel(); - } - }, - -/* ------^------- - * /SETTINGS - * ============== - * POWER - * ------v------*/ - - openPowerPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_power') - .classList.add("noVNC_open"); - document.getElementById('noVNC_power_button') - .classList.add("noVNC_selected"); - }, - - closePowerPanel() { - document.getElementById('noVNC_power') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_power_button') - .classList.remove("noVNC_selected"); - }, - - togglePowerPanel() { - if (document.getElementById('noVNC_power') - .classList.contains("noVNC_open")) { - UI.closePowerPanel(); - } else { - UI.openPowerPanel(); - } - }, - - // Disable/enable power button - updatePowerButton() { - if (UI.connected && - UI.rfb.capabilities.power && - !UI.rfb.viewOnly) { - document.getElementById('noVNC_power_button') - .classList.remove("noVNC_hidden"); - } else { - document.getElementById('noVNC_power_button') - .classList.add("noVNC_hidden"); - // Close power panel if open - UI.closePowerPanel(); - } - }, - -/* ------^------- - * /POWER - * ============== - * CLIPBOARD - * ------v------*/ - - openClipboardPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_clipboard') - .classList.add("noVNC_open"); - document.getElementById('noVNC_clipboard_button') - .classList.add("noVNC_selected"); - }, - - closeClipboardPanel() { - document.getElementById('noVNC_clipboard') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_clipboard_button') - .classList.remove("noVNC_selected"); - }, - - toggleClipboardPanel() { - if (document.getElementById('noVNC_clipboard') - .classList.contains("noVNC_open")) { - UI.closeClipboardPanel(); - } else { - UI.openClipboardPanel(); - } - }, - - clipboardReceive(e) { - Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0, 40) + "..."); - document.getElementById('noVNC_clipboard_text').value = e.detail.text; - Log.Debug("<< UI.clipboardReceive"); - }, - - clipboardClear() { - document.getElementById('noVNC_clipboard_text').value = ""; - UI.rfb.clipboardPasteFrom(""); - }, - - clipboardSend() { - const text = document.getElementById('noVNC_clipboard_text').value; - Log.Debug(">> UI.clipboardSend: " + text.substr(0, 40) + "..."); - UI.rfb.clipboardPasteFrom(text); - Log.Debug("<< UI.clipboardSend"); - }, - -/* ------^------- - * /CLIPBOARD - * ============== - * CONNECTION - * ------v------*/ - - openConnectPanel() { - document.getElementById('noVNC_connect_dlg') - .classList.add("noVNC_open"); - }, - - closeConnectPanel() { - document.getElementById('noVNC_connect_dlg') - .classList.remove("noVNC_open"); - }, - - connect(event, password) { - - // Ignore when rfb already exists - if (typeof UI.rfb !== 'undefined') { - return; - } - - const host = UI.getSetting('host'); - const port = UI.getSetting('port'); - // AAW CHANGE - const path = readQueryVariable('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify'); - - if (typeof password === 'undefined') { - password = WebUtil.getConfigVar('password'); - UI.reconnectPassword = password; - } - - if (password === null) { - password = undefined; - } - - UI.hideStatus(); - - if (!host) { - Log.Error("Can't connect when host is: " + host); - UI.showStatus(_("Must set host"), 'error'); - return; - } - - UI.closeConnectPanel(); - - UI.updateVisualState('connecting'); - - let url; - - url = UI.getSetting('encrypt') ? 'wss' : 'ws'; - - url += '://' + host; - if (port) { - url += ':' + port; - } - url += '/' + path; - - UI.rfb = new RFB(document.getElementById('noVNC_container'), url, - { shared: UI.getSetting('shared'), - repeaterID: UI.getSetting('repeaterID'), - credentials: { password: password } }); - UI.rfb.addEventListener("connect", UI.connectFinished); - UI.rfb.addEventListener("disconnect", UI.disconnectFinished); - UI.rfb.addEventListener("credentialsrequired", UI.credentials); - UI.rfb.addEventListener("securityfailure", UI.securityFailed); - UI.rfb.addEventListener("capabilities", UI.updatePowerButton); - UI.rfb.addEventListener("clipboard", UI.clipboardReceive); - UI.rfb.addEventListener("bell", UI.bell); - UI.rfb.addEventListener("desktopname", UI.updateDesktopName); - UI.rfb.clipViewport = UI.getSetting('view_clip'); - UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; - UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; - UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); - UI.rfb.compressionLevel = parseInt(UI.getSetting('compression')); - UI.rfb.showDotCursor = UI.getSetting('show_dot'); - - UI.updateViewOnly(); // requires UI.rfb - }, - - disconnect() { - UI.rfb.disconnect(); - - UI.connected = false; - - // Disable automatic reconnecting - UI.inhibitReconnect = true; - - UI.updateVisualState('disconnecting'); - - // Don't display the connection settings until we're actually disconnected - }, - - reconnect() { - UI.reconnectCallback = null; - - // if reconnect has been disabled in the meantime, do nothing. - if (UI.inhibitReconnect) { - return; - } - - UI.connect(null, UI.reconnectPassword); - }, - - cancelReconnect() { - if (UI.reconnectCallback !== null) { - clearTimeout(UI.reconnectCallback); - UI.reconnectCallback = null; - } - - UI.updateVisualState('disconnected'); - - UI.openControlbar(); - UI.openConnectPanel(); - }, - - connectFinished(e) { - UI.connected = true; - UI.inhibitReconnect = false; - - let msg; - if (UI.getSetting('encrypt')) { - msg = _("Connected (encrypted) to ") + UI.desktopName; - } else { - msg = _("Connected (unencrypted) to ") + UI.desktopName; - } - UI.showStatus(msg); - UI.updateVisualState('connected'); - - // Do this last because it can only be used on rendered elements - UI.rfb.focus(); - }, - - disconnectFinished(e) { - const wasConnected = UI.connected; - - // This variable is ideally set when disconnection starts, but - // when the disconnection isn't clean or if it is initiated by - // the server, we need to do it here as well since - // UI.disconnect() won't be used in those cases. - UI.connected = false; - - UI.rfb = undefined; - - if (!e.detail.clean) { - UI.updateVisualState('disconnected'); - if (wasConnected) { - UI.showStatus(_("Something went wrong, connection is closed"), - 'error'); - } else { - UI.showStatus(_("Failed to connect to server"), 'error'); - } - } else if (UI.getSetting('reconnect', false) === true && !UI.inhibitReconnect) { - UI.updateVisualState('reconnecting'); - - const delay = parseInt(UI.getSetting('reconnect_delay')); - UI.reconnectCallback = setTimeout(UI.reconnect, delay); - return; - } else { - UI.updateVisualState('disconnected'); - UI.showStatus(_("Disconnected"), 'normal'); - } - - document.title = PAGE_TITLE; - - UI.openControlbar(); - UI.openConnectPanel(); - }, - - securityFailed(e) { - let msg = ""; - // On security failures we might get a string with a reason - // directly from the server. Note that we can't control if - // this string is translated or not. - if ('reason' in e.detail) { - msg = _("New connection has been rejected with reason: ") + - e.detail.reason; - } else { - msg = _("New connection has been rejected"); - } - UI.showStatus(msg, 'error'); - }, - -/* ------^------- - * /CONNECTION - * ============== - * PASSWORD - * ------v------*/ - - credentials(e) { - // FIXME: handle more types - - document.getElementById("noVNC_username_block").classList.remove("noVNC_hidden"); - document.getElementById("noVNC_password_block").classList.remove("noVNC_hidden"); - - let inputFocus = "none"; - if (e.detail.types.indexOf("username") === -1) { - document.getElementById("noVNC_username_block").classList.add("noVNC_hidden"); - } else { - inputFocus = inputFocus === "none" ? "noVNC_username_input" : inputFocus; - } - if (e.detail.types.indexOf("password") === -1) { - document.getElementById("noVNC_password_block").classList.add("noVNC_hidden"); - } else { - inputFocus = inputFocus === "none" ? "noVNC_password_input" : inputFocus; - } - document.getElementById('noVNC_credentials_dlg') - .classList.add('noVNC_open'); - - setTimeout(() => document - .getElementById(inputFocus).focus(), 100); - - Log.Warn("Server asked for credentials"); - UI.showStatus(_("Credentials are required"), "warning"); - }, - - setCredentials(e) { - // Prevent actually submitting the form - e.preventDefault(); - - let inputElemUsername = document.getElementById('noVNC_username_input'); - const username = inputElemUsername.value; - - let inputElemPassword = document.getElementById('noVNC_password_input'); - const password = inputElemPassword.value; - // Clear the input after reading the password - inputElemPassword.value = ""; - - UI.rfb.sendCredentials({ username: username, password: password }); - UI.reconnectPassword = password; - document.getElementById('noVNC_credentials_dlg') - .classList.remove('noVNC_open'); - }, - -/* ------^------- - * /PASSWORD - * ============== - * FULLSCREEN - * ------v------*/ - - toggleFullscreen() { - if (document.fullscreenElement || // alternative standard method - document.mozFullScreenElement || // currently working methods - document.webkitFullscreenElement || - document.msFullscreenElement) { - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } - } else { - if (document.documentElement.requestFullscreen) { - document.documentElement.requestFullscreen(); - } else if (document.documentElement.mozRequestFullScreen) { - document.documentElement.mozRequestFullScreen(); - } else if (document.documentElement.webkitRequestFullscreen) { - document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - } else if (document.body.msRequestFullscreen) { - document.body.msRequestFullscreen(); - } - } - UI.updateFullscreenButton(); - }, - - updateFullscreenButton() { - if (document.fullscreenElement || // alternative standard method - document.mozFullScreenElement || // currently working methods - document.webkitFullscreenElement || - document.msFullscreenElement ) { - document.getElementById('noVNC_fullscreen_button') - .classList.add("noVNC_selected"); - } else { - document.getElementById('noVNC_fullscreen_button') - .classList.remove("noVNC_selected"); - } - }, - -/* ------^------- - * /FULLSCREEN - * ============== - * RESIZE - * ------v------*/ - - // Apply remote resizing or local scaling - applyResizeMode() { - if (!UI.rfb) return; - - UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; - UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; - }, - -/* ------^------- - * /RESIZE - * ============== - * VIEW CLIPPING - * ------v------*/ - - // Update viewport clipping property for the connection. The normal - // case is to get the value from the setting. There are special cases - // for when the viewport is scaled or when a touch device is used. - updateViewClip() { - if (!UI.rfb) return; - - const scaling = UI.getSetting('resize') === 'scale'; - - if (scaling) { - // Can't be clipping if viewport is scaled to fit - UI.forceSetting('view_clip', false); - UI.rfb.clipViewport = false; - } else if (!hasScrollbarGutter) { - // Some platforms have scrollbars that are difficult - // to use in our case, so we always use our own panning - UI.forceSetting('view_clip', true); - UI.rfb.clipViewport = true; - } else { - UI.enableSetting('view_clip'); - UI.rfb.clipViewport = UI.getSetting('view_clip'); - } - - // Changing the viewport may change the state of - // the dragging button - UI.updateViewDrag(); - }, - -/* ------^------- - * /VIEW CLIPPING - * ============== - * VIEWDRAG - * ------v------*/ - - toggleViewDrag() { - if (!UI.rfb) return; - - UI.rfb.dragViewport = !UI.rfb.dragViewport; - UI.updateViewDrag(); - }, - - updateViewDrag() { - if (!UI.connected) return; - - const viewDragButton = document.getElementById('noVNC_view_drag_button'); - - if (!UI.rfb.clipViewport && UI.rfb.dragViewport) { - // We are no longer clipping the viewport. Make sure - // viewport drag isn't active when it can't be used. - UI.rfb.dragViewport = false; - } - - if (UI.rfb.dragViewport) { - viewDragButton.classList.add("noVNC_selected"); - } else { - viewDragButton.classList.remove("noVNC_selected"); - } - - if (UI.rfb.clipViewport) { - viewDragButton.classList.remove("noVNC_hidden"); - } else { - viewDragButton.classList.add("noVNC_hidden"); - } - }, - -/* ------^------- - * /VIEWDRAG - * ============== - * QUALITY - * ------v------*/ - - updateQuality() { - if (!UI.rfb) return; - - UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); - }, - -/* ------^------- - * /QUALITY - * ============== - * COMPRESSION - * ------v------*/ - - updateCompression() { - if (!UI.rfb) return; - - UI.rfb.compressionLevel = parseInt(UI.getSetting('compression')); - }, - -/* ------^------- - * /COMPRESSION - * ============== - * KEYBOARD - * ------v------*/ - - showVirtualKeyboard() { - if (!isTouchDevice) return; - - const input = document.getElementById('noVNC_keyboardinput'); - - if (document.activeElement == input) return; - - input.focus(); - - try { - const l = input.value.length; - // Move the caret to the end - input.setSelectionRange(l, l); - } catch (err) { - // setSelectionRange is undefined in Google Chrome - } - }, - - hideVirtualKeyboard() { - if (!isTouchDevice) return; - - const input = document.getElementById('noVNC_keyboardinput'); - - if (document.activeElement != input) return; - - input.blur(); - }, - - toggleVirtualKeyboard() { - if (document.getElementById('noVNC_keyboard_button') - .classList.contains("noVNC_selected")) { - UI.hideVirtualKeyboard(); - } else { - UI.showVirtualKeyboard(); - } - }, - - onfocusVirtualKeyboard(event) { - document.getElementById('noVNC_keyboard_button') - .classList.add("noVNC_selected"); - if (UI.rfb) { - UI.rfb.focusOnClick = false; - } - }, - - onblurVirtualKeyboard(event) { - document.getElementById('noVNC_keyboard_button') - .classList.remove("noVNC_selected"); - if (UI.rfb) { - UI.rfb.focusOnClick = true; - } - }, - - keepVirtualKeyboard(event) { - const input = document.getElementById('noVNC_keyboardinput'); - - // Only prevent focus change if the virtual keyboard is active - if (document.activeElement != input) { - return; - } - - // Only allow focus to move to other elements that need - // focus to function properly - if (event.target.form !== undefined) { - switch (event.target.type) { - case 'text': - case 'email': - case 'search': - case 'password': - case 'tel': - case 'url': - case 'textarea': - case 'select-one': - case 'select-multiple': - return; - } - } - - event.preventDefault(); - }, - - keyboardinputReset() { - const kbi = document.getElementById('noVNC_keyboardinput'); - kbi.value = new Array(UI.defaultKeyboardinputLen).join("_"); - UI.lastKeyboardinput = kbi.value; - }, - - keyEvent(keysym, code, down) { - if (!UI.rfb) return; - - UI.rfb.sendKey(keysym, code, down); - }, - - // When normal keyboard events are left uncought, use the input events from - // the keyboardinput element instead and generate the corresponding key events. - // This code is required since some browsers on Android are inconsistent in - // sending keyCodes in the normal keyboard events when using on screen keyboards. - keyInput(event) { - - if (!UI.rfb) return; - - const newValue = event.target.value; - - if (!UI.lastKeyboardinput) { - UI.keyboardinputReset(); - } - const oldValue = UI.lastKeyboardinput; - - let newLen; - try { - // Try to check caret position since whitespace at the end - // will not be considered by value.length in some browsers - newLen = Math.max(event.target.selectionStart, newValue.length); - } catch (err) { - // selectionStart is undefined in Google Chrome - newLen = newValue.length; - } - const oldLen = oldValue.length; - - let inputs = newLen - oldLen; - let backspaces = inputs < 0 ? -inputs : 0; - - // Compare the old string with the new to account for - // text-corrections or other input that modify existing text - for (let i = 0; i < Math.min(oldLen, newLen); i++) { - if (newValue.charAt(i) != oldValue.charAt(i)) { - inputs = newLen - i; - backspaces = oldLen - i; - break; - } - } - - // Send the key events - for (let i = 0; i < backspaces; i++) { - UI.rfb.sendKey(KeyTable.XK_BackSpace, "Backspace"); - } - for (let i = newLen - inputs; i < newLen; i++) { - UI.rfb.sendKey(keysyms.lookup(newValue.charCodeAt(i))); - } - - // Control the text content length in the keyboardinput element - if (newLen > 2 * UI.defaultKeyboardinputLen) { - UI.keyboardinputReset(); - } else if (newLen < 1) { - // There always have to be some text in the keyboardinput - // element with which backspace can interact. - UI.keyboardinputReset(); - // This sometimes causes the keyboard to disappear for a second - // but it is required for the android keyboard to recognize that - // text has been added to the field - event.target.blur(); - // This has to be ran outside of the input handler in order to work - setTimeout(event.target.focus.bind(event.target), 0); - } else { - UI.lastKeyboardinput = newValue; - } - }, - -/* ------^------- - * /KEYBOARD - * ============== - * EXTRA KEYS - * ------v------*/ - - openExtraKeys() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_modifiers') - .classList.add("noVNC_open"); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.add("noVNC_selected"); - }, - - closeExtraKeys() { - document.getElementById('noVNC_modifiers') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.remove("noVNC_selected"); - }, - - toggleExtraKeys() { - if (document.getElementById('noVNC_modifiers') - .classList.contains("noVNC_open")) { - UI.closeExtraKeys(); - } else { - UI.openExtraKeys(); - } - }, - - sendEsc() { - UI.sendKey(KeyTable.XK_Escape, "Escape"); - }, - - sendTab() { - UI.sendKey(KeyTable.XK_Tab, "Tab"); - }, - - toggleCtrl() { - const btn = document.getElementById('noVNC_toggle_ctrl_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Control_L, "ControlLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Control_L, "ControlLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - toggleWindows() { - const btn = document.getElementById('noVNC_toggle_windows_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Super_L, "MetaLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Super_L, "MetaLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - toggleAlt() { - const btn = document.getElementById('noVNC_toggle_alt_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Alt_L, "AltLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Alt_L, "AltLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - sendCtrlAltDel() { - UI.rfb.sendCtrlAltDel(); - // See below - UI.rfb.focus(); - UI.idleControlbar(); - }, - - sendKey(keysym, code, down) { - UI.rfb.sendKey(keysym, code, down); - - // Move focus to the screen in order to be able to use the - // keyboard right after these extra keys. - // The exception is when a virtual keyboard is used, because - // if we focus the screen the virtual keyboard would be closed. - // In this case we focus our special virtual keyboard input - // element instead. - if (document.getElementById('noVNC_keyboard_button') - .classList.contains("noVNC_selected")) { - document.getElementById('noVNC_keyboardinput').focus(); - } else { - UI.rfb.focus(); - } - // fade out the controlbar to highlight that - // the focus has been moved to the screen - UI.idleControlbar(); - }, - -/* ------^------- - * /EXTRA KEYS - * ============== - * MISC - * ------v------*/ - - updateViewOnly() { - if (!UI.rfb) return; - UI.rfb.viewOnly = UI.getSetting('view_only'); - - // Hide input related buttons in view only mode - if (UI.rfb.viewOnly) { - document.getElementById('noVNC_keyboard_button') - .classList.add('noVNC_hidden'); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.add('noVNC_hidden'); - document.getElementById('noVNC_clipboard_button') - .classList.add('noVNC_hidden'); - } else { - document.getElementById('noVNC_keyboard_button') - .classList.remove('noVNC_hidden'); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.remove('noVNC_hidden'); - document.getElementById('noVNC_clipboard_button') - .classList.remove('noVNC_hidden'); - } - }, - - updateShowDotCursor() { - if (!UI.rfb) return; - UI.rfb.showDotCursor = UI.getSetting('show_dot'); - }, - - updateLogging() { - WebUtil.initLogging(UI.getSetting('logging')); - }, - - updateDesktopName(e) { - UI.desktopName = e.detail.name; - // Display the desktop name in the document title - document.title = e.detail.name + " - " + PAGE_TITLE; - }, - - bell(e) { - if (WebUtil.getConfigVar('bell', 'on') === 'on') { - const promise = document.getElementById('noVNC_bell').play(); - // The standards disagree on the return value here - if (promise) { - promise.catch((e) => { - if (e.name === "NotAllowedError") { - // Ignore when the browser doesn't let us play audio. - // It is common that the browsers require audio to be - // initiated from a user action. - } else { - Log.Error("Unable to play bell: " + e); - } - }); - } - } - }, - - //Helper to add options to dropdown. - addOption(selectbox, text, value) { - const optn = document.createElement("OPTION"); - optn.text = text; - optn.value = value; - selectbox.options.add(optn); - }, - -/* ------^------- - * /MISC - * ============== - */ -}; - -// Set up translations -const LINGUAS = ["cs", "de", "el", "es", "fr", "ja", "ko", "nl", "pl", "pt_BR", "ru", "sv", "tr", "zh_CN", "zh_TW"]; -l10n.setup(LINGUAS); -if (l10n.language === "en" || l10n.dictionary !== undefined) { - UI.prime(); -} else { - fetch('app/locale/' + l10n.language + '.json') - .then((response) => { - if (!response.ok) { - throw Error("" + response.status + " " + response.statusText); - } - return response.json(); - }) - .then((translations) => { l10n.dictionary = translations; }) - .catch(err => Log.Error("Failed to load translations: " + err)) - .then(UI.prime); -} - -// AAW function addition -function readQueryVariable(name, defaultValue) { - // A URL with a query parameter can look like this: - // https://www.example.com?myqueryparam=myvalue - // - // Note that we use location.href instead of location.search - // because Firefox < 53 has a bug w.r.t location.search - const re = new RegExp('.*[?&]' + name + '=([^&#]*)'), match = document.location.href.match(re); - if (typeof defaultValue === 'undefined') { defaultValue = null; } - if (match) { - // We have to decode the URL since want the cleartext value - return decodeURIComponent(match[1]); - } - return defaultValue; -} - -export default UI; \ No newline at end of file diff --git a/output/remote-desktop/novnc/vnc_lite.html b/output/remote-desktop/novnc/vnc_lite.html deleted file mode 100644 index 47c393ac1..000000000 --- a/output/remote-desktop/novnc/vnc_lite.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - noVNC - - - - - - - - - -
-
Loading
-
Send CtrlAltDel
-
-
- -
- - \ No newline at end of file diff --git a/output/remote-desktop/openmpp.png b/output/remote-desktop/openmpp.png deleted file mode 100644 index 0dcdbd4e4..000000000 Binary files a/output/remote-desktop/openmpp.png and /dev/null differ diff --git a/output/remote-desktop/pip.conf b/output/remote-desktop/pip.conf deleted file mode 100644 index 047b6393e..000000000 --- a/output/remote-desktop/pip.conf +++ /dev/null @@ -1,4 +0,0 @@ -[global] -trusted-host = artifactory.cloud.statcan.ca -index-url = https://artifactory.cloud.statcan.ca/artifactory/pypi-remote/ -timeout = 300 \ No newline at end of file diff --git a/output/remote-desktop/qgis-2022.gpg.key b/output/remote-desktop/qgis-2022.gpg.key deleted file mode 100644 index fd866eca2..000000000 --- a/output/remote-desktop/qgis-2022.gpg.key +++ /dev/null @@ -1,41 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBGLxBh0BEADMrPJ64egoZWUOWLgLQOhkfLh9K/clkHeHOD/Su76yhNrKrWZT -vqQM/sN3RBEWTtAXUkRK7xrZmtaz+6jlpT5A1XxbEMEBDyBQ7KCScFKPb1RRgM2T -ZB20CjXQzK2SKKcF5MaYFuPoXGyagBbMOjjU9Vp/gM5M4nN7N5TplElXR7BC1cWx -pg+NC/c4zw2S1dTY2joe/frEvoQSiKbxyOwhd74MlC5R/Fe1EfPoXiGoLd+Qal6w -FQpBVYsgOY8JmiQQ7rNLkh2h8Xbv8MsgN+vV0HMCxGXg8OfGdQZxXgGfaqFwTyD4 -HE39J4PR1elvHG/vyfpXzgpdXUyH71E6NQOzb5Nw0E1USeiiwRWRLkl8wsekoKLw -sp0M2EXIFwmo3OJ5Ms6yjJMk10uwCIMSlxJLgzzOHd++1pNIw2iOF8IWmsZlFQg7 -SLkraOYpjSBCePN8vC4NyuhKpqW6jc0xlx3nPLkciNBKmQhpERQMiClmFR7SQahR -mmAGk0gMzZVKJEj99AfX4AeGA7Vme+aLXxEFzrHwHQZSwi1M6Au/TikqsHJi9DmP -AAcX88J8LKBjYEMuZ++fzD7DXd+NvY1D9v3130fE/NrTbn+WznnwJ7kxgSZFm6zS -W7NtBoPvIzBLYC7tummKXeY8OAqmT9WxXB6EbJR39LhR3oJy64Xt30OJfwARAQAB -tE9RR0lTIEFyY2hpdmUgQXV0b21hdGljIFNpZ25pbmcgS2V5ICgyMDIyLTIwMjcp -IDxxZ2lzLWRldmVsb3BlckBsaXN0cy5vc2dlby5vcmc+iQJVBBMBCgA/FiEELX40 -QacH/bPnBZRB0VW45qQZxb4FAmLxBh0CGy8FCQlnK4MGCwkIBwMCBRUKCQgLBRYD -AQIAAh4BAheAAAoJENFVuOakGcW+TggQAKK8dV/FRxmLUok0ZkIr+RLRKaLoUX49 -j9RLKwF1/kWj8HTkcpU7rxBFS7JLuJCJdKLL0fHBGxAEi5W5nmsyLEDg00+rtklp -RU386nSG+C99sFvS/zgxu3S4I3C4MQFlmmtuzJQaLRBzHDuTt0p3nnARBQTdP681 -Nvvx7pVy4l1iIw0569n2/IbwAAK4VjPD0LWz307Htq2vSjiJJDSfbmWThIB98Yhb -Rh3xsPQZKeEoEGVUOcRuGRjDNJ8LUlF7MDFpwJhVn/M93LGWDaUUfZdag/EBSClC -8jCxyJBN4M+2lPenOqHwxAMJteu1GiakL2JVfK/c1fxq2rCkt7Wzx1Lg33dX2q7W -FeuzI6rblrIPAbZZPoxhU70JseOy3DTCDVGk+oORTbxdjpN/mLBbmGpkRKkMrDGD -v9K3H/GdlcVKoL44sIywLQ3gotfpRwTj3To/D8rgFIyErsaD31BOwM4OjBSQ2BRu -QDJFi3E6Gba3HagXO2h1yTw8hYk13uC52UPzspy+otYL7q7G2keeHWL28J4XIKMO -923jdZBGDrk3X1e+UPSMZiRiO1dMKUN7MunXEARMZXQMAgqZQY/G7BEjrTFiNZ0i -liJ42SIA9UbOVmRwSDYLKTVov0820cqXDLCEVQ4k2QTo8jm9lapU7SQD4QdGgBmZ -dqsO8kDJoe4diQIzBBABCgAdFiEEJEXWslTaxFKkmJieRrVyHbvSmWoFAmLxBx8A -CgkQRrVyHbvSmWrS8BAAuLbvtSDnk8Gy8gDScXvK/1ZIXBXfjq73tGR8Evt8vvb3 -sYcAxOYMi2I0J0mpwoAoS4AuqMUvVGlqW2Zf7tWxa5FbnAtOyQpskCn09N3rZRzk -qiLuMz4/EAY2t/RL2tujjYY4f1OzgaWwcB6lcia745jQXxsH2eHMSz3VRdSVOUIZ -6d0zERj/xsUcDAT+H45bhseMV7TuS1t8RMF55Q42AJrI0CSApdy+ZT0vsk7cm3Q1 -dMhs0+89l0ixnV3cAdkzdzHzKfX+E7tEfFKLd2ALdxcQ36Hx2Dc4MEkzVmM48Ww1 -ygNVhZARXoHxSvi6DWrT4URcQgcQV8ExnaioKgHkzuzelzfZisTn8TDPK+cjF0Zc -BRkpCCX/8RJ2NgUCK7TRx4KVSPnLt3V1C33yIUMSB9Q0gacUhu/Gx2TGcZAlCo8O -FJ+W9VuwvQGKQGUaZD+8cR+d/KogowlfFTnvxVVaCGvK8Biy2aFk0RrtfxvHduI1 -Bwne1/xLjbgUYuSkLZyX/nLkpMGXdpyzruwvsCCaY5WtL5D54cHLG+Sw3OBim9RF -26QZApT5OpSVCKOGanDhdIFMXpTc3AgNRIPDKY5BAn+CQ/8ptOBh2sUxwLALa5s3 -2DaTIpJxri5h7kfzmwIge4ECJ7/48didAjVMaMCy5M3eeXgNoKtCPJEyWnnjIYs= -=//+R ------END PGP PUBLIC KEY BLOCK----- diff --git a/output/remote-desktop/remote-desktop/README.md b/output/remote-desktop/remote-desktop/README.md deleted file mode 100644 index e56dd1b83..000000000 --- a/output/remote-desktop/remote-desktop/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Remote-Desktop helper scripts - -Installs applications to the remote desktop. Note that if you want to add more applications you may also -want to provide a `.desktop` file if you want it to; - --- Appear on the desktop - --- have a French translation (as the name, on the hover over, in the description) - --- appear under certain categories under the dropdown diff --git a/output/remote-desktop/remote-desktop/firefox.sh b/output/remote-desktop/remote-desktop/firefox.sh deleted file mode 100644 index 5e462e965..000000000 --- a/output/remote-desktop/remote-desktop/firefox.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -# Stops script execution if a command has an error -set -e - -SHA256=e70b282ed0b8ce42981675ca2bc9a69fbad23f31f71fbd700b52dcf79e57761c - -function disableUpdate() { - ff_def="$1/browser/defaults/profile" - mkdir -p $ff_def - printf ' -user_pref("app.update.auto", false); -user_pref("app.update.enabled", false); -user_pref("app.update.checkInstallTime", false); -user_pref("app.update.silent", false); -user_pref("app.update.staging.enabled", false); -user_pref("app.update.badge", false); -user_pref("browser.shell.checkDefaultBrowser", false); -user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1182011519); -user_pref("app.update.lastUpdateTime.background-update-timer", 1182011519); -user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1182010203); -user_pref("app.update.lastUpdateTime.microsummary-generator-update-timer", 1222586145); -user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1182010203);' > $ff_def/user.js -} -function instFF() { - if [ ! "${1:0:1}" == "" ]; then - FF_VERS=$1 - if [ ! "${2:0:1}" == "" ]; then - FF_INST=$2 - echo "download Firefox $FF_VERS and install it to '$FF_INST'." - mkdir -p "$FF_INST" - FF_URL=http://releases.mozilla.org/pub/firefox/releases/$FF_VERS/linux-x86_64/en-US/firefox-$FF_VERS.tar.bz2 - echo "FF_URL: $FF_URL" - wget --quiet $FF_URL -O /tmp/firefox.tar.bz2 - echo "${SHA256} /tmp/firefox.tar.bz2" | sha256sum -c - - tar xvjf /tmp/firefox.tar.bz2 --strip=1 -C $FF_INST/ - ln -s "$FF_INST/firefox" /usr/bin/firefox - rm /tmp/firefox.tar.bz2 - # Create desktop icon - printf "[Desktop Entry]\nVersion=1.0\nEncoding=UTF-8\nName=Firefox\nComment=Browse the World Wide Web\nComment[fr]=Naviguer sure le Web\nExec=firefox\nTerminal=false\nX-MultipleArgs=false\nType=Application\nIcon=/usr/lib/firefox/browser/chrome/icons/default/default128.png\nCategories=GNOME;GTK;Network;WebBrowser;\nStartupNotify=true;" > /usr/share/applications/firefox.desktop - # MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; - disableUpdate $FF_INST - exit $? - fi - fi - echo "function parameter are not set correctly please call it like 'instFF [version] [install path]'" - exit -1 -} - -if ! hash firefox 2>/dev/null; then - echo "Installing Firefox. Please wait..." - instFF '117.0.1' '/usr/lib/firefox' -else - echo "Firefox is already installed" -fi diff --git a/output/remote-desktop/remote-desktop/fix-permissions b/output/remote-desktop/remote-desktop/fix-permissions deleted file mode 100644 index 4c20c19af..000000000 --- a/output/remote-desktop/remote-desktop/fix-permissions +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Based on: https://github.com/jupyter/docker-stacks/blob/master/base-notebook/fix-permissions -# set permissions on a directory -# after any installation, if a directory needs to be (human) user-writable, -# run this script on it. -# It will make everything in the directory owned by the group with $USER_GID -# and writable by that group. -# Deployments that want to set a specific user id can preserve permissions -# by adding the `--group-add users` line to `docker run`. - -# uses find to avoid touching files that already have the right permissions, -# which would cause massive image explosion - -# right permissions are: -# group=$USER_GID -# AND permissions include group rwX (directory-execute) -# AND directories have setuid,setgid bits set - -# Exit immediately if a command exits with a non-zero status. -set -e - -#if [ -z "$USER_GID" ]; then -if [ -z "$NB_UID" ]; then - echo "Please set a user GID via NB_UID env varibale." - exit 1 -fi - -for d in $@; do - find "$d" \ - ! \( \ - -group $NB_UID \ - -a -perm -g+rwX \ - \) \ - -exec chgrp $NB_UID {} \; \ - -exec chmod g+rwX {} \; - # setuid,setgid *on directories only* - find "$d" \ - \( \ - -type d \ - -a ! -perm -6000 \ - \) \ - -exec chmod +6000 {} \; -done diff --git a/output/remote-desktop/remote-desktop/minio-launch.py b/output/remote-desktop/remote-desktop/minio-launch.py deleted file mode 100644 index 29d5b35d6..000000000 --- a/output/remote-desktop/remote-desktop/minio-launch.py +++ /dev/null @@ -1,20 +0,0 @@ -import json -from selenium.webdriver.common.keys import Keys -from selenium import webdriver -import os.path - -with open('/vault/secrets/minio-standard-tenant-1.json') as f: - d = json.load(f) - accessKey= d["MINIO_ACCESS_KEY"] - secretKey= d["MINIO_SECRET_KEY"] - -driver = webdriver.Firefox(executable_path="/usr/bin/geckodriver") -driver.get("https://minio-standard-tenant-1.covid.cloud.statcan.ca/minio/login") - -access_key= '//*[@id="accessKey"]' -secret_key= '//*[@id="secretKey"]' -submit_form= '/html/body/div[2]/div/div[1]/form/button' - -driver.find_element_by_xpath(access_key).send_keys(accessKey) -driver.find_element_by_xpath(secret_key).send_keys(secretKey) -driver.find_element_by_name("password").send_keys(Keys.ENTER) \ No newline at end of file diff --git a/output/remote-desktop/remote-desktop/pspp.sh b/output/remote-desktop/remote-desktop/pspp.sh deleted file mode 100644 index 1b89b4343..000000000 --- a/output/remote-desktop/remote-desktop/pspp.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Stops script execution if a command has an error -set -e - -VERSION=1.2.0-3 -SHA256_PSPP=02b15744576cefe92a1f874d8663575caaa71c0e6c60795e8617c23338fc5fc3 -SHA256_LIBREADLINE=01e99d68427722e64c603d45f00063c303b02afb53d85c8d1476deca70db64c6 - -if ! hash pspp 2>/dev/null; then - echo "Installing PSPP. Please wait..." - apt-get update - #install pspp package + needed packages - wget --quiet http://ftp.us.debian.org/debian/pool/main/p/pspp/pspp_${VERSION}_amd64.deb -O ./pspp.deb - echo "${SHA256_PSPP} ./pspp.deb" | sha256sum -c - - wget --quiet http://ftp.us.debian.org/debian/pool/main/r/readline/libreadline7_7.0-5_amd64.deb -O ./libreadline7.deb - echo "${SHA256_LIBREADLINE} ./libreadline7.deb" | sha256sum -c - - apt-get update - apt-get install -y debhelper dh-elpa perl texinfo libspread-sheet-widget-dev libgsl-dev libgtk-3-dev libgtksourceview-3.0-dev libxml2-dev libreadline-dev libglib2.0-dev libcairo2-dev libpango1.0-dev zlib1g-dev pkg-config postgresql libtext-diff-perl libpq-dev emacsen-common - apt-get update - apt upgrade -y - dpkg -i ./libreadline7.deb - dpkg -i ./pspp.deb - #remove - rm ./libreadline7.deb - rm ./pspp.deb - -else - echo "PSPP is already installed" -fi diff --git a/output/remote-desktop/remote-desktop/qgis.sh b/output/remote-desktop/remote-desktop/qgis.sh deleted file mode 100644 index be7c37a78..000000000 --- a/output/remote-desktop/remote-desktop/qgis.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Stops script execution if a command has an error -set -e - -if ! hash qgis 2>/dev/null; then - apt-get update - apt-get install -y gnupg software-properties-common - #Removed tools here, need to put back - cat $RESOURCES_PATH/qgis-2022.gpg.key | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import - chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg - add-apt-repository "deb https://qgis.org/debian `lsb_release -c -s` main" - apt-get update - apt-get install -y qgis qgis-plugin-grass - - -else - echo "QGIS is already installed" -fi - -echo "QGIS and supporting libraries have been installed." diff --git a/output/remote-desktop/remote-desktop/r-studio-desktop.sh b/output/remote-desktop/remote-desktop/r-studio-desktop.sh deleted file mode 100644 index ea73db3d7..000000000 --- a/output/remote-desktop/remote-desktop/r-studio-desktop.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Stops script execution if a command has an error -set -e - -VERSION=1.3.1093 -RELEASE=bionic -SHA256=ff222177fa968f8cf82016e2086bab10ca4bcbe02a4c16f0ecb650151748cf1c - -if ! hash rstudio 2>/dev/null; then - echo "Installing RStudio Desktop. Please wait..." - cd $RESOURCES_PATH - apt-get update - #apt-get install --yes r-base - wget https://download1.rstudio.org/desktop/${RELEASE}/amd64/rstudio-${VERSION}-amd64.deb -O ./rstudio.deb - echo "${SHA256} ./rstudio.deb" | sha256sum -c - - # ld library path makes problems - LD_LIBRARY_PATH="" gdebi --non-interactive ./rstudio.deb - rm ./rstudio.deb - -else - echo "RStudio is already installed" -fi diff --git a/output/remote-desktop/remote-desktop/vs-code-desktop.sh b/output/remote-desktop/remote-desktop/vs-code-desktop.sh deleted file mode 100644 index edd5b3f25..000000000 --- a/output/remote-desktop/remote-desktop/vs-code-desktop.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Stops script execution if a command has an error -set -e - -SHA256=9ba14d46cdb156b415e129c25a3d2eae6f7208914ee3633d33e2f2a2f1d8ec77 -VERSION=1.82.2 - -if [ ! -f "/usr/share/code/code" ]; then - echo "Installing VS Code. Please wait..." - cd $RESOURCES_PATH - wget -q https://update.code.visualstudio.com/${VERSION}/linux-deb-x64/stable -O ./vscode.deb - echo "${SHA256} ./vscode.deb" | sha256sum -c - - apt-get update - apt-get install -y ./vscode.deb - rm ./vscode.deb - rm /etc/apt/sources.list.d/vscode.list -else - echo "VS Code is already installed" -fi diff --git a/output/remote-desktop/restart-oms.sh b/output/remote-desktop/restart-oms.sh deleted file mode 100644 index 3b751c980..000000000 --- a/output/remote-desktop/restart-oms.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -PID=$(pgrep -f bin/oms) -echo "Restarting PID="$PID -kill -HUP $PID \ No newline at end of file diff --git a/output/remote-desktop/sascfg.py b/output/remote-desktop/sascfg.py deleted file mode 100644 index 3d0b2d244..000000000 --- a/output/remote-desktop/sascfg.py +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright SAS Institute -# -# Licensed under the Apache License, Version 2.0 (the License); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# THIS IS AN EXAMPLE CONFIG FILE. PLEASE CREATE YOUR OWN sascfg_personal.py FILE USING THE APPROPRIATE TEMPLATES FROM BELOW -# SEE THE CONFIGURATION DOC AT https://sassoftware.github.io/saspy/install.html#configuration - - -# Configuration Names for SAS - python List -# This is the list of allowed configuration definitions that can be used. The definition are defined below. -# if there is more than one name in the list, and cfgname= is not specified in SASsession(), then the user -# will be prompted to choose which configuration to use. -# -# The various options for the different access methods can be specified on the SASsession() i.e.: -# sas = SASsession(cfgname='default', options='-fullstimer', user='me') -# -# Based upon the lock_down configuration option below, you may or may not be able to override option -# that are defined already. Any necessary option (like user, pw for IOM or HTTP) that are not defined will be -# prompted for at run time. To dissallow overrides of as OPTION, when you don't have a value, simply -# specify options=''. This way it's specified so it can't be overridden, even though you don't have any -# specific value you want applied. -# -#SAS_config_names = ['default', 'ssh', 'iomlinux', 'iomwin', 'winlocal', 'winiomlinux', 'winiomwin', 'httpsviya', 'httpviya', 'iomcom'] -# - -SAS_config_names=['default'] - - - -# Configuration options for saspy - python Dict # not required unless changing any of the defaults -# valid key are: -# -# 'lock_down' - True | False. True = Prevent runtime overrides of SAS_Config values below -# -# 'verbose' - True | False. True = Allow print statements for debug type messages -# -# 'prompt' - True | False. True = Allow prompting as necessary -# -SAS_config_options = {'lock_down': False, - 'verbose' : True, - 'prompt' : True - } - - - -# Configuration options for SAS output. By default output is HTML 5.0 (using "ods html5" statement) but certain templates might not work -# properly with HTML 5.0 so it can also be set to HTML 4.0 instead (using "ods html" statement). This option will only work when using IOM -# in local mode. Note that HTML 4.0 will generate images separately which clutters the workspace and if you download the notebook as HTML, -# the HTML file will need to be put in the same folder as the images for them to appear. -# valid key are: -# -# 'output' = ['html5', 'html'] -# -SAS_output_options = {'output' : 'html5'} # not required unless changing any of the default - - - -# Configuration Definitions -# -# For STDIO and STDIO over SSH access methods -# These need path to SASHome and optional startup options - python Dict -# The default path to the sas start up script is: /usr/local/SASHome/SASFoundation/9.4/sas -# A usual install path is: /usr/local/SASHome -# -# The encoding is figured out by saspy. You don't need to specify it, unless you just want to get rid of the message about which encoding was determined. -# -# valid keys are: -# 'saspath' - [REQUIRED] path to SAS startup script i.e.: /usr/local/SASHome/SASFoundation/9.4/sas -# 'options' - SAS options to include in the start up command line - Python List -# 'encoding' - This is the python encoding value that matches the SAS session encoding your SAS session is using -# -# For passwordless ssh connection, the following are also reuqired: -# 'ssh' - [REQUIRED] the ssh command to run -# 'host' - [REQUIRED] the host to connect to -# -# Additional valid keys for ssh: -# 'port' - [integer] the remote ssh port -# 'tunnel' - [integer] local port to open via reverse tunnel, if remote host cannot otherwise reach this client -# -default = {'saspath' : '/usr/local/SASHome/SASFoundation/9.4/bin/sas_u8' - } - -ssh = {'saspath' : '/usr/local/SASHome/SASFoundation/9.4/bin/sas_en', - 'ssh' : '/usr/bin/ssh', - 'host' : 'remote.linux.host', - 'encoding': 'latin1', - 'options' : ["-fullstimer"] - } - - -# For IOM (Grid Manager or any IOM) and Local Windows via IOM access method -# These configuration definitions are for connecting over IOM. This is designed to be used to connect to any Workspace server, including SAS Grid, via Grid Manager -# and also to connect to a local Windows SAS session. The client side (python and java) for this access method can be either Linux or Windows. -# The STDIO access method above is only for Linux. PC SAS requires this IOM interface. -# -# The absence of the iomhost option triggers local Windows SAS mode. In this case none of 'iomhost', 'iomport', 'omruser', 'omrpw' are needed. -# a local SAS session is started up and connected to. -# -# The encoding is figured out by saspy. You don't need to specify it, unless you just want to get rid of the message about which encoding was determined. - -# NONE OF THE PATHS IN THESE EAMPLES ARE RIGHT FOR YOUT INSTALL. YOU HAVE TO CHANGE THE PATHS TO BE CORRECT FOR YOUR INSTALLATION -# -# valid keys are: -# 'java' - [REQUIRED] the path to the java executable to use -# 'iomhost' - [REQUIRED for remote IOM case, Don't specify to use a local Windows Session] the resolvable host name, or ip to the IOM server to connect to -# 'iomport' - [REQUIRED for remote IOM case, Don't specify to use a local Windows Session] the port IOM is listening on -# 'authkey' - identifier for user/password credentials to read from .authinfo file. Eliminates prompting for credentials. -# 'omruser' - not suggested [REQUIRED for remote IOM case but PROMPTED for at runtime] Don't specify to use a local Windows Session -# 'omrpw' - really not suggested [REQUIRED for remote IOM case but PROMPTED for at runtime] Don't specify to use a local Windows Session -# 'encoding' - This is the python encoding value that matches the SAS session encoding of the IOM server you are connecting to -# 'appserver' - name of physical workspace server (when more than one app server defined in OMR) i.e.: 'SASApp - Workspace Server' -# 'sspi' - boolean. use IWA instead of user/pw to connect to the IOM workspace server - - -iomlinux = {'java' : '/usr/bin/java', - 'iomhost' : 'linux.iom.host', - 'iomport' : 8591, - } - -iomwin = {'java' : '/usr/bin/java', - 'iomhost' : 'windows.iom.host', - 'iomport' : 8591, - } - -winlocal = {'java' : 'java', - 'encoding' : 'windows-1252', - } - -winiomlinux = {'java' : 'java', - 'iomhost' : 'linux.iom.host', - 'iomport' : 8591, - } - -winiomwin = {'java' : 'java', - 'iomhost' : 'windows.iom.host', - 'iomport' : 8591, - } - -winiomIWA = {'java' : 'java', - 'iomhost' : 'windows.iom.host', - 'iomport' : 8591, - 'sspi' : True - } - - -# For Remote and Local IOM access methods using COM interface -# These configuration definitions are for connecting over IOM using COM. This -# access method is for Windows clients connecting to remote hosts. Local -# SAS instances may also be supported. -# -# This access method does not require a Java dependency. -# -# Valid Keys: -# iomhost - Required for remote connections only. The Resolvable SAS -# server dns name. -# iomport - Required for remote connections only. The SAS workspace -# server port. Generally 8591 on standard remote -# installations. For local connections, 0 is the default. -# class_id - Required for remote connections only. The IOM workspace -# server class identifier. Use `PROC IOMOPERATE` to identify -# the correct value. This option is ignored on local connections. -# provider - [REQUIRED] IOM provider. "sas.iomprovider" is recommended. -# encoding - This is the python encoding value that matches the SAS -# session encoding of the IOM server. -# omruser - SAS user. This option is ignored on local connections. -# omrpw - SAS password. This option is ignored on local connections. -# authkey - Identifier for credentials to read from .authinfo file. - -iomcom = { - 'iomhost' : 'mynode.mycompany.org', - 'iomport' : 8591, - 'class_id': '440196d4-90f0-11d0-9f41-00a024bb830c', - 'provider': 'sas.iomprovider', - 'encoding': 'windows-1252'} - - -# HTTP access method to connect to the Compute Service -# These need ip addr, other values will be prompted for - python Dict -# valid keys are: -# 'url' - (Required if ip not specified) The URL to Viya, of the form "http[s]://host.idenifier[:port]". -# When this is specified, ip= will not be used, as the host's ip is retrieved from the url. Also, ssl= is -# set based upon http or https and port= is also parsed from the url, if provided, else defaulted based -# upon the derived ssl= value. So neither ip, port nor ssl are needed when url= is used. -# 'ip' - (Required if url not specified) The resolvable host name, or IP address to the Viya Compute Service -# 'port' - port; the code Defaults this to based upon the 'ssl' key; 443 default else 80 -# 'ssl' - whether to use HTTPS or just HTTP protocal. Default is True, using ssl and poort 443 -# 'context' - context name defined on the compute service [PROMTED for at runtime if more than one defined] -# 'authkey' - identifier for user/password credentials to read from .authinfo file. Eliminates prompting for credentials. -# 'options' - SAS options to include (no '-' (dashes), just option names and values) -# 'user' - not suggested [REQUIRED but PROMTED for at runtime] -# 'pw' - really not suggested [REQUIRED but PROMTED for at runtime] -# -# - -httpsviya = {'ip' : 'sastpw.rndk8s.openstack.sas.com', - 'context' : 'Data Mining compute context', - 'authkey' : 'viya_user-pw', - 'options' : ["fullstimer", "memsize=1G"] - } - -httpviya = {'ip' : 'sastpw.rndk8s.openstack.sas.com', - 'ssl' : False, # this will use port 80 - 'context' : 'Data Mining compute context', - 'authkey' : 'viya_user-pw', - 'options' : ["fullstimer", "memsize=1G"] - } diff --git a/output/remote-desktop/sasv9_local.cfg b/output/remote-desktop/sasv9_local.cfg deleted file mode 100644 index 88b45878e..000000000 --- a/output/remote-desktop/sasv9_local.cfg +++ /dev/null @@ -1,18 +0,0 @@ -/* This config file contains user specific configuration options which - override the installation default values. This file is left intact during - the installation process so modifications to this file will remain after - SAS Service Pack upgrades to the SAS system. - - However the default config file, sasv9.cfg, does get generated during - SAS Service Pack upgrades to the SAS system therefore any user - modifications made there will be overwritten in the upgrade process. - - After applying a SAS Service Pack, you should compare the backed up version - of the configuration file with the newly generated version. You are - encouraged to copy any configuration changes you wish to keep to this file - instead of sasv9.cfg so that they may be retained after the installation - of further SAS Service Packs. -*/ - - --PATH "/usr/local/SASHome/gensys/G-CONFID107003ELNX6494M7" diff --git a/output/remote-desktop/shell_helpers.sh b/output/remote-desktop/shell_helpers.sh deleted file mode 100755 index ff26f9038..000000000 --- a/output/remote-desktop/shell_helpers.sh +++ /dev/null @@ -1,39 +0,0 @@ -# This content is appended to ~/.bashrc and ~/.zshrc at notebook boot. -# - -NAMESPACE=$(echo $NB_PREFIX | awk -F '/' '{print $3}') - -cat <> ~/.bashrc - -# Clone example notebooks (with retries) -RETRIES_NO=5 -RETRY_DELAY=3 -for i in $(seq 1 $RETRIES_NO); do - test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break - echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO" - #if it ran all the retries, exit - [[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries" - sleep ${RETRY_DELAY} -done - -if [ ! -e /home/$NB_USER/.Rprofile ]; then - cat /tmp/.Rprofile >> /home/$NB_USER/.Rprofile && rm -rf /tmp/.Rprofile -fi - -# Configure the shell! If not already configured. -if [ ! -f /home/$NB_USER/.zsh-installed ]; then - if [ -f /tmp/oh-my-zsh-install.sh ]; then - sh /tmp/oh-my-zsh-install.sh --unattended --skip-chsh - fi - - if conda --help > /dev/null 2>&1; then - conda init bash - conda init zsh - fi - cat /tmp/shell_helpers.sh >> /home/$NB_USER/.bashrc - cat /tmp/shell_helpers.sh >> /home/$NB_USER/.zshrc - touch /home/$NB_USER/.zsh-installed - touch /home/$NB_USER/.hushlogin -fi - -# add rm wrapper: -# https://jirab.statcan.ca/browse/ZPS-40 -mkdir -p /home/$NB_USER/.local/bin/ -git clone https://gitlab.k8s.cloud.statcan.ca/zone/build-scripts/snippets/415.git /home/$NB_USER/.local/bin/rm-git -mv /home/$NB_USER/.local/bin/rm-git/rm /home/$NB_USER/.local/bin/rm -rm -rf /home/$NB_USER/.local/bin/rm-git -chmod +x /home/$NB_USER/.local/bin/rm - -export VISUAL="/usr/bin/nano" -export EDITOR="$VISUAL" - -echo "shell has been configured" - -# create .profile -cat < $HOME/.profile -if [ -n "$BASH_VERSION" ]; then - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi -fi -EOF - -echo ".profile has been created" - -# Configure the language -if [ -n "${KF_LANG}" ]; then - if [ "${KF_LANG}" = "en" ]; then - export LANG="en_US.utf8" - else - export LANG="fr_CA.utf8" - # User's browser lang is set to French, open jupyterlab and vs_code in French (fr_FR) - if [ "${DEFAULT_JUPYTER_URL}" != "/rstudio" ]; then - export LANG="fr_FR" - lang_file="/home/${NB_USER}/.jupyter/lab/user-settings/@jupyterlab/translation-extension/plugin.jupyterlab-settings" - mkdir -p "$(dirname "${lang_file}")" && touch $lang_file - ( echo '{' - echo ' // Langue' - echo ' // @jupyterlab/translation-extension:plugin' - echo ' // Paramètres de langue.' - echo -e ' // ****************************************\n' - echo ' // Langue locale' - echo ' // Définit la langue d'\''affichage de l'\''interface. Exemples: '\''es_CO'\'', '\''fr'\''.' - echo ' "locale": "'${LANG}'"' - echo '}' - ) > $lang_file - vscode_language="${CS_DEFAULT_HOME}/User/argv.json" - echo "{\"locale\":\"fr\"}" >> $vscode_language - fi - fi -fi - -echo "language has been configured" - -# Configure KFP multi-user -if [ -n "${NB_NAMESPACE}" ]; then -mkdir -p $HOME/.config/kfp -cat < $HOME/.config/kfp/context.json -{"namespace": "${NB_NAMESPACE}"} -EOF -fi - -echo "KFP multi-user has been configured" - -# Introduced by RStudio 1.4 -# See https://github.com/jupyterhub/jupyter-rsession-proxy/issues/95 -# And https://github.com/blairdrummond/jupyter-rsession-proxy/blob/master/jupyter_rsession_proxy/__init__.py -export RSERVER_WWW_ROOT_PATH=$NB_PREFIX/rstudio - -# Remove a Jupyterlab 2.x config setting that breaks Jupyterlab 3.x -NOTEBOOK_CONFIG="$HOME/.jupyter/jupyter_notebook_config.json" -NOTEBOOK_CONFIG_TMP="$HOME/.jupyter/jupyter_notebook_config.json.tmp" - -if [ -f "$NOTEBOOK_CONFIG" ]; then - jq 'del(.NotebookApp.server_extensions)' "$NOTEBOOK_CONFIG" > "$NOTEBOOK_CONFIG_TMP" \ - && mv -f "$NOTEBOOK_CONFIG_TMP" "$NOTEBOOK_CONFIG" -fi - -echo "broken configuration settings removed" - -export NB_NAMESPACE=$(echo $NB_PREFIX | awk -F '/' '{print $3}') -export JWT="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" - -# Have NB_PREFIX and NB_NAMESPACE available in R and Rstudio -echo "NB_PREFIX=${NB_PREFIX}" >> /opt/conda/lib/R/etc/Renviron -echo "NB_NAMESPACE=$NB_NAMESPACE" >> /opt/conda/lib/R/etc/Renviron - -# change python location for vscode -pythonInterpreterPath='{"python.defaultInterpreterPath": "/opt/conda/bin/python"}' - -if [ ! -d /home/jovyan/workspace/.vscode ]; then - mkdir -p /home/jovyan/workspace/.vscode; -fi - -if [ ! -f /home/jovyan/workspace/.vscode/settings.json ]; then - #Not found - echo "$pythonInterpreterPath" > /home/jovyan/workspace/.vscode/settings.json -else - echo "$pythonInterpreterPath" > /home/jovyan/workspace/.vscode/settings.json -fi - -# Revert forced virtualenv, was causing issues with users -#export PIP_REQUIRE_VIRTUALENV=true -#echo "Checking if Python venv exists" -#if [[ -d "base-python-venv" ]]; then -# echo "Base python venv exists, not going to create again" -#else -# echo "Creating python venv" -# python3 -m venv $HOME/base-python-venv -# echo "adding include-system-site-packages" -#fi - -echo "Checking for .condarc file in hom directory" -if [[ -f "$HOME/.condarc" ]]; then - echo ".condarc file exists, not going to do anything" -else - echo "Creating basic .condarc file" - printf 'envs_dirs:\n - $HOME/.conda/envs' > $HOME/.condarc -fi - -printenv | grep KUBERNETES >> /opt/conda/lib/R/etc/Renviron - -# Copy default config and extensions on first start up -if [ ! -d "$CS_DEFAULT_HOME/Machine" ]; then - echo "Creating code-server default settings and extentions" - mkdir -p "$CS_DEFAULT_HOME" - cp -r "$CS_TEMP_HOME/." "$CS_DEFAULT_HOME" -fi - -# Create default user directory -if [ ! -d "$HOME/workspace" ]; then - echo "Creating default user directory" - mkdir -p "$HOME/workspace" - mkdir -p "$HOME/workspace/data" - mkdir -p "$HOME/workspace/repositories" -fi - -# Add sasstudio default -if [[ -z "${SASSTUDIO_TEMP_HOME}" ]]; then - echo "No sas studio default settings created" -else - echo "Creating sas studio default settings" - mkdir -p "$HOME/.sasstudio" - cp -r "$SASSTUDIO_TEMP_HOME/." "$HOME/.sasstudio" -fi - -# Retrieve service account details -serviceaccountname=`kubectl get secret artifactory-creds -n $NB_NAMESPACE --template={{.data.Username}} | base64 --decode` -serviceaccounttoken=`kubectl get secret artifactory-creds -n $NB_NAMESPACE --template={{.data.Token}} | base64 --decode` -conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-forge-remote/ -conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-pytorch-remote/ -conda config --add channels https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/conda-nvidia-remote/ -conda config --remove channels 'defaults' - -pip config set global.index-url https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/api/pypi/pypi-remote/simple - -# if rprofile doesnt exist -if [ ! -d "/opt/conda/lib/R/etc/Rprofile.site" ]; then - echo "Creating rprofile" - cat > /opt/conda/lib/R/etc/Rprofile.site<< EOF -options(jupyter.plot_mimetypes = c('text/plain', 'image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf')) -local({ - r <- list("cran-remote" = "https://$serviceaccountname:$serviceaccounttoken@artifactory.cloud.statcan.ca/artifactory/rpug-cran/") - options(repos = r) -}) -EOF -fi - -echo "--------------------starting jupyter--------------------" - -/opt/conda/bin/jupyter server --notebook-dir=/home/${NB_USER} \ - --ip=0.0.0.0 \ - --no-browser \ - --port=8888 \ - --ServerApp.token='' \ - --ServerApp.password='' \ - --ServerApp.allow_origin='*' \ - --ServerApp.authenticate_prometheus=False \ - --ServerApp.base_url=${NB_PREFIX} \ - --ServerApp.default_url=${DEFAULT_JUPYTER_URL:-/tree} - -echo "--------------------shutting down, persisting VS_CODE settings--------------------" diff --git a/output/remote-desktop/start-oms.sh b/output/remote-desktop/start-oms.sh deleted file mode 100644 index 075afc0a5..000000000 --- a/output/remote-desktop/start-oms.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env bash -# -# It does: -# ulimit -S -s 65536 -# OM_ROOT=${OM_ROOT} bin/oms -oms.Listen http://localhost:${OMS_PORT} -oms.HomeDir models/home -oms.AllowDownload -oms.AllowUpload -oms.AllowMicrodata -oms.LogRequest -# -# Environment: -# OM_ROOT - openM++ root folder, default: current directory -# OMS_PORT - oms web-service port to listen, default: 4040 - -# set -e -set -m - -# large models may require stack limit increase -# -ulimit -S -s 65536 -status=$? - -if [ $status -ne 0 ] ; -then - echo "FAILED to set: ulimit -S -s 65536" - echo -n "Press Enter to exit..." - read any - exit $status -fi - -# set openM++ root folder -# -self=$(basename $0) - -OM_ROOT="$OMPP_INSTALL_DIR" - -[ "$OM_ROOT" != "$PWD" ] && pushd $OM_ROOT - -# allow to use $MODEL_NAME.ini file in UI for model run -export OM_CFG_INI_ALLOW=true -export OM_CFG_INI_ANY_KEY=true -export OMS_URL=${JUPYTER_SERVER_URL}ompp - -# OpenM++ default configuraton -if [ "$KUBERNETES_SERVICE_HOST" =~ ".131." ] || [ -z $KUBERNETES_SERVICE_HOST ]; then - #DEV or Localhost - export OMS_MODEL_DIR=/home/jovyan/models - export OMS_LOG_DIR=/home/jovyan/logs - export OMS_HOME_DIR=/home/jovyan/ -else - if [ -d "/etc/protb" ]; then - export OMS_MODEL_DIR=/home/jovyan/buckets/aaw-protected-b/microsim/models - export OMS_LOG_DIR=/home/jovyan/buckets/aaw-protected-b/microsim/logs - export OMS_HOME_DIR=/home/jovyan/buckets/aaw-protected-b/microsim/ - else - export OMS_MODEL_DIR=/home/jovyan/buckets/aaw-unclassified/microsim/models - export OMS_LOG_DIR=/home/jovyan/buckets/aaw-unclassified/microsim/logs - export OMS_HOME_DIR=/home/jovyan/buckets/aaw-unclassified/microsim/ - fi -fi - -# Create models directory if it doesn't exist: -if [ ! -d "$OMS_MODEL_DIR" ]; then - mkdir -p "$OMS_MODEL_DIR" -fi - -# Create model log directory if it doesn't exist: -if [ ! -d "$OMS_LOG_DIR" ]; then - mkdir -p "$OMS_LOG_DIR" -fi - -# Copy sample models from openmpp installation archive into models directory: -# cp -r "$OMPP_INSTALL_DIR/models/." "$OMS_MODEL_DIR" - -# These three environment variables don't persist so let's try using a file: -echo "$OMS_HOME_DIR" > $OM_ROOT/etc/oms_home_dir -echo "$OMS_MODEL_DIR" > $OM_ROOT/etc/oms_model_dir -echo "$OMS_LOG_DIR" > $OM_ROOT/etc/oms_log_dir - - -# Import openmpp repo to get scripts and templates needed to run mpi jobs via kubeflow: -if [ ! -d /openmpp ] - then - git clone https://github.com/StatCan/openmpp.git -fi -cd openmpp -branch="main" -state=$(git symbolic-ref --short HEAD 2>&1) -if [ $state != $branch ] - then - git checkout $branch -fi -git pull -cd mpi-job-files - -# Copy scripts and templates into openmpp installation bin and etc folders: -cp dispatchMPIJob.sh parseCommand.py "$OM_ROOT/bin/" -cp mpi.kubeflow.template.txt MPIJobTemplate.yaml "$OM_ROOT/etc/" - -# Delete the default mpi golang template that does not work in our context: -rm -f "$OM_ROOT/etc/mpi.ModelRun.template.txt" - -# Making sure these can execute: -chmod +x dispatchMPIJob.sh parseCommand.py - -# Remove repo as it's not needed anymore: -cd "$OM_ROOT" && rm -rf openmpp - -# Output various oms settings to console: -[ -z "$OMS_PORT" ] && OMS_PORT=4040 - -echo "OM_ROOT=$OM_ROOT" -echo "OMS_PORT=$OMS_PORT" -echo "OMS_URL=$OMS_URL" - -echo "OMS_MODEL_DIR=$OMS_MODEL_DIR" -echo "OMS_HOME_DIR=$OMS_HOME_DIR" -echo "OMS_LOG_DIR=$OMS_LOG_DIR" - - -# start oms web-service: -OM_ROOT=$OM_ROOT ${OM_ROOT}/bin/oms -l localhost:${OMS_PORT} -oms.ModelDir ${OMS_MODEL_DIR} -oms.HomeDir ${OMS_HOME_DIR} -oms.ModelLogDir ${OMS_LOG_DIR} -oms.AllowDownload -oms.AllowUpload -oms.AllowMicrodata -oms.LogRequest -OpenM.LogToFile -OpenM.LogUseDailyStamp -OpenM.LogFilePath ${OM_ROOT}/log/oms.log - -status=$? -if [ $status -ne 0 ] ; -then - [ $status -eq 130 ] && echo " oms web-service terminated by Ctrl+C" - [ $status -ne 130 ] && echo " FAILED to start oms web-service" -fi - -echo "." -echo -n "Press Enter to exit..." -read any -exit $status diff --git a/output/remote-desktop/start-remote-desktop.sh b/output/remote-desktop/start-remote-desktop.sh deleted file mode 100755 index 587633271..000000000 --- a/output/remote-desktop/start-remote-desktop.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash - -echo "--------------------Starting up--------------------" -if [ -d /var/run/secrets/kubernetes.io/serviceaccount ]; then - while ! curl -s -f http://127.0.0.1:15020/healthz/ready; do sleep 1; done -fi - -echo "Checking if we want to sleep infinitely" -if [[ -z "${INFINITY_SLEEP}" ]]; then - echo "Not sleeping" -else - echo "--------------------zzzzzz--------------------" - sleep infinity -fi - -test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" - - -if conda --help > /dev/null 2>&1; then - conda init bash - conda init zsh -fi - -# Configure the language -if [ -n "${KF_LANG}" ]; then - if [ "${KF_LANG}" = "en" ]; then - export LANG="en_US.utf8" - else - export LANG="fr_CA.utf8" - # User's browser lang is set to french, open jupyterlab in french (fr_FR) - if [ "${DEFAULT_JUPYTER_URL}" != "/rstudio" ]; then - export LANG="fr_FR" - lang_file="$HOME/.jupyter/lab/user-settings/@jupyterlab/translation-extension/plugin.jupyterlab-settings" - mkdir -p "$(dirname "${lang_file}")" && touch $lang_file - ( echo '{' - echo ' // Langue' - echo ' // @jupyterlab/translation-extension:plugin' - echo ' // Paramètres de langue.' - echo -e ' // ****************************************\n' - echo ' // Langue locale' - echo ' // Définit la langue d'\''affichage de l'\''interface. Exemples: '\''es_CO'\'', '\''fr'\''.' - echo ' "locale": "'${LANG}'"' - echo '}' - ) > $lang_file - fi - fi - - # VS-Code i18n stuff - if [ "${KF_LANG}" = "fr" ]; then - export LANG="fr_FR.UTF-8" - export LANGUAGE="fr_FR.UTF-8" - export LC_ALL="fr_FR.UTF-8" - #Set the locale for vscode - mkdir -p $HOME/.vscode - jq -e '.locale="fr"' $HOME/.vscode/argv.json > /tmp/file.json.tmp - mv /tmp/file.json.tmp $HOME/.vscode/argv.json - fi -fi - -echo "language has been configured" -touch /home/$NB_USER/.hushlogin - -# Configure KFP multi-user -if [ -n "${NB_NAMESPACE}" ]; then -mkdir -p $HOME/.config/kfp -cat < $HOME/.config/kfp/context.json -{"namespace": "${NB_NAMESPACE}"} -EOF -fi - -echo "KFP multi-user has been configured" - -# Create desktop shortcuts -if [ -d $RESOURCES_PATH/desktop-files ]; then - mkdir -p ~/.local/share/applications/ $HOME/Desktop - echo find $RESOURCES_PATH/desktop-files/ $HOME/Desktop/ - find $RESOURCES_PATH/desktop-files/ -type f -iname "*.desktop" -exec cp {} $HOME/Desktop/ \; - rsync $RESOURCES_PATH/desktop-files/.config/ $HOME/.config/ - find $HOME/Desktop -type f -iname "*.desktop" -exec chmod +x {} \; - mkdir -p $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/ - cp /opt/install/desktop-files/.config/xfce4/xfce4-panel.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/ -fi - -export NB_NAMESPACE=$(echo $NB_PREFIX | awk -F '/' '{print $3}') -export JWT="$(echo /var/run/secrets/kubernetes.io/serviceaccount/token)" - -# Revert, is causing issues -#export PIP_REQUIRE_VIRTUALENV=true -#echo "Checking if Python venv exists" -#if [[ -d "base-python-venv" ]]; then -# echo "Base python venv exists, not going to create again" -#else -# echo "Creating python venv" -# python3 -m venv $HOME/base-python-venv -# echo "adding include-system-site-packages" -#fi - -echo "Checking for .condarc file in hom directory" -if [[ -f "$HOME/.condarc" ]]; then - echo ".condarc file exists, not going to do anything" -else - echo "Creating basic .condarc file" - printf 'envs_dirs:\n - $HOME/.conda/envs' > $HOME/.condarc -fi - -mkdir -p $HOME/.vnc -[ -f $HOME/.vnc/xstartup ] || { - cat < $HOME/.vnc/xstartup -#!/bin/sh - -unset SESSION_MANAGER -unset DBUS_SESSION_BUS_ADDRESS -startxfce4 & - -# Makes an unbelievable difference in speed -(sleep 10 && xdg-settings set default-web-browser firefox.desktop) & -(sleep 10 && xfconf-query -c xfwm4 -p /general/use_compositing -s false && dconf write /org/gnome/terminal/legacy/profiles/custom-command "'/bin/bash'") & -EOF - chmod +x $HOME/.vnc/xstartup -} - -mkdir -p /tmp/vnc-socket/ -VNC_SOCKET=$(mktemp /tmp/vnc-socket/vnc-XXXXXX.sock) -trap "rm -f $VNC_SOCKET" EXIT - -vncserver -SecurityTypes None -rfbunixpath $VNC_SOCKET -geometry 1680x1050 :1 -cat $HOME/.vnc/*.log - -echo "novnc has been configured, launching novnc" -#TODO: Investigate adding vscode extensions to be persisted -# Launch noVNC -( - # cd /tmp/novnc/ - cd /opt/novnc/ - ./utils/novnc_proxy --web $(pwd) --heartbeat 30 --vnc --unix-target=$VNC_SOCKET --listen 5678 -) & - -NB_PREFIX=${NB_PREFIX:-/vnc} -sed -i "s~\${NB_PREFIX}~$NB_PREFIX~g" /etc/nginx/nginx.conf - -# LP64 = 32bit, ILP64 = 64bit, most apps use 32bit -if lscpu | grep -q AuthenticAMD && -d "${AOCL_PATH}" ; then - echo "AuthenticAMD platform detected" - bash ${AOCL_PATH}/setenv_aocl.sh lp64 - exoport LD_LIBRARY_PATH = ${AOCL_PATH}/lib -fi - -nginx -wait diff --git a/output/remote-desktop/suspend-server.sh b/output/remote-desktop/suspend-server.sh deleted file mode 100644 index 5c66f5e12..000000000 --- a/output/remote-desktop/suspend-server.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -#https://github.com/StatCan/aaw-kubeflow-containers/issues/459 -#https://github.com/StatCan/aaw-kubeflow-containers/issues/478 - -time_wait=$1 -if ! [ ${time_wait:+1} ] -then - time_wait=30 -fi - -echo "Waiting $time_wait seconds before shutting down server (press ctrl-c to stop shutdown)..." -sleep $time_wait - -nb_server_name=`echo $NB_PREFIX | perl -pe 's/^.*\///'` -tag_date=`date +%Y-%m-%d"T"%H:%M:%SZ` - -echo "Shutting down server named $nb_server_name in namespace $NB_NAMESPACE with date tag $tag_date." -kubectl annotate notebook/$nb_server_name kubeflow-resource-stopped=$tag_date -n $NB_NAMESPACE -echo "Command had return code $?." \ No newline at end of file diff --git a/output/remote-desktop/trino-wrapper.sh b/output/remote-desktop/trino-wrapper.sh deleted file mode 100755 index d06f41f98..000000000 --- a/output/remote-desktop/trino-wrapper.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -if [[ $KUBERNETES_SERVICE_HOST =~ ".131." ]]; -then - # Use protb trino instance - if [ -d "/etc/protb" ] - then - SERVER=https://trino-protb.aaw-dev.cloud.statcan.ca - else - SERVER=https://trino.aaw-dev.cloud.statcan.ca - fi -# Prod cluster -else - if [ -d "/etc/protb" ] - then - SERVER=https://trino-protb.aaw.cloud.statcan.ca - else - SERVER=https://trino.aaw.cloud.statcan.ca - fi -fi -# Trino client pass in server, user, access token and additional options the user can configures -trino-original --server $SERVER --debug --external-authentication "$@" diff --git a/output/remote-desktop/vscode-overrides.json b/output/remote-desktop/vscode-overrides.json deleted file mode 100644 index d66e5c597..000000000 --- a/output/remote-desktop/vscode-overrides.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "workbench.colorTheme": "Default Dark Modern" -} diff --git a/resources/remote-desktop/.condarc b/resources/remote-desktop/.condarc deleted file mode 100644 index 2c570f90f..000000000 --- a/resources/remote-desktop/.condarc +++ /dev/null @@ -1,5 +0,0 @@ -channels: - - https://artifactory.cloud.statcan.ca/artifactory/rpug-conda/ - -auto_update_conda: false -show_channel_urls: true diff --git a/resources/remote-desktop/French/Firefox/autoconfig.js b/resources/remote-desktop/French/Firefox/autoconfig.js deleted file mode 100644 index 7c6fba9c2..000000000 --- a/resources/remote-desktop/French/Firefox/autoconfig.js +++ /dev/null @@ -1,2 +0,0 @@ -pref("general.config.filename", "firefox.cfg"); -pref("general.config.obscure_value", 0); diff --git a/resources/remote-desktop/French/Firefox/firefox.cfg b/resources/remote-desktop/French/Firefox/firefox.cfg deleted file mode 100644 index 23c99f5e6..000000000 --- a/resources/remote-desktop/French/Firefox/firefox.cfg +++ /dev/null @@ -1,3 +0,0 @@ -// IMPORTANT: Start your code on 2nd line https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig -var user = getenv("LANG"); -pref("intl.locale.requested", user.substring(0,2)); diff --git a/resources/remote-desktop/French/mo-files/apt.mo b/resources/remote-desktop/French/mo-files/apt.mo deleted file mode 100644 index cd60b8d8c..000000000 Binary files a/resources/remote-desktop/French/mo-files/apt.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/baobab.mo b/resources/remote-desktop/French/mo-files/baobab.mo deleted file mode 100644 index 1d76674e0..000000000 Binary files a/resources/remote-desktop/French/mo-files/baobab.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/catfish.mo b/resources/remote-desktop/French/mo-files/catfish.mo deleted file mode 100644 index a92ca26da..000000000 Binary files a/resources/remote-desktop/French/mo-files/catfish.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/dpkg.mo b/resources/remote-desktop/French/mo-files/dpkg.mo deleted file mode 100644 index f0d2114e7..000000000 Binary files a/resources/remote-desktop/French/mo-files/dpkg.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/e2fsprogs.mo b/resources/remote-desktop/French/mo-files/e2fsprogs.mo deleted file mode 100644 index f5a732a20..000000000 Binary files a/resources/remote-desktop/French/mo-files/e2fsprogs.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/eog.mo b/resources/remote-desktop/French/mo-files/eog.mo deleted file mode 100644 index 1c62065d7..000000000 Binary files a/resources/remote-desktop/French/mo-files/eog.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/exo-1.mo b/resources/remote-desktop/French/mo-files/exo-1.mo deleted file mode 100644 index fb104ef3e..000000000 Binary files a/resources/remote-desktop/French/mo-files/exo-1.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/garcon.mo b/resources/remote-desktop/French/mo-files/garcon.mo deleted file mode 100644 index 6acf41aa5..000000000 Binary files a/resources/remote-desktop/French/mo-files/garcon.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/gdebi.mo b/resources/remote-desktop/French/mo-files/gdebi.mo deleted file mode 100644 index 425dcdd05..000000000 Binary files a/resources/remote-desktop/French/mo-files/gdebi.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/gftp.mo b/resources/remote-desktop/French/mo-files/gftp.mo deleted file mode 100644 index a473f4b7d..000000000 Binary files a/resources/remote-desktop/French/mo-files/gftp.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/gigolo.mo b/resources/remote-desktop/French/mo-files/gigolo.mo deleted file mode 100644 index bc91c35b8..000000000 Binary files a/resources/remote-desktop/French/mo-files/gigolo.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/libapt-inst2.0.mo b/resources/remote-desktop/French/mo-files/libapt-inst2.0.mo deleted file mode 100644 index f6587eb8b..000000000 Binary files a/resources/remote-desktop/French/mo-files/libapt-inst2.0.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/libapt-pkg5.0.mo b/resources/remote-desktop/French/mo-files/libapt-pkg5.0.mo deleted file mode 100644 index ee09db194..000000000 Binary files a/resources/remote-desktop/French/mo-files/libapt-pkg5.0.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/libwnck.mo b/resources/remote-desktop/French/mo-files/libwnck.mo deleted file mode 100644 index 340013fcd..000000000 Binary files a/resources/remote-desktop/French/mo-files/libwnck.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/libxfce4ui.mo b/resources/remote-desktop/French/mo-files/libxfce4ui.mo deleted file mode 100644 index 340756420..000000000 Binary files a/resources/remote-desktop/French/mo-files/libxfce4ui.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/libxfce4util.mo b/resources/remote-desktop/French/mo-files/libxfce4util.mo deleted file mode 100644 index 5edac1b75..000000000 Binary files a/resources/remote-desktop/French/mo-files/libxfce4util.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/mousepad.mo b/resources/remote-desktop/French/mo-files/mousepad.mo deleted file mode 100644 index 4f6fd4643..000000000 Binary files a/resources/remote-desktop/French/mo-files/mousepad.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/orage.mo b/resources/remote-desktop/French/mo-files/orage.mo deleted file mode 100644 index 3ea2a832b..000000000 Binary files a/resources/remote-desktop/French/mo-files/orage.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/pavucontrol.mo b/resources/remote-desktop/French/mo-files/pavucontrol.mo deleted file mode 100644 index c84caeb9e..000000000 Binary files a/resources/remote-desktop/French/mo-files/pavucontrol.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/pspp.mo b/resources/remote-desktop/French/mo-files/pspp.mo deleted file mode 100644 index 6fbc2f5be..000000000 Binary files a/resources/remote-desktop/French/mo-files/pspp.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/thunar-archive-plugin.mo b/resources/remote-desktop/French/mo-files/thunar-archive-plugin.mo deleted file mode 100644 index f2fa438c3..000000000 Binary files a/resources/remote-desktop/French/mo-files/thunar-archive-plugin.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/thunar-vcs-plugin.mo b/resources/remote-desktop/French/mo-files/thunar-vcs-plugin.mo deleted file mode 100644 index 77372efa0..000000000 Binary files a/resources/remote-desktop/French/mo-files/thunar-vcs-plugin.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/thunar-volman.mo b/resources/remote-desktop/French/mo-files/thunar-volman.mo deleted file mode 100644 index c5be24066..000000000 Binary files a/resources/remote-desktop/French/mo-files/thunar-volman.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/thunar.mo b/resources/remote-desktop/French/mo-files/thunar.mo deleted file mode 100644 index 2f0f14654..000000000 Binary files a/resources/remote-desktop/French/mo-files/thunar.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/tigervnc.mo b/resources/remote-desktop/French/mo-files/tigervnc.mo deleted file mode 100644 index df1caed98..000000000 Binary files a/resources/remote-desktop/French/mo-files/tigervnc.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/tumbler.mo b/resources/remote-desktop/French/mo-files/tumbler.mo deleted file mode 100644 index aaae74103..000000000 Binary files a/resources/remote-desktop/French/mo-files/tumbler.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/unp.mo b/resources/remote-desktop/French/mo-files/unp.mo deleted file mode 100644 index 91486b62c..000000000 Binary files a/resources/remote-desktop/French/mo-files/unp.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xarchiver.mo b/resources/remote-desktop/French/mo-files/xarchiver.mo deleted file mode 100644 index c8c2a4eba..000000000 Binary files a/resources/remote-desktop/French/mo-files/xarchiver.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xdg-user-dirs.mo b/resources/remote-desktop/French/mo-files/xdg-user-dirs.mo deleted file mode 100644 index fc14f7065..000000000 Binary files a/resources/remote-desktop/French/mo-files/xdg-user-dirs.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-appfinder.mo b/resources/remote-desktop/French/mo-files/xfce4-appfinder.mo deleted file mode 100644 index 0ef48a8fb..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-appfinder.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-notifyd.mo b/resources/remote-desktop/French/mo-files/xfce4-notifyd.mo deleted file mode 100644 index 566f10859..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-notifyd.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-panel.mo b/resources/remote-desktop/French/mo-files/xfce4-panel.mo deleted file mode 100644 index 80a7e8f4e..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-panel.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-session.mo b/resources/remote-desktop/French/mo-files/xfce4-session.mo deleted file mode 100644 index fd7d1507d..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-session.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-settings.mo b/resources/remote-desktop/French/mo-files/xfce4-settings.mo deleted file mode 100644 index 4f717ec83..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-settings.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo b/resources/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo deleted file mode 100644 index e272924e0..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-systemload-plugin.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-taskmanager.mo b/resources/remote-desktop/French/mo-files/xfce4-taskmanager.mo deleted file mode 100644 index 1bb820b1e..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-taskmanager.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfce4-terminal.mo b/resources/remote-desktop/French/mo-files/xfce4-terminal.mo deleted file mode 100644 index 826bb49a1..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfce4-terminal.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfconf.mo b/resources/remote-desktop/French/mo-files/xfconf.mo deleted file mode 100644 index 15be68c41..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfconf.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfdesktop.mo b/resources/remote-desktop/French/mo-files/xfdesktop.mo deleted file mode 100644 index bafa98e5b..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfdesktop.mo and /dev/null differ diff --git a/resources/remote-desktop/French/mo-files/xfwm4.mo b/resources/remote-desktop/French/mo-files/xfwm4.mo deleted file mode 100644 index 30a09d596..000000000 Binary files a/resources/remote-desktop/French/mo-files/xfwm4.mo and /dev/null differ diff --git a/resources/remote-desktop/French/vscode/argv.json b/resources/remote-desktop/French/vscode/argv.json deleted file mode 100644 index 618c748e9..000000000 --- a/resources/remote-desktop/French/vscode/argv.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "locale":"en" -} diff --git a/resources/remote-desktop/French/vscode/languagepacks.json b/resources/remote-desktop/French/vscode/languagepacks.json deleted file mode 100644 index c2fe7609a..000000000 --- a/resources/remote-desktop/French/vscode/languagepacks.json +++ /dev/null @@ -1,2 +0,0 @@ -{"fr":{"hash":"43334e1e218440bc8e2cc41185eed29b","extensions":[{"extensionIdentifier":{"id":"ms-ceintl.vscode-language-pack-fr","uuid":"MS-CEINTL.vscode-language-pack-fr"},"version":"1.50.2"}],"translations":{"vscode":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/main.i18n.json","vscode.bat":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/bat.i18n.json","vscode.clojure":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/clojure.i18n.json","vscode.coffeescript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/coffeescript.i18n.json","vscode.configuration-editing":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/configuration-editing.i18n.json","vscode.cpp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/cpp.i18n.json","vscode.csharp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/csharp.i18n.json","vscode.css-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/css-language-features.i18n.json","vscode.css":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/css.i18n.json","vscode.debug-auto-launch":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/debug-auto-launch.i18n.json","vscode.debug-server-ready":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/debug-server-ready.i18n.json","vscode.docker":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/docker.i18n.json","vscode.emmet":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/emmet.i18n.json","vscode.extension-editing":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/extension-editing.i18n.json","vscode.fsharp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/fsharp.i18n.json","vscode.git-ui":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/git-ui.i18n.json","vscode.git":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/git.i18n.json","vscode.github-authentication":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github-authentication.i18n.json","vscode.github-browser":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github-browser.i18n.json","vscode.github":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/github.i18n.json","vscode.go":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/go.i18n.json","vscode.groovy":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/groovy.i18n.json","vscode.grunt":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/grunt.i18n.json","vscode.gulp":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/gulp.i18n.json","vscode.handlebars":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/handlebars.i18n.json","vscode.hlsl":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/hlsl.i18n.json","vscode.html-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/html-language-features.i18n.json","vscode.html":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/html.i18n.json","vscode.image-preview":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/image-preview.i18n.json","vscode.ini":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ini.i18n.json","vscode.jake":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/jake.i18n.json","vscode.java":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/java.i18n.json","vscode.javascript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/javascript.i18n.json","vscode.json-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/json-language-features.i18n.json","vscode.json":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/json.i18n.json","vscode.less":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/less.i18n.json","vscode.log":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/log.i18n.json","vscode.lua":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/lua.i18n.json","vscode.make":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/make.i18n.json","vscode.markdown-basics":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/markdown-basics.i18n.json","vscode.markdown-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/markdown-language-features.i18n.json","vscode.merge-conflict":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/merge-conflict.i18n.json","vscode.microsoft-authentication":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/microsoft-authentication.i18n.json","vscode.ms-vscode.github-browser":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.github-browser.i18n.json","vscode.ms-vscode.js-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.js-debug.i18n.json","vscode.ms-vscode.node-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.node-debug.i18n.json","vscode.ms-vscode.node-debug2":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ms-vscode.node-debug2.i18n.json","vscode.npm":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/npm.i18n.json","vscode.objective-c":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/objective-c.i18n.json","vscode.perl":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/perl.i18n.json","vscode.php-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/php-language-features.i18n.json","vscode.php":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/php.i18n.json","vscode.powershell":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/powershell.i18n.json","vscode.pug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/pug.i18n.json","vscode.python":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/python.i18n.json","vscode.r":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/r.i18n.json","vscode.razor":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/razor.i18n.json","vscode.ruby":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/ruby.i18n.json","vscode.rust":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/rust.i18n.json","vscode.scss":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/scss.i18n.json","vscode.search-result":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/search-result.i18n.json","vscode.shaderlab":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/shaderlab.i18n.json","vscode.shellscript":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/shellscript.i18n.json","vscode.sql":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/sql.i18n.json","vscode.swift":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/swift.i18n.json","vscode.theme-abyss":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-abyss.i18n.json","vscode.theme-defaults":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-defaults.i18n.json","vscode.theme-kimbie-dark":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-kimbie-dark.i18n.json","vscode.theme-monokai-dimmed":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-monokai-dimmed.i18n.json","vscode.theme-monokai":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-monokai.i18n.json","vscode.theme-quietlight":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-quietlight.i18n.json","vscode.theme-red":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-red.i18n.json","vscode.theme-seti":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-seti.i18n.json","vscode.theme-solarized-dark":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-solarized-dark.i18n.json","vscode.theme-solarized-light":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-solarized-light.i18n.json","vscode.theme-tomorrow-night-blue":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/theme-tomorrow-night-blue.i18n.json","vscode.typescript-basics":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/typescript-basics.i18n.json","vscode.typescript-language-features":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/typescript-language-features.i18n.json","vscode.vb":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vb.i18n.json","vscode.vscode-chrome-debug-core":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-chrome-debug-core.i18n.json","ms-vscode.node-debug":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-node-debug.i18n.json","ms-vscode.node-debug2":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/vscode-node-debug2.i18n.json","vscode.xml":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/xml.i18n.json","vscode.yaml":"/home/jovyan/.vscode/extensions/ms-ceintl.vscode-language-pack-fr-1.50.2/translations/extensions/yaml.i18n.json"}}} - diff --git a/resources/remote-desktop/README.md b/resources/remote-desktop/README.md deleted file mode 100644 index 0add74656..000000000 --- a/resources/remote-desktop/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Remote-Desktop -`desktop-files` contains files that are copied to the 'desktop' to provide information on the icons as well -as any other information such as how the xfce4 panel should look. - -`French` contains configuration and translation files necessary for the i18n of remote desktop. `mo-files` contains translations -for the applications, while `Firefox` and `vscode` require extra installations and configuration (ie not set by ENV variables) - -`qgis-2022.gpg.key` is used by qgis.sh to aid in installing qgis, this key expires on Aug 8, 2023 and will need to be rotated ex. https://github.com/StatCan/aaw-kubeflow-containers/pull/378 - -`start-remote-desktop.sh` a more custom version of `start-custom.sh` as it also sets -the other ENV variables of `LC_ALL` and `LANGUAGE` and modifies the vscode json file to set the preferred locale. diff --git a/resources/remote-desktop/canada.ico b/resources/remote-desktop/canada.ico deleted file mode 100644 index 1eeda6d8a..000000000 Binary files a/resources/remote-desktop/canada.ico and /dev/null differ diff --git a/resources/remote-desktop/desktop-files/.config/mimeapps.list b/resources/remote-desktop/desktop-files/.config/mimeapps.list deleted file mode 100644 index cd1d4caa7..000000000 --- a/resources/remote-desktop/desktop-files/.config/mimeapps.list +++ /dev/null @@ -1,9 +0,0 @@ -[Default Applications] -text/plain=code.desktop; -application/pdf=firefox.desktop -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop -[Added Associations] -application/pdf=userapp-firefox-Y32KO0.desktop;firefox.desktop; -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop diff --git a/resources/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml b/resources/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml deleted file mode 100644 index 5e9e4c422..000000000 --- a/resources/remote-desktop/desktop-files/.config/xfce4/xfce4-panel.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/remote-desktop/desktop-files/code.desktop b/resources/remote-desktop/desktop-files/code.desktop deleted file mode 100644 index 83b37810f..000000000 --- a/resources/remote-desktop/desktop-files/code.desktop +++ /dev/null @@ -1,21 +0,0 @@ -[Desktop Entry] -Name=Visual Studio Code -Comment=Code Editing. Redefined. -Comment[fr]=Modification du code. Redéfini -GenericName=Text Editor -Exec=/usr/share/code/code --no-sandbox --unity-launch %F -Icon=/usr/share/code/resources/app/resources/linux/code.png -Type=Application -StartupNotify=false -StartupWMClass=Code -Categories=Utility;TextEditor;Development;IDE; -MimeType=text/plain;inode/directory; -Actions=new-empty-window; -Keywords=vscode; - -X-Desktop-File-Install-Version=0.23 - -[Desktop Action new-empty-window] -Name=New Empty Window -Exec=/usr/share/code/code --no-sandbox --new-window %F -Icon=/usr/share/code/resources/app/resources/linux/code.png diff --git a/resources/remote-desktop/desktop-files/firefox.desktop b/resources/remote-desktop/desktop-files/firefox.desktop deleted file mode 100644 index 393749645..000000000 --- a/resources/remote-desktop/desktop-files/firefox.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=Firefox -Comment=Browse the World Wide Web -Comment[fr]=Naviguer sure le Web -Exec=firefox -Terminal=false -X-MultipleArgs=false -Type=Application -Icon=/usr/lib/firefox/browser/chrome/icons/default/default128.png -Categories=GNOME;GTK;Network;WebBrowser; -StartupNotify=true; diff --git a/resources/remote-desktop/desktop-files/openmpp.desktop b/resources/remote-desktop/desktop-files/openmpp.desktop deleted file mode 100644 index 3ec7c0562..000000000 --- a/resources/remote-desktop/desktop-files/openmpp.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=OpenM++ -Exec=/opt/openmpp/1.15.6/bin/ompp_ui_linux.sh -Icon=/resources/openmpp.png -Terminal=false -Categories=Development; diff --git a/resources/remote-desktop/desktop-files/pspp.desktop b/resources/remote-desktop/desktop-files/pspp.desktop deleted file mode 100644 index aa78f9599..000000000 --- a/resources/remote-desktop/desktop-files/pspp.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=PSPP -Exec=/usr/bin/psppire %F -Icon=pspp -Terminal=false -Categories=Development;IDE; diff --git a/resources/remote-desktop/desktop-files/qgis.desktop b/resources/remote-desktop/desktop-files/qgis.desktop deleted file mode 100644 index 331abdd47..000000000 --- a/resources/remote-desktop/desktop-files/qgis.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=QGIS Desktop -Comment= -Exec=/usr/bin/qgis %F -Icon=qgis -Path= -Terminal=false -StartupNotify=false diff --git a/resources/remote-desktop/desktop-files/rstudio.desktop b/resources/remote-desktop/desktop-files/rstudio.desktop deleted file mode 100644 index 8c2212348..000000000 --- a/resources/remote-desktop/desktop-files/rstudio.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Exec=/usr/bin/rstudio %F -Icon=rstudio -Type=Application -Terminal=False -Name=RStudio -Categories=Development;IDE; diff --git a/resources/remote-desktop/desktop-files/sqlitebrowser.desktop b/resources/remote-desktop/desktop-files/sqlitebrowser.desktop deleted file mode 100644 index d849d3c97..000000000 --- a/resources/remote-desktop/desktop-files/sqlitebrowser.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=DB Browser for SQLite -Name[fr]=DB Browser pour SQLite -Comment=DB Browser for SQLite is a light GUI editor for SQLite databases -Comment[fr]=Un éditeur graphique léger pour les bases de données SQLite -Exec=sqlitebrowser %f -Icon=sqlitebrowser -Terminal=false -X-MultipleArgs=false -Type=Application -Categories=Development;Utility;Database; -MimeType=application/vnd.db4s-project+xml;application/sqlitebrowser;application/x-sqlitebrowser;application/vnd.sqlite3;application/geopackage+sqlite3;application/x-sqlite2;application/x-sqlite3; diff --git a/resources/remote-desktop/initial-condarc b/resources/remote-desktop/initial-condarc deleted file mode 100644 index 66ecf6081..000000000 --- a/resources/remote-desktop/initial-condarc +++ /dev/null @@ -1,6 +0,0 @@ -# Conda configuration see https://conda.io/projects/conda/en/latest/configuration.html - -auto_update_conda: false -show_channel_urls: true -channels: - - conda-forge \ No newline at end of file diff --git a/resources/remote-desktop/minio-icon.png b/resources/remote-desktop/minio-icon.png deleted file mode 100644 index d1b32be9e..000000000 Binary files a/resources/remote-desktop/minio-icon.png and /dev/null differ diff --git a/resources/remote-desktop/nginx.conf b/resources/remote-desktop/nginx.conf deleted file mode 100644 index f0b6f1b28..000000000 --- a/resources/remote-desktop/nginx.conf +++ /dev/null @@ -1,224 +0,0 @@ -pid /tmp/nginx.pid; - -events { - # No special events for this simple setup - #worker_connections 100; -} - -http { - - include mime.types; - #map $http_upgrade $connection_upgrade { - # default upgrade; - # '' close; - #} - - # map $upstream_http_location $new_location { - # default .$upstream_http_location; - #} - - - client_max_body_size 10G; - client_body_timeout 300s; - client_header_timeout 120s; - - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - send_timeout 600; - - - upstream vnc_proxy { - server 0.0.0.0:5678; - } - - server { - - absolute_redirect off; - # Set a number of log, temp and cache file options that will otherwise - # default to restricted locations accessible only to root. - access_log /tmp/nginx_host.access.log; - error_log /tmp/nginx_error.log; - client_body_temp_path /tmp/client_body; - fastcgi_temp_path /tmp/fastcgi_temp; - proxy_temp_path /tmp/proxy_temp; - scgi_temp_path /tmp/scgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - - # Port forwarding stuff - listen 8888 default_server; - listen [::]:8888 default_server; - - # root /var/www/html; - root /tmp/novnc; - - # Add index.php to the list if you are using PHP - index vnc.html; - - server_name _; - - location = "/favicon.ico" { - # use favicon in resources folder - auth_basic off; - alias /tmp/favicon.ico; - } - - #location /app/ { - # autoindex on; - # root /tmp/novnc/app; - #} - - #location ~ \.css { - # add_header Content-Type text/css; - #} - #location ~ \.js { - # add_header Content-Type application/x-javascript; - #} - - # 301 try_file for trailing slash - location ~ ^([^.\?]*[^/])$ { - try_files $request_uri @addslash; - } - - # 301 redirect for trailing slash - location @addslash { - return 301 $request_uri/$is_args$args; - } - - - location ${NB_PREFIX} { - rewrite ${NB_PREFIX}(.*) $1 break; - proxy_pass http://0.0.0.0:8888; - proxy_redirect off; - proxy_set_header Host $host; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location = ${NB_PREFIX}/websockify { - rewrite ${NB_PREFIX}/(.*) /$1 break; - - set $delimeter ""; - - if ($is_args) { - set $delimeter "&"; - } - - set $args "$args${delimeter}resize=true"; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 61s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location /websockify { - #rewrite ${NB_PREFIX}/(.*) /$1 break; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 3600s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - - location ${NB_PREFIX}/websockify { - #rewrite ${NB_PREFIX}/(.*) /$1 break; - proxy_http_version 1.1; - proxy_pass http://vnc_proxy/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - # VNC connection timeout - proxy_read_timeout 3600s; - - # Disable cache - proxy_buffering off; - - gzip on; - gzip_proxied any; - gzip_types *; - - } - - location / { - index vnc.html; - root /opt/novnc/; - try_files $uri $uri/ /vnc.html?resize=true; - } - - location = /healthy { - auth_basic off; - return 200; - } - - location = /ping { - auth_basic off; - return 200; - } - - error_page 404 ${NB_PREFIX}/; - # location @error_page { - # root /var/www/html/; - # rewrite ^ https://domain.com/error/index.html; - # break; - # } - - # Access all-ports via /tools/PORT - location ~* "^${NB_PREFIX}/(proxy|tools)/(?[0-9]+)/(?.*)" { - # Allow CORS requests - if ($request_method = OPTIONS) { - add_header Access-Control-Allow-Origin "$http_origin"; - add_header Access-Control-Allow-Credentials "true"; - add_header Access-Control-Allow-Methods "GET, OPTIONS, DELETE, POST, PUT"; - add_header Access-Control-Allow-Headers "Authorization, Content-Type"; - add_header Content-Length 0; - add_header Content-Type text/plain; - return 200; - } - - add_header Access-Control-Allow-Origin "$http_origin"; - add_header Access-Control-Allow-Credentials "true"; - # Disable proxy buffering - applications like guacamole have problems with this setting - proxy_buffering off; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Server $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_http_version 1.1; - proxy_pass_request_headers on; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_store off; - - proxy_pass http://0.0.0.0:$access_port/$remaining_part$is_args$args; - gzip on; - gzip_proxied any; - gzip_types *; - } - } -} diff --git a/resources/remote-desktop/novnc/ui.js b/resources/remote-desktop/novnc/ui.js deleted file mode 100644 index 8a2a067a2..000000000 --- a/resources/remote-desktop/novnc/ui.js +++ /dev/null @@ -1,1735 +0,0 @@ -/* - * noVNC: HTML5 VNC client - * Copyright (C) 2019 The noVNC Authors - * Licensed under MPL 2.0 (see LICENSE.txt) - * - * See README.md for usage and integration instructions. - * Additions made by Will https://gist.github.com/sylus/cb01e59056780a2161186139b25818fb - */ - -import * as Log from '../core/util/logging.js'; -import _, { l10n } from './localization.js'; -import { isTouchDevice, isSafari, hasScrollbarGutter, dragThreshold } - from '../core/util/browser.js'; -import { setCapture, getPointerEvent } from '../core/util/events.js'; -import KeyTable from "../core/input/keysym.js"; -import keysyms from "../core/input/keysymdef.js"; -import Keyboard from "../core/input/keyboard.js"; -import RFB from "../core/rfb.js"; -import * as WebUtil from "./webutil.js"; - -const PAGE_TITLE = "noVNC"; - -const UI = { - - connected: false, - desktopName: "", - - statusTimeout: null, - hideKeyboardTimeout: null, - idleControlbarTimeout: null, - closeControlbarTimeout: null, - - controlbarGrabbed: false, - controlbarDrag: false, - controlbarMouseDownClientY: 0, - controlbarMouseDownOffsetY: 0, - - lastKeyboardinput: null, - defaultKeyboardinputLen: 100, - - inhibitReconnect: true, - reconnectCallback: null, - reconnectPassword: null, - - prime() { - return WebUtil.initSettings().then(() => { - if (document.readyState === "interactive" || document.readyState === "complete") { - return UI.start(); - } - - return new Promise((resolve, reject) => { - document.addEventListener('DOMContentLoaded', () => UI.start().then(resolve).catch(reject)); - }); - }); - }, - - // Render default UI and initialize settings menu - start() { - - UI.initSettings(); - - // Translate the DOM - l10n.translateDOM(); - - fetch('./package.json') - .then((response) => { - if (!response.ok) { - throw Error("" + response.status + " " + response.statusText); - } - return response.json(); - }) - .then((packageInfo) => { - Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version); - }) - .catch((err) => { - Log.Error("Couldn't fetch package.json: " + err); - Array.from(document.getElementsByClassName('noVNC_version_wrapper')) - .concat(Array.from(document.getElementsByClassName('noVNC_version_separator'))) - .forEach(el => el.style.display = 'none'); - }); - - // Adapt the interface for touch screen devices - if (isTouchDevice) { - document.documentElement.classList.add("noVNC_touch"); - // Remove the address bar - setTimeout(() => window.scrollTo(0, 1), 100); - } - - // Restore control bar position - if (WebUtil.readSetting('controlbar_pos') === 'right') { - UI.toggleControlbarSide(); - } - - UI.initFullscreen(); - - // Setup event handlers - UI.addControlbarHandlers(); - UI.addTouchSpecificHandlers(); - UI.addExtraKeysHandlers(); - UI.addMachineHandlers(); - UI.addConnectionControlHandlers(); - UI.addClipboardHandlers(); - UI.addSettingsHandlers(); - document.getElementById("noVNC_status") - .addEventListener('click', UI.hideStatus); - - // Bootstrap fallback input handler - UI.keyboardinputReset(); - - UI.openControlbar(); - - UI.updateVisualState('init'); - - document.documentElement.classList.remove("noVNC_loading"); - - let autoconnect = WebUtil.getConfigVar('autoconnect', false); - if (autoconnect === 'true' || autoconnect == '1') { - autoconnect = true; - UI.connect(); - } else { - autoconnect = false; - // Show the connect panel on first load unless autoconnecting - UI.openConnectPanel(); - } - - return Promise.resolve(UI.rfb); - }, - - initFullscreen() { - // Only show the button if fullscreen is properly supported - // * Safari doesn't support alphanumerical input while in fullscreen - if (!isSafari() && - (document.documentElement.requestFullscreen || - document.documentElement.mozRequestFullScreen || - document.documentElement.webkitRequestFullscreen || - document.body.msRequestFullscreen)) { - document.getElementById('noVNC_fullscreen_button') - .classList.remove("noVNC_hidden"); - UI.addFullscreenHandlers(); - } - }, - - initSettings() { - // Logging selection dropdown - const llevels = ['error', 'warn', 'info', 'debug']; - for (let i = 0; i < llevels.length; i += 1) { - UI.addOption(document.getElementById('noVNC_setting_logging'), llevels[i], llevels[i]); - } - - // Settings with immediate effects - UI.initSetting('logging', 'warn'); - UI.updateLogging(); - - // if port == 80 (or 443) then it won't be present and should be - // set manually - let port = window.location.port; - if (!port) { - if (window.location.protocol.substring(0, 5) == 'https') { - port = 443; - } else if (window.location.protocol.substring(0, 4) == 'http') { - port = 80; - } - } - - /* Populate the controls if defaults are provided in the URL */ - UI.initSetting('host', window.location.hostname); - UI.initSetting('port', port); - UI.initSetting('encrypt', (window.location.protocol === "https:")); - UI.initSetting('view_clip', false); - // AAW CHANGE, default resize to remote - UI.initSetting('resize', 'remote'); - UI.initSetting('quality', 6); - UI.initSetting('compression', 2); - UI.initSetting('shared', true); - UI.initSetting('view_only', false); - UI.initSetting('show_dot', false); - UI.initSetting('path', 'websockify'); - UI.initSetting('repeaterID', ''); - // AAW CHANGE, default reconnect to true and delay to 0 - UI.initSetting('reconnect', true); - UI.initSetting('reconnect_delay', 0); - - UI.setupSettingLabels(); - }, - // Adds a link to the label elements on the corresponding input elements - setupSettingLabels() { - const labels = document.getElementsByTagName('LABEL'); - for (let i = 0; i < labels.length; i++) { - const htmlFor = labels[i].htmlFor; - if (htmlFor != '') { - const elem = document.getElementById(htmlFor); - if (elem) elem.label = labels[i]; - } else { - // If 'for' isn't set, use the first input element child - const children = labels[i].children; - for (let j = 0; j < children.length; j++) { - if (children[j].form !== undefined) { - children[j].label = labels[i]; - break; - } - } - } - } - }, - -/* ------^------- -* /INIT -* ============== -* EVENT HANDLERS -* ------v------*/ - - addControlbarHandlers() { - document.getElementById("noVNC_control_bar") - .addEventListener('mousemove', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('mouseup', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('mousedown', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('keydown', UI.activateControlbar); - - document.getElementById("noVNC_control_bar") - .addEventListener('mousedown', UI.keepControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('keydown', UI.keepControlbar); - - document.getElementById("noVNC_view_drag_button") - .addEventListener('click', UI.toggleViewDrag); - - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mousedown', UI.controlbarHandleMouseDown); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mouseup', UI.controlbarHandleMouseUp); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('mousemove', UI.dragControlbarHandle); - // resize events aren't available for elements - window.addEventListener('resize', UI.updateControlbarHandle); - - const exps = document.getElementsByClassName("noVNC_expander"); - for (let i = 0;i < exps.length;i++) { - exps[i].addEventListener('click', UI.toggleExpander); - } - }, - - addTouchSpecificHandlers() { - document.getElementById("noVNC_keyboard_button") - .addEventListener('click', UI.toggleVirtualKeyboard); - - UI.touchKeyboard = new Keyboard(document.getElementById('noVNC_keyboardinput')); - UI.touchKeyboard.onkeyevent = UI.keyEvent; - UI.touchKeyboard.grab(); - document.getElementById("noVNC_keyboardinput") - .addEventListener('input', UI.keyInput); - document.getElementById("noVNC_keyboardinput") - .addEventListener('focus', UI.onfocusVirtualKeyboard); - document.getElementById("noVNC_keyboardinput") - .addEventListener('blur', UI.onblurVirtualKeyboard); - document.getElementById("noVNC_keyboardinput") - .addEventListener('submit', () => false); - - document.documentElement - .addEventListener('mousedown', UI.keepVirtualKeyboard, true); - - document.getElementById("noVNC_control_bar") - .addEventListener('touchstart', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('touchmove', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('touchend', UI.activateControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('input', UI.activateControlbar); - - document.getElementById("noVNC_control_bar") - .addEventListener('touchstart', UI.keepControlbar); - document.getElementById("noVNC_control_bar") - .addEventListener('input', UI.keepControlbar); - - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchstart', UI.controlbarHandleMouseDown); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchend', UI.controlbarHandleMouseUp); - document.getElementById("noVNC_control_bar_handle") - .addEventListener('touchmove', UI.dragControlbarHandle); - }, - - addExtraKeysHandlers() { - document.getElementById("noVNC_toggle_extra_keys_button") - .addEventListener('click', UI.toggleExtraKeys); - document.getElementById("noVNC_toggle_ctrl_button") - .addEventListener('click', UI.toggleCtrl); - document.getElementById("noVNC_toggle_windows_button") - .addEventListener('click', UI.toggleWindows); - document.getElementById("noVNC_toggle_alt_button") - .addEventListener('click', UI.toggleAlt); - document.getElementById("noVNC_send_tab_button") - .addEventListener('click', UI.sendTab); - document.getElementById("noVNC_send_esc_button") - .addEventListener('click', UI.sendEsc); - document.getElementById("noVNC_send_ctrl_alt_del_button") - .addEventListener('click', UI.sendCtrlAltDel); - }, - - addMachineHandlers() { - document.getElementById("noVNC_shutdown_button") - .addEventListener('click', () => UI.rfb.machineShutdown()); - document.getElementById("noVNC_reboot_button") - .addEventListener('click', () => UI.rfb.machineReboot()); - document.getElementById("noVNC_reset_button") - .addEventListener('click', () => UI.rfb.machineReset()); - document.getElementById("noVNC_power_button") - .addEventListener('click', UI.togglePowerPanel); - }, - - addConnectionControlHandlers() { - document.getElementById("noVNC_disconnect_button") - .addEventListener('click', UI.disconnect); - document.getElementById("noVNC_connect_button") - .addEventListener('click', UI.connect); - document.getElementById("noVNC_cancel_reconnect_button") - .addEventListener('click', UI.cancelReconnect); - - document.getElementById("noVNC_credentials_button") - .addEventListener('click', UI.setCredentials); - }, - - addClipboardHandlers() { - document.getElementById("noVNC_clipboard_button") - .addEventListener('click', UI.toggleClipboardPanel); - document.getElementById("noVNC_clipboard_text") - .addEventListener('change', UI.clipboardSend); - document.getElementById("noVNC_clipboard_clear_button") - .addEventListener('click', UI.clipboardClear); - }, - - // Add a call to save settings when the element changes, - // unless the optional parameter changeFunc is used instead. - addSettingChangeHandler(name, changeFunc) { - const settingElem = document.getElementById("noVNC_setting_" + name); - if (changeFunc === undefined) { - changeFunc = () => UI.saveSetting(name); - } - settingElem.addEventListener('change', changeFunc); - }, - - addSettingsHandlers() { - document.getElementById("noVNC_settings_button") - .addEventListener('click', UI.toggleSettingsPanel); - - UI.addSettingChangeHandler('encrypt'); - UI.addSettingChangeHandler('resize'); - UI.addSettingChangeHandler('resize', UI.applyResizeMode); - UI.addSettingChangeHandler('resize', UI.updateViewClip); - UI.addSettingChangeHandler('quality'); - UI.addSettingChangeHandler('quality', UI.updateQuality); - UI.addSettingChangeHandler('compression'); - UI.addSettingChangeHandler('compression', UI.updateCompression); - UI.addSettingChangeHandler('view_clip'); - UI.addSettingChangeHandler('view_clip', UI.updateViewClip); - UI.addSettingChangeHandler('shared'); - UI.addSettingChangeHandler('view_only'); - UI.addSettingChangeHandler('view_only', UI.updateViewOnly); - UI.addSettingChangeHandler('show_dot'); - UI.addSettingChangeHandler('show_dot', UI.updateShowDotCursor); - UI.addSettingChangeHandler('host'); - UI.addSettingChangeHandler('port'); - UI.addSettingChangeHandler('path'); - UI.addSettingChangeHandler('repeaterID'); - UI.addSettingChangeHandler('logging'); - UI.addSettingChangeHandler('logging', UI.updateLogging); - UI.addSettingChangeHandler('reconnect'); - UI.addSettingChangeHandler('reconnect_delay'); - }, - - addFullscreenHandlers() { - document.getElementById("noVNC_fullscreen_button") - .addEventListener('click', UI.toggleFullscreen); - - window.addEventListener('fullscreenchange', UI.updateFullscreenButton); - window.addEventListener('mozfullscreenchange', UI.updateFullscreenButton); - window.addEventListener('webkitfullscreenchange', UI.updateFullscreenButton); - window.addEventListener('msfullscreenchange', UI.updateFullscreenButton); - }, - -/* ------^------- - * /EVENT HANDLERS - * ============== - * VISUAL - * ------v------*/ - - // Disable/enable controls depending on connection state - updateVisualState(state) { - - document.documentElement.classList.remove("noVNC_connecting"); - document.documentElement.classList.remove("noVNC_connected"); - document.documentElement.classList.remove("noVNC_disconnecting"); - document.documentElement.classList.remove("noVNC_reconnecting"); - - const transitionElem = document.getElementById("noVNC_transition_text"); - switch (state) { - case 'init': - break; - case 'connecting': - transitionElem.textContent = _("Connecting..."); - document.documentElement.classList.add("noVNC_connecting"); - break; - case 'connected': - document.documentElement.classList.add("noVNC_connected"); - break; - case 'disconnecting': - transitionElem.textContent = _("Disconnecting..."); - document.documentElement.classList.add("noVNC_disconnecting"); - break; - case 'disconnected': - break; - case 'reconnecting': - transitionElem.textContent = _("Reconnecting..."); - document.documentElement.classList.add("noVNC_reconnecting"); - break; - default: - Log.Error("Invalid visual state: " + state); - UI.showStatus(_("Internal error"), 'error'); - return; - } - - if (UI.connected) { - UI.updateViewClip(); - - UI.disableSetting('encrypt'); - UI.disableSetting('shared'); - UI.disableSetting('host'); - UI.disableSetting('port'); - UI.disableSetting('path'); - UI.disableSetting('repeaterID'); - - // Hide the controlbar after 2 seconds - UI.closeControlbarTimeout = setTimeout(UI.closeControlbar, 2000); - } else { - UI.enableSetting('encrypt'); - UI.enableSetting('shared'); - UI.enableSetting('host'); - UI.enableSetting('port'); - UI.enableSetting('path'); - UI.enableSetting('repeaterID'); - UI.updatePowerButton(); - UI.keepControlbar(); - } - - // State change closes dialogs as they may not be relevant - // anymore - UI.closeAllPanels(); - document.getElementById('noVNC_credentials_dlg') - .classList.remove('noVNC_open'); - }, - - showStatus(text, statusType, time) { - const statusElem = document.getElementById('noVNC_status'); - - if (typeof statusType === 'undefined') { - statusType = 'normal'; - } - - // Don't overwrite more severe visible statuses and never - // errors. Only shows the first error. - if (statusElem.classList.contains("noVNC_open")) { - if (statusElem.classList.contains("noVNC_status_error")) { - return; - } - if (statusElem.classList.contains("noVNC_status_warn") && - statusType === 'normal') { - return; - } - } - - clearTimeout(UI.statusTimeout); - - switch (statusType) { - case 'error': - statusElem.classList.remove("noVNC_status_warn"); - statusElem.classList.remove("noVNC_status_normal"); - statusElem.classList.add("noVNC_status_error"); - break; - case 'warning': - case 'warn': - statusElem.classList.remove("noVNC_status_error"); - statusElem.classList.remove("noVNC_status_normal"); - statusElem.classList.add("noVNC_status_warn"); - break; - case 'normal': - case 'info': - default: - statusElem.classList.remove("noVNC_status_error"); - statusElem.classList.remove("noVNC_status_warn"); - statusElem.classList.add("noVNC_status_normal"); - break; - } - - statusElem.textContent = text; - statusElem.classList.add("noVNC_open"); - - // If no time was specified, show the status for 1.5 seconds - if (typeof time === 'undefined') { - time = 1500; - } - - // Error messages do not timeout - if (statusType !== 'error') { - UI.statusTimeout = window.setTimeout(UI.hideStatus, time); - } - }, - - hideStatus() { - clearTimeout(UI.statusTimeout); - document.getElementById('noVNC_status').classList.remove("noVNC_open"); - }, - - activateControlbar(event) { - clearTimeout(UI.idleControlbarTimeout); - // We manipulate the anchor instead of the actual control - // bar in order to avoid creating new a stacking group - document.getElementById('noVNC_control_bar_anchor') - .classList.remove("noVNC_idle"); - UI.idleControlbarTimeout = window.setTimeout(UI.idleControlbar, 2000); - }, - - idleControlbar() { - // Don't fade if a child of the control bar has focus - if (document.getElementById('noVNC_control_bar') - .contains(document.activeElement) && document.hasFocus()) { - UI.activateControlbar(); - return; - } - - document.getElementById('noVNC_control_bar_anchor') - .classList.add("noVNC_idle"); - }, - - keepControlbar() { - clearTimeout(UI.closeControlbarTimeout); - }, - - openControlbar() { - document.getElementById('noVNC_control_bar') - .classList.add("noVNC_open"); - }, - - closeControlbar() { - UI.closeAllPanels(); - document.getElementById('noVNC_control_bar') - .classList.remove("noVNC_open"); - UI.rfb.focus(); - }, - - toggleControlbar() { - if (document.getElementById('noVNC_control_bar') - .classList.contains("noVNC_open")) { - UI.closeControlbar(); - } else { - UI.openControlbar(); - } - }, - - toggleControlbarSide() { - // Temporarily disable animation, if bar is displayed, to avoid weird - // movement. The transitionend-event will not fire when display=none. - const bar = document.getElementById('noVNC_control_bar'); - const barDisplayStyle = window.getComputedStyle(bar).display; - if (barDisplayStyle !== 'none') { - bar.style.transitionDuration = '0s'; - bar.addEventListener('transitionend', () => bar.style.transitionDuration = ''); - } - - const anchor = document.getElementById('noVNC_control_bar_anchor'); - if (anchor.classList.contains("noVNC_right")) { - WebUtil.writeSetting('controlbar_pos', 'left'); - anchor.classList.remove("noVNC_right"); - } else { - WebUtil.writeSetting('controlbar_pos', 'right'); - anchor.classList.add("noVNC_right"); - } - - // Consider this a movement of the handle - UI.controlbarDrag = true; - }, - - showControlbarHint(show) { - const hint = document.getElementById('noVNC_control_bar_hint'); - if (show) { - hint.classList.add("noVNC_active"); - } else { - hint.classList.remove("noVNC_active"); - } - }, - - dragControlbarHandle(e) { - if (!UI.controlbarGrabbed) return; - - const ptr = getPointerEvent(e); - - const anchor = document.getElementById('noVNC_control_bar_anchor'); - if (ptr.clientX < (window.innerWidth * 0.1)) { - if (anchor.classList.contains("noVNC_right")) { - UI.toggleControlbarSide(); - } - } else if (ptr.clientX > (window.innerWidth * 0.9)) { - if (!anchor.classList.contains("noVNC_right")) { - UI.toggleControlbarSide(); - } - } - - if (!UI.controlbarDrag) { - const dragDistance = Math.abs(ptr.clientY - UI.controlbarMouseDownClientY); - - if (dragDistance < dragThreshold) return; - - UI.controlbarDrag = true; - } - - const eventY = ptr.clientY - UI.controlbarMouseDownOffsetY; - - UI.moveControlbarHandle(eventY); - - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - }, - - // Move the handle but don't allow any position outside the bounds - moveControlbarHandle(viewportRelativeY) { - const handle = document.getElementById("noVNC_control_bar_handle"); - const handleHeight = handle.getBoundingClientRect().height; - const controlbarBounds = document.getElementById("noVNC_control_bar") - .getBoundingClientRect(); - const margin = 10; - - // These heights need to be non-zero for the below logic to work - if (handleHeight === 0 || controlbarBounds.height === 0) { - return; - } - - let newY = viewportRelativeY; - - // Check if the coordinates are outside the control bar - if (newY < controlbarBounds.top + margin) { - // Force coordinates to be below the top of the control bar - newY = controlbarBounds.top + margin; - - } else if (newY > controlbarBounds.top + - controlbarBounds.height - handleHeight - margin) { - // Force coordinates to be above the bottom of the control bar - newY = controlbarBounds.top + - controlbarBounds.height - handleHeight - margin; - } - - // Corner case: control bar too small for stable position - if (controlbarBounds.height < (handleHeight + margin * 2)) { - newY = controlbarBounds.top + - (controlbarBounds.height - handleHeight) / 2; - } - - // The transform needs coordinates that are relative to the parent - const parentRelativeY = newY - controlbarBounds.top; - handle.style.transform = "translateY(" + parentRelativeY + "px)"; - }, - - updateControlbarHandle() { - // Since the control bar is fixed on the viewport and not the page, - // the move function expects coordinates relative the the viewport. - const handle = document.getElementById("noVNC_control_bar_handle"); - const handleBounds = handle.getBoundingClientRect(); - UI.moveControlbarHandle(handleBounds.top); - }, - - controlbarHandleMouseUp(e) { - if ((e.type == "mouseup") && (e.button != 0)) return; - - // mouseup and mousedown on the same place toggles the controlbar - if (UI.controlbarGrabbed && !UI.controlbarDrag) { - UI.toggleControlbar(); - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - } - UI.controlbarGrabbed = false; - UI.showControlbarHint(false); - }, - - controlbarHandleMouseDown(e) { - if ((e.type == "mousedown") && (e.button != 0)) return; - - const ptr = getPointerEvent(e); - - const handle = document.getElementById("noVNC_control_bar_handle"); - const bounds = handle.getBoundingClientRect(); - - // Touch events have implicit capture - if (e.type === "mousedown") { - setCapture(handle); - } - - UI.controlbarGrabbed = true; - UI.controlbarDrag = false; - - UI.showControlbarHint(true); - - UI.controlbarMouseDownClientY = ptr.clientY; - UI.controlbarMouseDownOffsetY = ptr.clientY - bounds.top; - e.preventDefault(); - e.stopPropagation(); - UI.keepControlbar(); - UI.activateControlbar(); - }, - - toggleExpander(e) { - if (this.classList.contains("noVNC_open")) { - this.classList.remove("noVNC_open"); - } else { - this.classList.add("noVNC_open"); - } - }, - -/* ------^------- - * /VISUAL - * ============== - * SETTINGS - * ------v------*/ - - // Initial page load read/initialization of settings - initSetting(name, defVal) { - // Check Query string followed by cookie - let val = WebUtil.getConfigVar(name); - if (val === null) { - val = WebUtil.readSetting(name, defVal); - } - WebUtil.setSetting(name, val); - UI.updateSetting(name); - return val; - }, - - // Set the new value, update and disable form control setting - forceSetting(name, val) { - WebUtil.setSetting(name, val); - UI.updateSetting(name); - UI.disableSetting(name); - }, - - // Update cookie and form control setting. If value is not set, then - // updates from control to current cookie setting. - updateSetting(name) { - - // Update the settings control - let value = UI.getSetting(name); - - const ctrl = document.getElementById('noVNC_setting_' + name); - if (ctrl.type === 'checkbox') { - ctrl.checked = value; - - } else if (typeof ctrl.options !== 'undefined') { - for (let i = 0; i < ctrl.options.length; i += 1) { - if (ctrl.options[i].value === value) { - ctrl.selectedIndex = i; - break; - } - } - } else { - ctrl.value = value; - } - }, - - // Save control setting to cookie - saveSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - let val; - if (ctrl.type === 'checkbox') { - val = ctrl.checked; - } else if (typeof ctrl.options !== 'undefined') { - val = ctrl.options[ctrl.selectedIndex].value; - } else { - val = ctrl.value; - } - WebUtil.writeSetting(name, val); - //Log.Debug("Setting saved '" + name + "=" + val + "'"); - return val; - }, - - // Read form control compatible setting from cookie - getSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - let val = WebUtil.readSetting(name); - if (typeof val !== 'undefined' && val !== null && ctrl.type === 'checkbox') { - if (val.toString().toLowerCase() in {'0': 1, 'no': 1, 'false': 1}) { - val = false; - } else { - val = true; - } - } - return val; - }, - - // These helpers compensate for the lack of parent-selectors and - // previous-sibling-selectors in CSS which are needed when we want to - // disable the labels that belong to disabled input elements. - disableSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - ctrl.disabled = true; - ctrl.label.classList.add('noVNC_disabled'); - }, - - enableSetting(name) { - const ctrl = document.getElementById('noVNC_setting_' + name); - ctrl.disabled = false; - ctrl.label.classList.remove('noVNC_disabled'); - }, - -/* ------^------- - * /SETTINGS - * ============== - * PANELS - * ------v------*/ - - closeAllPanels() { - UI.closeSettingsPanel(); - UI.closePowerPanel(); - UI.closeClipboardPanel(); - UI.closeExtraKeys(); - }, - -/* ------^------- - * /PANELS - * ============== - * SETTINGS (panel) - * ------v------*/ - - openSettingsPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - // Refresh UI elements from saved cookies - UI.updateSetting('encrypt'); - UI.updateSetting('view_clip'); - UI.updateSetting('resize'); - UI.updateSetting('quality'); - UI.updateSetting('compression'); - UI.updateSetting('shared'); - UI.updateSetting('view_only'); - UI.updateSetting('path'); - UI.updateSetting('repeaterID'); - UI.updateSetting('logging'); - UI.updateSetting('reconnect'); - UI.updateSetting('reconnect_delay'); - - document.getElementById('noVNC_settings') - .classList.add("noVNC_open"); - document.getElementById('noVNC_settings_button') - .classList.add("noVNC_selected"); - }, - - closeSettingsPanel() { - document.getElementById('noVNC_settings') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_settings_button') - .classList.remove("noVNC_selected"); - }, - - toggleSettingsPanel() { - if (document.getElementById('noVNC_settings') - .classList.contains("noVNC_open")) { - UI.closeSettingsPanel(); - } else { - UI.openSettingsPanel(); - } - }, - -/* ------^------- - * /SETTINGS - * ============== - * POWER - * ------v------*/ - - openPowerPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_power') - .classList.add("noVNC_open"); - document.getElementById('noVNC_power_button') - .classList.add("noVNC_selected"); - }, - - closePowerPanel() { - document.getElementById('noVNC_power') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_power_button') - .classList.remove("noVNC_selected"); - }, - - togglePowerPanel() { - if (document.getElementById('noVNC_power') - .classList.contains("noVNC_open")) { - UI.closePowerPanel(); - } else { - UI.openPowerPanel(); - } - }, - - // Disable/enable power button - updatePowerButton() { - if (UI.connected && - UI.rfb.capabilities.power && - !UI.rfb.viewOnly) { - document.getElementById('noVNC_power_button') - .classList.remove("noVNC_hidden"); - } else { - document.getElementById('noVNC_power_button') - .classList.add("noVNC_hidden"); - // Close power panel if open - UI.closePowerPanel(); - } - }, - -/* ------^------- - * /POWER - * ============== - * CLIPBOARD - * ------v------*/ - - openClipboardPanel() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_clipboard') - .classList.add("noVNC_open"); - document.getElementById('noVNC_clipboard_button') - .classList.add("noVNC_selected"); - }, - - closeClipboardPanel() { - document.getElementById('noVNC_clipboard') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_clipboard_button') - .classList.remove("noVNC_selected"); - }, - - toggleClipboardPanel() { - if (document.getElementById('noVNC_clipboard') - .classList.contains("noVNC_open")) { - UI.closeClipboardPanel(); - } else { - UI.openClipboardPanel(); - } - }, - - clipboardReceive(e) { - Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0, 40) + "..."); - document.getElementById('noVNC_clipboard_text').value = e.detail.text; - Log.Debug("<< UI.clipboardReceive"); - }, - - clipboardClear() { - document.getElementById('noVNC_clipboard_text').value = ""; - UI.rfb.clipboardPasteFrom(""); - }, - - clipboardSend() { - const text = document.getElementById('noVNC_clipboard_text').value; - Log.Debug(">> UI.clipboardSend: " + text.substr(0, 40) + "..."); - UI.rfb.clipboardPasteFrom(text); - Log.Debug("<< UI.clipboardSend"); - }, - -/* ------^------- - * /CLIPBOARD - * ============== - * CONNECTION - * ------v------*/ - - openConnectPanel() { - document.getElementById('noVNC_connect_dlg') - .classList.add("noVNC_open"); - }, - - closeConnectPanel() { - document.getElementById('noVNC_connect_dlg') - .classList.remove("noVNC_open"); - }, - - connect(event, password) { - - // Ignore when rfb already exists - if (typeof UI.rfb !== 'undefined') { - return; - } - - const host = UI.getSetting('host'); - const port = UI.getSetting('port'); - // AAW CHANGE - const path = readQueryVariable('path', window.location.pathname.replace(/[^/]*$/, '').substring(1) + 'websockify'); - - if (typeof password === 'undefined') { - password = WebUtil.getConfigVar('password'); - UI.reconnectPassword = password; - } - - if (password === null) { - password = undefined; - } - - UI.hideStatus(); - - if (!host) { - Log.Error("Can't connect when host is: " + host); - UI.showStatus(_("Must set host"), 'error'); - return; - } - - UI.closeConnectPanel(); - - UI.updateVisualState('connecting'); - - let url; - - url = UI.getSetting('encrypt') ? 'wss' : 'ws'; - - url += '://' + host; - if (port) { - url += ':' + port; - } - url += '/' + path; - - UI.rfb = new RFB(document.getElementById('noVNC_container'), url, - { shared: UI.getSetting('shared'), - repeaterID: UI.getSetting('repeaterID'), - credentials: { password: password } }); - UI.rfb.addEventListener("connect", UI.connectFinished); - UI.rfb.addEventListener("disconnect", UI.disconnectFinished); - UI.rfb.addEventListener("credentialsrequired", UI.credentials); - UI.rfb.addEventListener("securityfailure", UI.securityFailed); - UI.rfb.addEventListener("capabilities", UI.updatePowerButton); - UI.rfb.addEventListener("clipboard", UI.clipboardReceive); - UI.rfb.addEventListener("bell", UI.bell); - UI.rfb.addEventListener("desktopname", UI.updateDesktopName); - UI.rfb.clipViewport = UI.getSetting('view_clip'); - UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; - UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; - UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); - UI.rfb.compressionLevel = parseInt(UI.getSetting('compression')); - UI.rfb.showDotCursor = UI.getSetting('show_dot'); - - UI.updateViewOnly(); // requires UI.rfb - }, - - disconnect() { - UI.rfb.disconnect(); - - UI.connected = false; - - // Disable automatic reconnecting - UI.inhibitReconnect = true; - - UI.updateVisualState('disconnecting'); - - // Don't display the connection settings until we're actually disconnected - }, - - reconnect() { - UI.reconnectCallback = null; - - // if reconnect has been disabled in the meantime, do nothing. - if (UI.inhibitReconnect) { - return; - } - - UI.connect(null, UI.reconnectPassword); - }, - - cancelReconnect() { - if (UI.reconnectCallback !== null) { - clearTimeout(UI.reconnectCallback); - UI.reconnectCallback = null; - } - - UI.updateVisualState('disconnected'); - - UI.openControlbar(); - UI.openConnectPanel(); - }, - - connectFinished(e) { - UI.connected = true; - UI.inhibitReconnect = false; - - let msg; - if (UI.getSetting('encrypt')) { - msg = _("Connected (encrypted) to ") + UI.desktopName; - } else { - msg = _("Connected (unencrypted) to ") + UI.desktopName; - } - UI.showStatus(msg); - UI.updateVisualState('connected'); - - // Do this last because it can only be used on rendered elements - UI.rfb.focus(); - }, - - disconnectFinished(e) { - const wasConnected = UI.connected; - - // This variable is ideally set when disconnection starts, but - // when the disconnection isn't clean or if it is initiated by - // the server, we need to do it here as well since - // UI.disconnect() won't be used in those cases. - UI.connected = false; - - UI.rfb = undefined; - - if (!e.detail.clean) { - UI.updateVisualState('disconnected'); - if (wasConnected) { - UI.showStatus(_("Something went wrong, connection is closed"), - 'error'); - } else { - UI.showStatus(_("Failed to connect to server"), 'error'); - } - } else if (UI.getSetting('reconnect', false) === true && !UI.inhibitReconnect) { - UI.updateVisualState('reconnecting'); - - const delay = parseInt(UI.getSetting('reconnect_delay')); - UI.reconnectCallback = setTimeout(UI.reconnect, delay); - return; - } else { - UI.updateVisualState('disconnected'); - UI.showStatus(_("Disconnected"), 'normal'); - } - - document.title = PAGE_TITLE; - - UI.openControlbar(); - UI.openConnectPanel(); - }, - - securityFailed(e) { - let msg = ""; - // On security failures we might get a string with a reason - // directly from the server. Note that we can't control if - // this string is translated or not. - if ('reason' in e.detail) { - msg = _("New connection has been rejected with reason: ") + - e.detail.reason; - } else { - msg = _("New connection has been rejected"); - } - UI.showStatus(msg, 'error'); - }, - -/* ------^------- - * /CONNECTION - * ============== - * PASSWORD - * ------v------*/ - - credentials(e) { - // FIXME: handle more types - - document.getElementById("noVNC_username_block").classList.remove("noVNC_hidden"); - document.getElementById("noVNC_password_block").classList.remove("noVNC_hidden"); - - let inputFocus = "none"; - if (e.detail.types.indexOf("username") === -1) { - document.getElementById("noVNC_username_block").classList.add("noVNC_hidden"); - } else { - inputFocus = inputFocus === "none" ? "noVNC_username_input" : inputFocus; - } - if (e.detail.types.indexOf("password") === -1) { - document.getElementById("noVNC_password_block").classList.add("noVNC_hidden"); - } else { - inputFocus = inputFocus === "none" ? "noVNC_password_input" : inputFocus; - } - document.getElementById('noVNC_credentials_dlg') - .classList.add('noVNC_open'); - - setTimeout(() => document - .getElementById(inputFocus).focus(), 100); - - Log.Warn("Server asked for credentials"); - UI.showStatus(_("Credentials are required"), "warning"); - }, - - setCredentials(e) { - // Prevent actually submitting the form - e.preventDefault(); - - let inputElemUsername = document.getElementById('noVNC_username_input'); - const username = inputElemUsername.value; - - let inputElemPassword = document.getElementById('noVNC_password_input'); - const password = inputElemPassword.value; - // Clear the input after reading the password - inputElemPassword.value = ""; - - UI.rfb.sendCredentials({ username: username, password: password }); - UI.reconnectPassword = password; - document.getElementById('noVNC_credentials_dlg') - .classList.remove('noVNC_open'); - }, - -/* ------^------- - * /PASSWORD - * ============== - * FULLSCREEN - * ------v------*/ - - toggleFullscreen() { - if (document.fullscreenElement || // alternative standard method - document.mozFullScreenElement || // currently working methods - document.webkitFullscreenElement || - document.msFullscreenElement) { - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } - } else { - if (document.documentElement.requestFullscreen) { - document.documentElement.requestFullscreen(); - } else if (document.documentElement.mozRequestFullScreen) { - document.documentElement.mozRequestFullScreen(); - } else if (document.documentElement.webkitRequestFullscreen) { - document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - } else if (document.body.msRequestFullscreen) { - document.body.msRequestFullscreen(); - } - } - UI.updateFullscreenButton(); - }, - - updateFullscreenButton() { - if (document.fullscreenElement || // alternative standard method - document.mozFullScreenElement || // currently working methods - document.webkitFullscreenElement || - document.msFullscreenElement ) { - document.getElementById('noVNC_fullscreen_button') - .classList.add("noVNC_selected"); - } else { - document.getElementById('noVNC_fullscreen_button') - .classList.remove("noVNC_selected"); - } - }, - -/* ------^------- - * /FULLSCREEN - * ============== - * RESIZE - * ------v------*/ - - // Apply remote resizing or local scaling - applyResizeMode() { - if (!UI.rfb) return; - - UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; - UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; - }, - -/* ------^------- - * /RESIZE - * ============== - * VIEW CLIPPING - * ------v------*/ - - // Update viewport clipping property for the connection. The normal - // case is to get the value from the setting. There are special cases - // for when the viewport is scaled or when a touch device is used. - updateViewClip() { - if (!UI.rfb) return; - - const scaling = UI.getSetting('resize') === 'scale'; - - if (scaling) { - // Can't be clipping if viewport is scaled to fit - UI.forceSetting('view_clip', false); - UI.rfb.clipViewport = false; - } else if (!hasScrollbarGutter) { - // Some platforms have scrollbars that are difficult - // to use in our case, so we always use our own panning - UI.forceSetting('view_clip', true); - UI.rfb.clipViewport = true; - } else { - UI.enableSetting('view_clip'); - UI.rfb.clipViewport = UI.getSetting('view_clip'); - } - - // Changing the viewport may change the state of - // the dragging button - UI.updateViewDrag(); - }, - -/* ------^------- - * /VIEW CLIPPING - * ============== - * VIEWDRAG - * ------v------*/ - - toggleViewDrag() { - if (!UI.rfb) return; - - UI.rfb.dragViewport = !UI.rfb.dragViewport; - UI.updateViewDrag(); - }, - - updateViewDrag() { - if (!UI.connected) return; - - const viewDragButton = document.getElementById('noVNC_view_drag_button'); - - if (!UI.rfb.clipViewport && UI.rfb.dragViewport) { - // We are no longer clipping the viewport. Make sure - // viewport drag isn't active when it can't be used. - UI.rfb.dragViewport = false; - } - - if (UI.rfb.dragViewport) { - viewDragButton.classList.add("noVNC_selected"); - } else { - viewDragButton.classList.remove("noVNC_selected"); - } - - if (UI.rfb.clipViewport) { - viewDragButton.classList.remove("noVNC_hidden"); - } else { - viewDragButton.classList.add("noVNC_hidden"); - } - }, - -/* ------^------- - * /VIEWDRAG - * ============== - * QUALITY - * ------v------*/ - - updateQuality() { - if (!UI.rfb) return; - - UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); - }, - -/* ------^------- - * /QUALITY - * ============== - * COMPRESSION - * ------v------*/ - - updateCompression() { - if (!UI.rfb) return; - - UI.rfb.compressionLevel = parseInt(UI.getSetting('compression')); - }, - -/* ------^------- - * /COMPRESSION - * ============== - * KEYBOARD - * ------v------*/ - - showVirtualKeyboard() { - if (!isTouchDevice) return; - - const input = document.getElementById('noVNC_keyboardinput'); - - if (document.activeElement == input) return; - - input.focus(); - - try { - const l = input.value.length; - // Move the caret to the end - input.setSelectionRange(l, l); - } catch (err) { - // setSelectionRange is undefined in Google Chrome - } - }, - - hideVirtualKeyboard() { - if (!isTouchDevice) return; - - const input = document.getElementById('noVNC_keyboardinput'); - - if (document.activeElement != input) return; - - input.blur(); - }, - - toggleVirtualKeyboard() { - if (document.getElementById('noVNC_keyboard_button') - .classList.contains("noVNC_selected")) { - UI.hideVirtualKeyboard(); - } else { - UI.showVirtualKeyboard(); - } - }, - - onfocusVirtualKeyboard(event) { - document.getElementById('noVNC_keyboard_button') - .classList.add("noVNC_selected"); - if (UI.rfb) { - UI.rfb.focusOnClick = false; - } - }, - - onblurVirtualKeyboard(event) { - document.getElementById('noVNC_keyboard_button') - .classList.remove("noVNC_selected"); - if (UI.rfb) { - UI.rfb.focusOnClick = true; - } - }, - - keepVirtualKeyboard(event) { - const input = document.getElementById('noVNC_keyboardinput'); - - // Only prevent focus change if the virtual keyboard is active - if (document.activeElement != input) { - return; - } - - // Only allow focus to move to other elements that need - // focus to function properly - if (event.target.form !== undefined) { - switch (event.target.type) { - case 'text': - case 'email': - case 'search': - case 'password': - case 'tel': - case 'url': - case 'textarea': - case 'select-one': - case 'select-multiple': - return; - } - } - - event.preventDefault(); - }, - - keyboardinputReset() { - const kbi = document.getElementById('noVNC_keyboardinput'); - kbi.value = new Array(UI.defaultKeyboardinputLen).join("_"); - UI.lastKeyboardinput = kbi.value; - }, - - keyEvent(keysym, code, down) { - if (!UI.rfb) return; - - UI.rfb.sendKey(keysym, code, down); - }, - - // When normal keyboard events are left uncought, use the input events from - // the keyboardinput element instead and generate the corresponding key events. - // This code is required since some browsers on Android are inconsistent in - // sending keyCodes in the normal keyboard events when using on screen keyboards. - keyInput(event) { - - if (!UI.rfb) return; - - const newValue = event.target.value; - - if (!UI.lastKeyboardinput) { - UI.keyboardinputReset(); - } - const oldValue = UI.lastKeyboardinput; - - let newLen; - try { - // Try to check caret position since whitespace at the end - // will not be considered by value.length in some browsers - newLen = Math.max(event.target.selectionStart, newValue.length); - } catch (err) { - // selectionStart is undefined in Google Chrome - newLen = newValue.length; - } - const oldLen = oldValue.length; - - let inputs = newLen - oldLen; - let backspaces = inputs < 0 ? -inputs : 0; - - // Compare the old string with the new to account for - // text-corrections or other input that modify existing text - for (let i = 0; i < Math.min(oldLen, newLen); i++) { - if (newValue.charAt(i) != oldValue.charAt(i)) { - inputs = newLen - i; - backspaces = oldLen - i; - break; - } - } - - // Send the key events - for (let i = 0; i < backspaces; i++) { - UI.rfb.sendKey(KeyTable.XK_BackSpace, "Backspace"); - } - for (let i = newLen - inputs; i < newLen; i++) { - UI.rfb.sendKey(keysyms.lookup(newValue.charCodeAt(i))); - } - - // Control the text content length in the keyboardinput element - if (newLen > 2 * UI.defaultKeyboardinputLen) { - UI.keyboardinputReset(); - } else if (newLen < 1) { - // There always have to be some text in the keyboardinput - // element with which backspace can interact. - UI.keyboardinputReset(); - // This sometimes causes the keyboard to disappear for a second - // but it is required for the android keyboard to recognize that - // text has been added to the field - event.target.blur(); - // This has to be ran outside of the input handler in order to work - setTimeout(event.target.focus.bind(event.target), 0); - } else { - UI.lastKeyboardinput = newValue; - } - }, - -/* ------^------- - * /KEYBOARD - * ============== - * EXTRA KEYS - * ------v------*/ - - openExtraKeys() { - UI.closeAllPanels(); - UI.openControlbar(); - - document.getElementById('noVNC_modifiers') - .classList.add("noVNC_open"); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.add("noVNC_selected"); - }, - - closeExtraKeys() { - document.getElementById('noVNC_modifiers') - .classList.remove("noVNC_open"); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.remove("noVNC_selected"); - }, - - toggleExtraKeys() { - if (document.getElementById('noVNC_modifiers') - .classList.contains("noVNC_open")) { - UI.closeExtraKeys(); - } else { - UI.openExtraKeys(); - } - }, - - sendEsc() { - UI.sendKey(KeyTable.XK_Escape, "Escape"); - }, - - sendTab() { - UI.sendKey(KeyTable.XK_Tab, "Tab"); - }, - - toggleCtrl() { - const btn = document.getElementById('noVNC_toggle_ctrl_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Control_L, "ControlLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Control_L, "ControlLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - toggleWindows() { - const btn = document.getElementById('noVNC_toggle_windows_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Super_L, "MetaLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Super_L, "MetaLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - toggleAlt() { - const btn = document.getElementById('noVNC_toggle_alt_button'); - if (btn.classList.contains("noVNC_selected")) { - UI.sendKey(KeyTable.XK_Alt_L, "AltLeft", false); - btn.classList.remove("noVNC_selected"); - } else { - UI.sendKey(KeyTable.XK_Alt_L, "AltLeft", true); - btn.classList.add("noVNC_selected"); - } - }, - - sendCtrlAltDel() { - UI.rfb.sendCtrlAltDel(); - // See below - UI.rfb.focus(); - UI.idleControlbar(); - }, - - sendKey(keysym, code, down) { - UI.rfb.sendKey(keysym, code, down); - - // Move focus to the screen in order to be able to use the - // keyboard right after these extra keys. - // The exception is when a virtual keyboard is used, because - // if we focus the screen the virtual keyboard would be closed. - // In this case we focus our special virtual keyboard input - // element instead. - if (document.getElementById('noVNC_keyboard_button') - .classList.contains("noVNC_selected")) { - document.getElementById('noVNC_keyboardinput').focus(); - } else { - UI.rfb.focus(); - } - // fade out the controlbar to highlight that - // the focus has been moved to the screen - UI.idleControlbar(); - }, - -/* ------^------- - * /EXTRA KEYS - * ============== - * MISC - * ------v------*/ - - updateViewOnly() { - if (!UI.rfb) return; - UI.rfb.viewOnly = UI.getSetting('view_only'); - - // Hide input related buttons in view only mode - if (UI.rfb.viewOnly) { - document.getElementById('noVNC_keyboard_button') - .classList.add('noVNC_hidden'); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.add('noVNC_hidden'); - document.getElementById('noVNC_clipboard_button') - .classList.add('noVNC_hidden'); - } else { - document.getElementById('noVNC_keyboard_button') - .classList.remove('noVNC_hidden'); - document.getElementById('noVNC_toggle_extra_keys_button') - .classList.remove('noVNC_hidden'); - document.getElementById('noVNC_clipboard_button') - .classList.remove('noVNC_hidden'); - } - }, - - updateShowDotCursor() { - if (!UI.rfb) return; - UI.rfb.showDotCursor = UI.getSetting('show_dot'); - }, - - updateLogging() { - WebUtil.initLogging(UI.getSetting('logging')); - }, - - updateDesktopName(e) { - UI.desktopName = e.detail.name; - // Display the desktop name in the document title - document.title = e.detail.name + " - " + PAGE_TITLE; - }, - - bell(e) { - if (WebUtil.getConfigVar('bell', 'on') === 'on') { - const promise = document.getElementById('noVNC_bell').play(); - // The standards disagree on the return value here - if (promise) { - promise.catch((e) => { - if (e.name === "NotAllowedError") { - // Ignore when the browser doesn't let us play audio. - // It is common that the browsers require audio to be - // initiated from a user action. - } else { - Log.Error("Unable to play bell: " + e); - } - }); - } - } - }, - - //Helper to add options to dropdown. - addOption(selectbox, text, value) { - const optn = document.createElement("OPTION"); - optn.text = text; - optn.value = value; - selectbox.options.add(optn); - }, - -/* ------^------- - * /MISC - * ============== - */ -}; - -// Set up translations -const LINGUAS = ["cs", "de", "el", "es", "fr", "ja", "ko", "nl", "pl", "pt_BR", "ru", "sv", "tr", "zh_CN", "zh_TW"]; -l10n.setup(LINGUAS); -if (l10n.language === "en" || l10n.dictionary !== undefined) { - UI.prime(); -} else { - fetch('app/locale/' + l10n.language + '.json') - .then((response) => { - if (!response.ok) { - throw Error("" + response.status + " " + response.statusText); - } - return response.json(); - }) - .then((translations) => { l10n.dictionary = translations; }) - .catch(err => Log.Error("Failed to load translations: " + err)) - .then(UI.prime); -} - -// AAW function addition -function readQueryVariable(name, defaultValue) { - // A URL with a query parameter can look like this: - // https://www.example.com?myqueryparam=myvalue - // - // Note that we use location.href instead of location.search - // because Firefox < 53 has a bug w.r.t location.search - const re = new RegExp('.*[?&]' + name + '=([^&#]*)'), match = document.location.href.match(re); - if (typeof defaultValue === 'undefined') { defaultValue = null; } - if (match) { - // We have to decode the URL since want the cleartext value - return decodeURIComponent(match[1]); - } - return defaultValue; -} - -export default UI; \ No newline at end of file diff --git a/resources/remote-desktop/novnc/vnc_lite.html b/resources/remote-desktop/novnc/vnc_lite.html deleted file mode 100644 index 47c393ac1..000000000 --- a/resources/remote-desktop/novnc/vnc_lite.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - noVNC - - - - - - - - - -
-
Loading
-
Send CtrlAltDel
-
-
- -
- - \ No newline at end of file diff --git a/resources/remote-desktop/openmpp.png b/resources/remote-desktop/openmpp.png deleted file mode 100644 index 0dcdbd4e4..000000000 Binary files a/resources/remote-desktop/openmpp.png and /dev/null differ diff --git a/resources/remote-desktop/qgis-2022.gpg.key b/resources/remote-desktop/qgis-2022.gpg.key deleted file mode 100644 index fd866eca2..000000000 --- a/resources/remote-desktop/qgis-2022.gpg.key +++ /dev/null @@ -1,41 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBGLxBh0BEADMrPJ64egoZWUOWLgLQOhkfLh9K/clkHeHOD/Su76yhNrKrWZT -vqQM/sN3RBEWTtAXUkRK7xrZmtaz+6jlpT5A1XxbEMEBDyBQ7KCScFKPb1RRgM2T -ZB20CjXQzK2SKKcF5MaYFuPoXGyagBbMOjjU9Vp/gM5M4nN7N5TplElXR7BC1cWx -pg+NC/c4zw2S1dTY2joe/frEvoQSiKbxyOwhd74MlC5R/Fe1EfPoXiGoLd+Qal6w -FQpBVYsgOY8JmiQQ7rNLkh2h8Xbv8MsgN+vV0HMCxGXg8OfGdQZxXgGfaqFwTyD4 -HE39J4PR1elvHG/vyfpXzgpdXUyH71E6NQOzb5Nw0E1USeiiwRWRLkl8wsekoKLw -sp0M2EXIFwmo3OJ5Ms6yjJMk10uwCIMSlxJLgzzOHd++1pNIw2iOF8IWmsZlFQg7 -SLkraOYpjSBCePN8vC4NyuhKpqW6jc0xlx3nPLkciNBKmQhpERQMiClmFR7SQahR -mmAGk0gMzZVKJEj99AfX4AeGA7Vme+aLXxEFzrHwHQZSwi1M6Au/TikqsHJi9DmP -AAcX88J8LKBjYEMuZ++fzD7DXd+NvY1D9v3130fE/NrTbn+WznnwJ7kxgSZFm6zS -W7NtBoPvIzBLYC7tummKXeY8OAqmT9WxXB6EbJR39LhR3oJy64Xt30OJfwARAQAB -tE9RR0lTIEFyY2hpdmUgQXV0b21hdGljIFNpZ25pbmcgS2V5ICgyMDIyLTIwMjcp -IDxxZ2lzLWRldmVsb3BlckBsaXN0cy5vc2dlby5vcmc+iQJVBBMBCgA/FiEELX40 -QacH/bPnBZRB0VW45qQZxb4FAmLxBh0CGy8FCQlnK4MGCwkIBwMCBRUKCQgLBRYD -AQIAAh4BAheAAAoJENFVuOakGcW+TggQAKK8dV/FRxmLUok0ZkIr+RLRKaLoUX49 -j9RLKwF1/kWj8HTkcpU7rxBFS7JLuJCJdKLL0fHBGxAEi5W5nmsyLEDg00+rtklp -RU386nSG+C99sFvS/zgxu3S4I3C4MQFlmmtuzJQaLRBzHDuTt0p3nnARBQTdP681 -Nvvx7pVy4l1iIw0569n2/IbwAAK4VjPD0LWz307Htq2vSjiJJDSfbmWThIB98Yhb -Rh3xsPQZKeEoEGVUOcRuGRjDNJ8LUlF7MDFpwJhVn/M93LGWDaUUfZdag/EBSClC -8jCxyJBN4M+2lPenOqHwxAMJteu1GiakL2JVfK/c1fxq2rCkt7Wzx1Lg33dX2q7W -FeuzI6rblrIPAbZZPoxhU70JseOy3DTCDVGk+oORTbxdjpN/mLBbmGpkRKkMrDGD -v9K3H/GdlcVKoL44sIywLQ3gotfpRwTj3To/D8rgFIyErsaD31BOwM4OjBSQ2BRu -QDJFi3E6Gba3HagXO2h1yTw8hYk13uC52UPzspy+otYL7q7G2keeHWL28J4XIKMO -923jdZBGDrk3X1e+UPSMZiRiO1dMKUN7MunXEARMZXQMAgqZQY/G7BEjrTFiNZ0i -liJ42SIA9UbOVmRwSDYLKTVov0820cqXDLCEVQ4k2QTo8jm9lapU7SQD4QdGgBmZ -dqsO8kDJoe4diQIzBBABCgAdFiEEJEXWslTaxFKkmJieRrVyHbvSmWoFAmLxBx8A -CgkQRrVyHbvSmWrS8BAAuLbvtSDnk8Gy8gDScXvK/1ZIXBXfjq73tGR8Evt8vvb3 -sYcAxOYMi2I0J0mpwoAoS4AuqMUvVGlqW2Zf7tWxa5FbnAtOyQpskCn09N3rZRzk -qiLuMz4/EAY2t/RL2tujjYY4f1OzgaWwcB6lcia745jQXxsH2eHMSz3VRdSVOUIZ -6d0zERj/xsUcDAT+H45bhseMV7TuS1t8RMF55Q42AJrI0CSApdy+ZT0vsk7cm3Q1 -dMhs0+89l0ixnV3cAdkzdzHzKfX+E7tEfFKLd2ALdxcQ36Hx2Dc4MEkzVmM48Ww1 -ygNVhZARXoHxSvi6DWrT4URcQgcQV8ExnaioKgHkzuzelzfZisTn8TDPK+cjF0Zc -BRkpCCX/8RJ2NgUCK7TRx4KVSPnLt3V1C33yIUMSB9Q0gacUhu/Gx2TGcZAlCo8O -FJ+W9VuwvQGKQGUaZD+8cR+d/KogowlfFTnvxVVaCGvK8Biy2aFk0RrtfxvHduI1 -Bwne1/xLjbgUYuSkLZyX/nLkpMGXdpyzruwvsCCaY5WtL5D54cHLG+Sw3OBim9RF -26QZApT5OpSVCKOGanDhdIFMXpTc3AgNRIPDKY5BAn+CQ/8ptOBh2sUxwLALa5s3 -2DaTIpJxri5h7kfzmwIge4ECJ7/48didAjVMaMCy5M3eeXgNoKtCPJEyWnnjIYs= -=//+R ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/remote-desktop/start-remote-desktop.sh b/resources/remote-desktop/start-remote-desktop.sh deleted file mode 100755 index 587633271..000000000 --- a/resources/remote-desktop/start-remote-desktop.sh +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash - -echo "--------------------Starting up--------------------" -if [ -d /var/run/secrets/kubernetes.io/serviceaccount ]; then - while ! curl -s -f http://127.0.0.1:15020/healthz/ready; do sleep 1; done -fi - -echo "Checking if we want to sleep infinitely" -if [[ -z "${INFINITY_SLEEP}" ]]; then - echo "Not sleeping" -else - echo "--------------------zzzzzz--------------------" - sleep infinity -fi - -test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" - - -if conda --help > /dev/null 2>&1; then - conda init bash - conda init zsh -fi - -# Configure the language -if [ -n "${KF_LANG}" ]; then - if [ "${KF_LANG}" = "en" ]; then - export LANG="en_US.utf8" - else - export LANG="fr_CA.utf8" - # User's browser lang is set to french, open jupyterlab in french (fr_FR) - if [ "${DEFAULT_JUPYTER_URL}" != "/rstudio" ]; then - export LANG="fr_FR" - lang_file="$HOME/.jupyter/lab/user-settings/@jupyterlab/translation-extension/plugin.jupyterlab-settings" - mkdir -p "$(dirname "${lang_file}")" && touch $lang_file - ( echo '{' - echo ' // Langue' - echo ' // @jupyterlab/translation-extension:plugin' - echo ' // Paramètres de langue.' - echo -e ' // ****************************************\n' - echo ' // Langue locale' - echo ' // Définit la langue d'\''affichage de l'\''interface. Exemples: '\''es_CO'\'', '\''fr'\''.' - echo ' "locale": "'${LANG}'"' - echo '}' - ) > $lang_file - fi - fi - - # VS-Code i18n stuff - if [ "${KF_LANG}" = "fr" ]; then - export LANG="fr_FR.UTF-8" - export LANGUAGE="fr_FR.UTF-8" - export LC_ALL="fr_FR.UTF-8" - #Set the locale for vscode - mkdir -p $HOME/.vscode - jq -e '.locale="fr"' $HOME/.vscode/argv.json > /tmp/file.json.tmp - mv /tmp/file.json.tmp $HOME/.vscode/argv.json - fi -fi - -echo "language has been configured" -touch /home/$NB_USER/.hushlogin - -# Configure KFP multi-user -if [ -n "${NB_NAMESPACE}" ]; then -mkdir -p $HOME/.config/kfp -cat < $HOME/.config/kfp/context.json -{"namespace": "${NB_NAMESPACE}"} -EOF -fi - -echo "KFP multi-user has been configured" - -# Create desktop shortcuts -if [ -d $RESOURCES_PATH/desktop-files ]; then - mkdir -p ~/.local/share/applications/ $HOME/Desktop - echo find $RESOURCES_PATH/desktop-files/ $HOME/Desktop/ - find $RESOURCES_PATH/desktop-files/ -type f -iname "*.desktop" -exec cp {} $HOME/Desktop/ \; - rsync $RESOURCES_PATH/desktop-files/.config/ $HOME/.config/ - find $HOME/Desktop -type f -iname "*.desktop" -exec chmod +x {} \; - mkdir -p $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/ - cp /opt/install/desktop-files/.config/xfce4/xfce4-panel.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/ -fi - -export NB_NAMESPACE=$(echo $NB_PREFIX | awk -F '/' '{print $3}') -export JWT="$(echo /var/run/secrets/kubernetes.io/serviceaccount/token)" - -# Revert, is causing issues -#export PIP_REQUIRE_VIRTUALENV=true -#echo "Checking if Python venv exists" -#if [[ -d "base-python-venv" ]]; then -# echo "Base python venv exists, not going to create again" -#else -# echo "Creating python venv" -# python3 -m venv $HOME/base-python-venv -# echo "adding include-system-site-packages" -#fi - -echo "Checking for .condarc file in hom directory" -if [[ -f "$HOME/.condarc" ]]; then - echo ".condarc file exists, not going to do anything" -else - echo "Creating basic .condarc file" - printf 'envs_dirs:\n - $HOME/.conda/envs' > $HOME/.condarc -fi - -mkdir -p $HOME/.vnc -[ -f $HOME/.vnc/xstartup ] || { - cat < $HOME/.vnc/xstartup -#!/bin/sh - -unset SESSION_MANAGER -unset DBUS_SESSION_BUS_ADDRESS -startxfce4 & - -# Makes an unbelievable difference in speed -(sleep 10 && xdg-settings set default-web-browser firefox.desktop) & -(sleep 10 && xfconf-query -c xfwm4 -p /general/use_compositing -s false && dconf write /org/gnome/terminal/legacy/profiles/custom-command "'/bin/bash'") & -EOF - chmod +x $HOME/.vnc/xstartup -} - -mkdir -p /tmp/vnc-socket/ -VNC_SOCKET=$(mktemp /tmp/vnc-socket/vnc-XXXXXX.sock) -trap "rm -f $VNC_SOCKET" EXIT - -vncserver -SecurityTypes None -rfbunixpath $VNC_SOCKET -geometry 1680x1050 :1 -cat $HOME/.vnc/*.log - -echo "novnc has been configured, launching novnc" -#TODO: Investigate adding vscode extensions to be persisted -# Launch noVNC -( - # cd /tmp/novnc/ - cd /opt/novnc/ - ./utils/novnc_proxy --web $(pwd) --heartbeat 30 --vnc --unix-target=$VNC_SOCKET --listen 5678 -) & - -NB_PREFIX=${NB_PREFIX:-/vnc} -sed -i "s~\${NB_PREFIX}~$NB_PREFIX~g" /etc/nginx/nginx.conf - -# LP64 = 32bit, ILP64 = 64bit, most apps use 32bit -if lscpu | grep -q AuthenticAMD && -d "${AOCL_PATH}" ; then - echo "AuthenticAMD platform detected" - bash ${AOCL_PATH}/setenv_aocl.sh lp64 - exoport LD_LIBRARY_PATH = ${AOCL_PATH}/lib -fi - -nginx -wait