install.sh
Files / xps-14-webcam / install.sh
Files in xps-14-webcam/
Directoryxps-14-webcam/
- 51-camera-relay.conf 463 bytes
- camera-relay.desktop 217 bytes
- camera-relay.service 869 bytes
- camera-relay.sh 661 bytes
- install.sh 2.4 KB
- LICENSE 1.0 KB
- ov08x40.yaml 628 bytes
- setup-root.sh 1.6 KB
From The webcam on a Dell XPS 14 (Panther Lake) under Kubuntu 26.04. MIT licence: LICENSE.
#!/usr/bin/env bash# User part of the built-in camera setup: relay service, toggle, KDE launcher,# WirePlumber rules, Edge launcher with PipeWire camera. Run setup-root.sh first.# Safe to re-run. Usage: bash install.shset -uo pipefailhere=$(cd "$(dirname "$0")" && pwd)ok() { echo "๐ข $*"; }fail() { echo "๐ด $*"; echo; echo "๐ด FAILED"; exit 1; }
command -v gst-launch-1.0 >/dev/null || fail "gst-launch-1.0 missing: run setup-root.sh first"gst-inspect-1.0 pipewiresink >/dev/null 2>&1 || fail "pipewiresink missing: run setup-root.sh first"[ -e /sys/bus/i2c/drivers/ov08x40/i2c-OVTI08F4:00 ] || fail "ov08x40 sensor not bound: run setup-root.sh, then reboot"
echo "๐ฑ Installing files"install -Dm644 "$here/camera-relay.service" ~/.config/systemd/user/camera-relay.serviceinstall -Dm644 "$here/ov08x40.yaml" ~/.config/camera-relay/ov08x40.yamlinstall -Dm644 "$here/51-camera-relay.conf" ~/.config/wireplumber/wireplumber.conf.d/51-camera-relay.confinstall -Dm755 "$here/camera-relay.sh" ~/.local/bin/camera-relaymkdir -p ~/.local/share/applicationssed "s#^Exec=camera-relay#Exec=$HOME/.local/bin/camera-relay#" "$here/camera-relay.desktop" > ~/.local/share/applications/camera-relay.desktopok "Relay service, tuning file, WirePlumber rules, ~/.local/bin/camera-relay, KDE launcher"
edge=/usr/share/applications/microsoft-edge.desktopif [ -f "$edge" ]; then sed -E 's#^Exec=/usr/bin/microsoft-edge-stable#Exec=/usr/bin/microsoft-edge-stable --enable-features=WebRtcPipeWireCamera#' \ "$edge" > ~/.local/share/applications/microsoft-edge.desktop ok "Edge launcher override with --enable-features=WebRtcPipeWireCamera"else echo "๐ Edge not installed, skipped its launcher override"fi
systemctl --user daemon-reload || fail "systemctl --user daemon-reload failed"kbuildsycoca6 >/dev/null 2>&1 || trueok "systemd and KDE menu reloaded"
if wpctl status 2>/dev/null | grep -q '\[libcamera\]'; then systemctl --user restart wireplumber && sleep 3 ok "WirePlumber restarted (libcamera camera removed from PipeWire)"fiwpctl status | grep -q '\[libcamera\]' && fail "PipeWire still has the libcamera camera (it crashes PipeWire)"ok "PipeWire's libcamera camera is off"
echoecho "๐ข SUCCESS"echo "๐ชต Turn the camera on with: camera-relay start (or KDE menu: Camera Relay (on/off))"echo "๐ชต Brave: enable brave://flags/#enable-webrtc-pipewire-camera by hand (no launcher override)"Text, photos and drawings: CC BY 4.0. Code: MIT. Share and adapt them, crediting HomeLab Series (blog.jacq.cc). Licence and terms of use ยทPrivacy policy (no cookies, no tracking)