nmfs-opensci / py-rocket-base

base jupyterhub image with Python and R. See packages for the images.
https://nmfs-opensci.github.io/py-rocket-base/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

problem with Desktop folder #187

Open eeholmes opened 5 hours ago

eeholmes commented 5 hours ago
eeholmes commented 5 hours ago

The Desktop issue is that setting to /usr/share/Desktop once is setting this and it is retained.

cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="/usr/share/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
eeholmes commented 5 hours ago

https://wiki.archlinux.org/title/XDG_user_directories

eeholmes commented 4 hours ago

It had to do with https://wiki.archlinux.org/title/XDG_user_directories xdg-user-dirs-update being run when Desktop started and this created config for Desktop dir at /usr/share/Desktop. But this isn't normally set up.

So I put this in the Dockerfile to make sure Desktop is setup and config file doesn't trash anything in the user dir.

# Set the defaults for Desktop. Keep in the base so doesn't trash user environment
ENV XDG_CONFIG_HOME=/etc/xdg/.config
RUN chmod +x "${REPO_DIR}/desktop.sh" \
    && "${REPO_DIR}/desktop.sh"
eeholmes commented 1 hour ago

https://specifications.freedesktop.org/basedir-spec/latest/