Skip to content

Commit

Permalink
Merge pull request #5 from nmfs-opensci/eeholmes-patch-2
Browse files Browse the repository at this point in the history
Update start
  • Loading branch information
eeholmes authored Oct 5, 2024
2 parents 1ee2a33 + 5da14be commit e4fb13f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,34 @@ set -euo pipefail
# Set any environment variables here
# These are inherited by all processes, *except* RStudio

# Tell applications where to open desktop apps - this allows notebooks to
# pop open GUIs
export DISPLAY=":1.0"

# Add any .desktop files to the application database and desktop. This is done
# at startup-time because it's expected that a remote filesystem will be
# mounted at $HOME, which would overwrite the data if it was created at
# build-time.
APPLICATIONS_DIR="${HOME}/.local/share/applications"
DESKTOP_DIR="${HOME}/Desktop"
mkdir -p "${APPLICATIONS_DIR}"
mkdir -p "${DESKTOP_DIR}"
for desktop_file_path in ${REPO_DIR}/*.desktop; do
cp "${desktop_file_path}" "${APPLICATIONS_DIR}/."

# Symlink application to desktop
desktop_file_name="$(basename ${desktop_file_path})"
ln -sf "${APPLICATIONS_DIR}/${desktop_file_name}" "${DESKTOP_DIR}/${desktop_file_name}"
done
update-desktop-database "${APPLICATIONS_DIR}"

# Add MIME Type data from XML files in `mime/` dir to the MIME database.
MIME_DIR="${HOME}/.local/share/mime"
MIME_PACKAGES_DIR="${MIME_DIR}/packages"
mkdir -p "${MIME_PACKAGES_DIR}"
for mime_file_path in ${REPO_DIR}/mime/*.xml; do
cp "${mime_file_path}" "${MIME_PACKAGES_DIR}/."
done
update-mime-database "${MIME_DIR}"

exec "$@"

0 comments on commit e4fb13f

Please sign in to comment.