From a0512db6d91aae74631e0a0e77c8db6991e3604f Mon Sep 17 00:00:00 2001 From: Michael Helfrich Date: Sun, 13 Feb 2022 23:06:36 -0500 Subject: [PATCH] * Add firefox-esr for downloading STLs inside the Docker using a web browser. * Add bookmark for /prints/. * Set /prints/ as the default download directory. --- Dockerfile | 17 ++++++++++++----- menu.xml | 5 +++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1320665..2c48b8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update -y && \ RUN apt update && apt install -y --no-install-recommends --allow-unauthenticated \ lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ freeglut3 libgtk2.0-dev libwxgtk3.0-gtk3-dev libwx-perl libxmu-dev libgl1-mesa-glx libgl1-mesa-dri \ - xdg-utils locales locales-all pcmanfm jq curl git \ + xdg-utils locales locales-all pcmanfm jq curl git firefox-esr \ && apt autoclean -y \ && apt autoremove -y \ && rm -rf /var/lib/apt/lists/* @@ -45,11 +45,17 @@ RUN chmod +x /slic3r/get_latest_prusaslicer_release.sh \ && useradd -g slic3r --create-home --home-dir /home/slic3r slic3r \ && mkdir -p /slic3r \ && mkdir -p /configs \ - && chown -R slic3r:slic3r /slic3r /home/slic3r /configs/ \ + && mkdir -p /prints/ \ + && chown -R slic3r:slic3r /slic3r/ /home/slic3r/ /prints/ /configs/ \ && locale-gen en_US \ && mkdir /configs/.local \ && mkdir -p /configs/.config/ \ - && ln -s /configs/.config/ /home/slic3r/ + && ln -s /configs/.config/ /home/slic3r/ \ + && mkdir -p /home/slic3r/.config/ \ + # We can now set the Download directory for Firefox and other browsers. + # We can also add /prints/ to the file explorer bookmarks for easy access. + && echo "XDG_DOWNLOAD_DIR=\"/prints/\"" >> /home/slic3r/.config/user-dirs.dirs \ + && echo "file:///prints prints" >> /home/slic3r/.gtk-bookmarks COPY --from=easy-novnc-build /bin/easy-novnc /usr/local/bin/ COPY menu.xml /etc/xdg/openbox/ @@ -57,6 +63,7 @@ COPY supervisord.conf /etc/ EXPOSE 8080 VOLUME /configs/ +VOLUME /prints/ -# It's time! Let's get to work! We use /configs/ as a bindable volume for Prusaslicers configurations. -CMD ["bash", "-c", "chown -R slic3r:slic3r /configs/ /dev/stdout && exec gosu slic3r supervisord"] \ No newline at end of file +# It's time! Let's get to work! We use /configs/ as a bindable volume for Prusaslicers configurations. We use /prints/ to provide a location for STLs and GCODE files. +CMD ["bash", "-c", "chown -R slic3r:slic3r /home/slic3r/ /configs/ /prints/ /dev/stdout && exec gosu slic3r supervisord"] \ No newline at end of file diff --git a/menu.xml b/menu.xml index 63af474..644d9d2 100644 --- a/menu.xml +++ b/menu.xml @@ -16,6 +16,11 @@ /usr/bin/pcmanfm + + + /usr/bin/firefox + + /usr/bin/x-terminal-emulator -e htop