mirror of
https://github.com/getcompanion-ai/computer-guest.git
synced 2026-04-15 07:04:43 +00:00
chore: remove comments from guest desktop scripts
This commit is contained in:
parent
5eb25834af
commit
1fcd913352
3 changed files with 0 additions and 14 deletions
|
|
@ -86,8 +86,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
dbus-user-session \
|
dbus-user-session \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Chromium: Ubuntu 24.04 only ships a snap stub, so pull the real .deb from
|
|
||||||
# the Debian Sid repo with proper GPG key verification.
|
|
||||||
RUN curl -fsSL https://ftp-master.debian.org/keys/archive-key-12.asc \
|
RUN curl -fsSL https://ftp-master.debian.org/keys/archive-key-12.asc \
|
||||||
| gpg --dearmor -o /etc/apt/keyrings/debian-archive.gpg \
|
| gpg --dearmor -o /etc/apt/keyrings/debian-archive.gpg \
|
||||||
&& printf '%s\n' \
|
&& printf '%s\n' \
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,9 @@ fi
|
||||||
|
|
||||||
mkdir -p "$MARKER_DIR" "$XDG_CONFIG_HOME"
|
mkdir -p "$MARKER_DIR" "$XDG_CONFIG_HOME"
|
||||||
|
|
||||||
# XFCE config
|
|
||||||
rm -rf "$XDG_CONFIG_HOME/xfce4"
|
rm -rf "$XDG_CONFIG_HOME/xfce4"
|
||||||
cp -R "$PROFILE_ROOT/xfce" "$XDG_CONFIG_HOME/xfce4"
|
cp -R "$PROFILE_ROOT/xfce" "$XDG_CONFIG_HOME/xfce4"
|
||||||
|
|
||||||
# Plank config
|
|
||||||
mkdir -p "$XDG_CONFIG_HOME/plank"
|
mkdir -p "$XDG_CONFIG_HOME/plank"
|
||||||
cp -R "$PROFILE_ROOT/plank/." "$XDG_CONFIG_HOME/plank/"
|
cp -R "$PROFILE_ROOT/plank/." "$XDG_CONFIG_HOME/plank/"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ cleanup() {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start a persistent D-Bus session and export its address so all child
|
|
||||||
# processes (XFCE, Plank, autocutsel) share the same bus.
|
|
||||||
start_dbus() {
|
start_dbus() {
|
||||||
log "starting dbus session"
|
log "starting dbus session"
|
||||||
eval "$(dbus-launch --sh-syntax)"
|
eval "$(dbus-launch --sh-syntax)"
|
||||||
|
|
@ -110,8 +108,6 @@ start_websockify() {
|
||||||
websockify_pid=$!
|
websockify_pid=$!
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restart the full desktop session (XFCE + Plank + clipboard) on the same
|
|
||||||
# D-Bus so all components share one session bus.
|
|
||||||
restart_desktop_session() {
|
restart_desktop_session() {
|
||||||
[ -n "${plank_pid:-}" ] && kill "$plank_pid" >/dev/null 2>&1 || true
|
[ -n "${plank_pid:-}" ] && kill "$plank_pid" >/dev/null 2>&1 || true
|
||||||
[ -n "${autocutsel_clip_pid:-}" ] && kill "$autocutsel_clip_pid" >/dev/null 2>&1 || true
|
[ -n "${autocutsel_clip_pid:-}" ] && kill "$autocutsel_clip_pid" >/dev/null 2>&1 || true
|
||||||
|
|
@ -124,11 +120,9 @@ restart_desktop_session() {
|
||||||
|
|
||||||
trap cleanup INT TERM
|
trap cleanup INT TERM
|
||||||
|
|
||||||
# Apply desktop profile on first boot
|
|
||||||
log "applying desktop profile"
|
log "applying desktop profile"
|
||||||
runuser -u node -- /opt/desktop/scripts/apply-desktop-profile.sh 2>&1 || true
|
runuser -u node -- /opt/desktop/scripts/apply-desktop-profile.sh 2>&1 || true
|
||||||
|
|
||||||
# Start Xvfb
|
|
||||||
log "starting Xvfb"
|
log "starting Xvfb"
|
||||||
Xvfb "$DISPLAY" -screen 0 1280x800x24 -ac >/tmp/xvfb.log 2>&1 &
|
Xvfb "$DISPLAY" -screen 0 1280x800x24 -ac >/tmp/xvfb.log 2>&1 &
|
||||||
xvfb_pid=$!
|
xvfb_pid=$!
|
||||||
|
|
@ -152,13 +146,10 @@ if [ "$ready" -ne 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Disable screensaver/DPMS
|
|
||||||
xset -display "$DISPLAY" -dpms s off s noblank >/dev/null 2>&1 || true
|
xset -display "$DISPLAY" -dpms s off s noblank >/dev/null 2>&1 || true
|
||||||
|
|
||||||
# Start persistent D-Bus session shared by all desktop components
|
|
||||||
start_dbus
|
start_dbus
|
||||||
|
|
||||||
# Start desktop stack
|
|
||||||
start_xfce
|
start_xfce
|
||||||
wait_for_wm || true
|
wait_for_wm || true
|
||||||
start_plank
|
start_plank
|
||||||
|
|
@ -166,7 +157,6 @@ start_clipboard
|
||||||
start_x11vnc
|
start_x11vnc
|
||||||
start_websockify
|
start_websockify
|
||||||
|
|
||||||
# Monitor and restart dead processes
|
|
||||||
while true; do
|
while true; do
|
||||||
if ! pid_running "$xvfb_pid"; then
|
if ! pid_running "$xvfb_pid"; then
|
||||||
log "Xvfb exited; stopping desktop session"
|
log "Xvfb exited; stopping desktop session"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue