home · contact · privacy
Fix pulseaudio setting.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 30 Oct 2024 17:11:18 +0000 (18:11 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 30 Oct 2024 17:11:18 +0000 (18:11 +0100)
many_releases/etc/raspi/greetd/config.toml
many_releases/home/raspi/.config/pulse/default.pa [deleted file]
many_releases/home/raspi/startup.sh [new file with mode: 0755]
testing/scripts/setup_raspi.sh

index 9830be6268bf136963825e3619d716f7023ad01b..afbef593e2b769b788ffaa805f08e4cd7a0b82a0 100644 (file)
@@ -1,5 +1,5 @@
 [terminal]
 vt = 7 
 [default_session]
-command = "/usr/bin/sway"
+command = "/home/plom/startup.sh"
 user = "plom"
diff --git a/many_releases/home/raspi/.config/pulse/default.pa b/many_releases/home/raspi/.config/pulse/default.pa
deleted file mode 100644 (file)
index 0b25b91..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-.include /etc/pulse/default.pa
-set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
-set-sink-volume @DEFAULT_SINK@ 50%
diff --git a/many_releases/home/raspi/startup.sh b/many_releases/home/raspi/startup.sh
new file mode 100755 (executable)
index 0000000..bcbba4d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/sh
+# Iinitalize anything we want in our sessions opened by greetd.
+
+# Workaround to pulseaudio daemon somehow not respecting setting these with
+# ~/.config/pulse/default.pa – note that the first pactl call also seems
+# necessary, probably for forcing some init routines without which the pacmd
+# calls that follow won't work; TODO: find cleaner solutions 
+pactl list sinks > /dev/null
+pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
+pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 32768 
+
+# Wayland environment.
+/usr/bin/sway
index a4ff538dad4b672b5f9761bb62695ad5b01f0d40..0d21b1bcc960e36741639a062d648ea62eed4a3a 100755 (executable)
@@ -42,10 +42,12 @@ ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
 # so Sway won't complain about failing to access non-existant background image file
 sed -i '/^output \* bg/ s/^/#/' /etc/sway/config
 
-# Set up users and their environments.
+# Set up root environment.
 for root in "${PATH_MANY}" '..'; do
     copy_dirtree "${root}${PATH_REL_HOME}" '/root' all root
 done
+
+# Set up user and their environment.
 adduser --disabled-password --gecos "" "${USERNAME}" 
 usermod -a -G sudo "${USERNAME}" 
 for root in "${PATH_MANY}" '..'; do