mirror of
https://git.myvelabs.com/novnc/archlinux.git
synced 2026-10-16 09:33:59 +00:00
Propagate to new format
This commit is contained in:
parent
60f86b48bd
commit
7bdd0a78bc
7 changed files with 77 additions and 73 deletions
56
firefox/20-firefox.sh
Executable file
56
firefox/20-firefox.sh
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/env bash
|
||||
# Create firefox profile directory
|
||||
mkdir -p /app/firefox
|
||||
|
||||
# Firefox custom user.js
|
||||
cat >/app/firefox/user.js <<- 'firefox'
|
||||
// First run
|
||||
user_pref("app.normandy.first_run", false);
|
||||
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
|
||||
user_pref("trailhead.firstrun.didSeeAboutWelcome", true);
|
||||
user_pref("browser.startup.homepage_override.mstone", "ignore");
|
||||
|
||||
// Homepage
|
||||
// user_pref("browser.startup.page", 1);
|
||||
// user_pref("browser.startup.homepage", "https://myvelabs.app/");
|
||||
|
||||
// Security/privacy section
|
||||
user_pref("app.shield.optoutstudies.enabled", false);
|
||||
user_pref("browser.contentblocking.category", "standard");
|
||||
user_pref("datareporting.healthreport.uploadEnabled", false);
|
||||
user_pref("extensions.pocket.enabled", false);
|
||||
user_pref("dom.private-attribution.submission.enabled", false);
|
||||
user_pref("network.trr.mode", 5);
|
||||
|
||||
// Disable sponsored content on Firefox Home (Activity Stream)
|
||||
user_pref("browser.newtabpage.activity-stream.showSearch", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
|
||||
user_pref("browser.newtabpage.activity-stream.default.sites", "");
|
||||
user_pref("browser.newtabpage.activity-stream.topSitesRows", 4);
|
||||
|
||||
// Disable about:config warning
|
||||
user_pref("browser.aboutConfig.showWarning", false);
|
||||
|
||||
// Disable url autocomplete
|
||||
user_pref("browser.search.suggest.enabled", false);
|
||||
user_pref("browser.urlbar.suggest.recentsearches", false);
|
||||
user_pref("browser.urlbar.suggest.searches", false);
|
||||
|
||||
// Closing firefox properties
|
||||
user_pref("browser.warnOnQuitShortcut", false);
|
||||
user_pref("browser.tabs.closeWindowWithLastTab", false);
|
||||
|
||||
// Disable autohide toolbar on fullscreen
|
||||
user_pref("browser.fullscreen.autohide", false);
|
||||
firefox
|
||||
|
||||
# i3/firefox startup
|
||||
install /dev/stdin ~/.config/i3/startapp.sh <<- startup
|
||||
#!/usr/bin/env bash
|
||||
# Run firefox
|
||||
while true
|
||||
do
|
||||
/usr/bin/firefox --profile /app/firefox ${MYVNC_FIREFOX_OPTS} --new-window ${MYVNC_FIREFOX_URL}
|
||||
done
|
||||
startup
|
||||
18
firefox/Dockerfile
Normal file
18
firefox/Dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# syntax = docker/dockerfile:1.2
|
||||
FROM myvnc/arch/base:i3
|
||||
USER root
|
||||
|
||||
# Build ARG: use "root" for debugging
|
||||
ARG debug
|
||||
|
||||
# Install packages
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
|
||||
pacman -Syu --ask 4 --needed \
|
||||
firefox firefox-decentraleyes firefox-ublock-origin \
|
||||
&& pacman -Scc --ask 4
|
||||
|
||||
# Tigervnc
|
||||
COPY *.sh /app/init.d/
|
||||
|
||||
# Default environment
|
||||
USER ${debug:-user}
|
||||
27
firefox/up
Executable file
27
firefox/up
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
# Docker build
|
||||
# Optional buildtag
|
||||
# DOCKER_BUILDKIT=1 \
|
||||
# docker build . \
|
||||
# --build-arg debug=${debug:-""} \
|
||||
# --tag ${buildtag:-myvnc/novnc}
|
||||
# Grab options
|
||||
while [ ${1} ]
|
||||
do
|
||||
case ${1} in
|
||||
-b | --build | b | build )
|
||||
build="--build"
|
||||
;;
|
||||
-d | --detach | d | detach )
|
||||
detach="--detach"
|
||||
;;
|
||||
bd | db )
|
||||
build="--build"
|
||||
detach="--detach"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Compose up
|
||||
docker compose up ${build} ${detach}
|
||||
77
i3/10-tigervnc.sh
Executable file
77
i3/10-tigervnc.sh
Executable file
|
|
@ -0,0 +1,77 @@
|
|||
#!/usr/bin/env bash
|
||||
# Check for MYVNC_VNCPASS variable
|
||||
if [ -z ${MYVNC_VNCPASS} ]
|
||||
then
|
||||
echo "MYVNC_VNCPASS env variable is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configure tigervnc auth
|
||||
if [ ! -f ~/.vnc/passwd ]
|
||||
then
|
||||
echo "${MYVNC_VNCPASS}" | vncpasswd -f >~/.vnc/passwd
|
||||
chmod 0600 ~/.vnc/passwd
|
||||
fi
|
||||
|
||||
# Remove VNCPASS env
|
||||
unset MYVNC_VNCPASS
|
||||
|
||||
# VNC xstartup
|
||||
install /dev/stdin ~/.vnc/xstartup <<- xstartup
|
||||
#!/usr/bin/env bash
|
||||
unset SESSION_MANAGER
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
exec ${STARTXBIN}
|
||||
xstartup
|
||||
|
||||
# Turn vnc sharing on/off
|
||||
if [[ ${MYVNC_VNCSHARING} == "true" ]] || [[ ${MYVNC_VNCSHARING} == "1" ]]
|
||||
then
|
||||
_MYVNC_VNCSHARING=alwaysshared
|
||||
else
|
||||
_MYVNC_VNCSHARING=nevershared
|
||||
fi
|
||||
|
||||
# VNC config
|
||||
cat >~/.vnc/config <<- vncconfig
|
||||
session=i3
|
||||
geometry=1920x1080
|
||||
framerate=60
|
||||
depth=32
|
||||
${_MYVNC_VNCSHARING}
|
||||
vncconfig
|
||||
|
||||
# i3 preferences
|
||||
mkdir -p ~/.config/i3/config.d
|
||||
cat >~/.config/i3/config <<- 'i3config'
|
||||
# Font
|
||||
font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Include custom config
|
||||
include ~/.config/i3/config.d/*.conf
|
||||
|
||||
# Binds for killing application
|
||||
bindsym Mod1+Mod4+Shift+q kill
|
||||
bindsym Mod1+Mod4+Shift+f fullscreen toggle
|
||||
|
||||
# Binds for cycling workspaces
|
||||
bindsym Mod1+Mod4+Shift+Right workspace next
|
||||
bindsym Mod1+Mod4+Shift+Left workspace prev
|
||||
|
||||
# Locked mode
|
||||
mode locked {
|
||||
bindsym Mod4+Mod1+Escape mode default
|
||||
}
|
||||
bindsym Mod4+Mod1+Escape mode locked
|
||||
|
||||
# Hide bar permanently
|
||||
exec --no-startup-id i3-msg bar mode invisible
|
||||
|
||||
# Always open window in fullscreen
|
||||
for_window [all] fullscreen enable
|
||||
for_window [all] border none
|
||||
default_border none
|
||||
|
||||
# Execute startup script for webapp
|
||||
exec --no-startup-id /usr/bin/bash ~/.config/i3/startapp.sh
|
||||
i3config
|
||||
3
i3/90-tigervnc.sh
Executable file
3
i3/90-tigervnc.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
# Launch Tigervnc
|
||||
/usr/bin/dbus-launch vncserver :0 &
|
||||
22
i3/Dockerfile
Normal file
22
i3/Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# syntax = docker/dockerfile:1.2
|
||||
FROM myvnc/arch/base
|
||||
USER root
|
||||
|
||||
# Build ARG: use "root" for debugging
|
||||
ARG debug
|
||||
|
||||
# X session environment variable
|
||||
ENV STARTXBIN=i3
|
||||
|
||||
# Install packages
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
|
||||
pacman -Syu --ask 4 --needed \
|
||||
tigervnc \
|
||||
i3-wm ttf-dejavu \
|
||||
&& pacman -Scc --ask 4
|
||||
|
||||
# i3
|
||||
COPY *.sh /app/init.d/
|
||||
|
||||
# Reset user home directory
|
||||
USER ${debug:-user}
|
||||
7
i3/build
Executable file
7
i3/build
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# Docker build
|
||||
# Optional: buildtag
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build . \
|
||||
--build-arg debug=${debug:-""} \
|
||||
--tag ${buildtag:-myvnc/arch/base:i3}
|
||||
Loading…
Reference in a new issue