Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions tools/include/branding/postinst/xmonad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ set +e
# overwrite stock lightdm greeter configuration
if [ -d /etc/armbian/lightdm ]; then cp -R /etc/armbian/lightdm /etc/; fi

# xmonad session is provided by gnome-session-flashback

# Disable Pulseaudio timer scheduling which does not work with sndhdmi driver
if [ -f /etc/pulse/default.pa ]; then sed "s/load-module module-udev-detect$/& tsched=0/g" -i /etc/pulse/default.pa; fi

# set wallpapper to armbian

# set wallpaper via feh
mkdir -p /etc/xmonad
cat > /etc/xmonad/wallpaper.sh <<- 'WALLEOF'
#!/bin/bash
feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg
WALLEOF
chmod +x /etc/xmonad/wallpaper.sh

# Let NetworkManager coexist with systemd-networkd
if command -v NetworkManager > /dev/null 2>&1; then
mkdir -p /etc/NetworkManager/conf.d
cat > /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf <<- NMEOF
[keyfile]
unmanaged-devices=type:ethernet
NMEOF
systemctl restart NetworkManager 2>/dev/null || true
fi
5 changes: 5 additions & 0 deletions tools/include/branding/skel/.xprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg &
xmobar &
nm-applet &
dunst &
Comment on lines +1 to +5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Scope this startup script to xmonad sessions only.

Because this file is copied globally via tools/modules/system/module_desktop.sh (Line 40-42), Lines 2-5 will run in non-xmonad sessions too. That can spawn unwanted processes and errors outside the intended desktop.

Proposed fix
 #!/bin/sh
-feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg &
-xmobar &
-nm-applet &
-dunst &
+case " ${DESKTOP_SESSION:-} ${XDG_CURRENT_DESKTOP:-} " in
+  *xmonad*|*"GNOME Flashback"*|*GNOME-Flashback*)
+    command -v feh >/dev/null 2>&1 && feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg &
+    command -v xmobar >/dev/null 2>&1 && xmobar &
+    command -v nm-applet >/dev/null 2>&1 && nm-applet &
+    command -v dunst >/dev/null 2>&1 && dunst &
+    ;;
+esac
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#!/bin/sh
feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg &
xmobar &
nm-applet &
dunst &
#!/bin/sh
case " ${DESKTOP_SESSION:-} ${XDG_CURRENT_DESKTOP:-} " in
*xmonad*|*"GNOME Flashback"*|*GNOME-Flashback*)
command -v feh >/dev/null 2>&1 && feh --bg-scale /usr/share/backgrounds/armbian/armbian03-Dre0x-Minum-dark-3840x2160.jpg &
command -v xmobar >/dev/null 2>&1 && xmobar &
command -v nm-applet >/dev/null 2>&1 && nm-applet &
command -v dunst >/dev/null 2>&1 && dunst &
;;
esac
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/include/branding/skel/.xprofile` around lines 1 - 5, Scope the startup
commands so they only run for xmonad sessions by wrapping the existing commands
(feh, xmobar, nm-applet, dunst) in a conditional that checks the session
environment (for example test if DESKTOP_SESSION or XDG_CURRENT_DESKTOP equals
"xmonad" or "Xmonad"); update the .xprofile snippet to only execute the four
background commands when the condition is true and otherwise do nothing,
referencing the existing command lines (feh --bg-scale ..., xmobar, nm-applet,
dunst) so you modify them in place.

7 changes: 5 additions & 2 deletions tools/modules/system/module_desktop_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,21 @@ function module_desktop_packages() {
)
;;
"${de[11]}")
# xmonad - Haskell tiling window manager
# xmonad - tiling WM via gnome-session-flashback
packages+=(
"xmonad"
"gnome-session-flashback"
"xmobar"
"lightdm"
"slick-greeter"
"xserver-xorg"
"xterm"
"xinit"
"dbus-x11"
"dmenu"
"dmz-cursor-theme"
"dunst"
"feh"
"fonts-ubuntu"
"lm-sensors"
Comment on lines +430 to 445
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

debian_releases=(bookworm trixie)
ubuntu_releases=(noble plucky)
pkgs=(gnome-session-flashback xinit dmz-cursor-theme fonts-ubuntu)

check_url() {
  local url="$1"
  if curl -fsI "$url" >/dev/null; then
    echo "OK   $url"
  else
    echo "MISS $url"
  fi
}

for rel in "${debian_releases[@]}"; do
  for pkg in "${pkgs[@]}"; do
    check_url "https://packages.debian.org/${rel}/${pkg}"
  done
done

for rel in "${ubuntu_releases[@]}"; do
  for pkg in "${pkgs[@]}"; do
    check_url "https://packages.ubuntu.com/${rel}/${pkg}"
  done
done

Repository: armbian/configng

Length of output: 943


🏁 Script executed:

# Check what releases are declared as supported in the module
grep -n "plucky\|noble\|trixie\|bookworm" tools/modules/system/module_desktop_packages.sh | head -20

Repository: armbian/configng

Length of output: 232


🏁 Script executed:

# View the full xmonad section and surrounding context to understand the configuration
sed -n '420,460p' tools/modules/system/module_desktop_packages.sh

Repository: armbian/configng

Length of output: 689


🏁 Script executed:

# Search for any conditional logic based on releases in the file
grep -n "RELEASE\|release\|ubuntu\|debian" tools/modules/system/module_desktop_packages.sh | grep -i "plucky\|noble" | head -10

Repository: armbian/configng

Length of output: 129


Ubuntu plucky missing xinit package will cause install-time failure for xmonad configuration.

The module declares Ubuntu plucky as a supported release (line 6), but the xmonad desktop environment requires xinit (line 437), which is unavailable in the plucky repository. This will cause installation to fail when users select xmonad on plucky systems.

Either:

  • Add conditional logic to exclude xinit on plucky and verify xmonad functions without it
  • Confirm plucky is not actually supported and remove it from the module's release list
  • Check if plucky will add xinit before release stabilization
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/modules/system/module_desktop_packages.sh` around lines 430 - 445, The
package list for the xmonad desktop (packages array in
module_desktop_packages.sh) includes "xinit", which is not available on Ubuntu
plucky and will break installs; update the code to handle plucky by either (a)
adding a conditional around the packages+=( ... "xinit" ... ) insertion so
"xinit" is omitted when the current release equals "plucky" (ensure xmonad still
works without it), or (b) remove "plucky" from the module's supported-release
list if plucky is not intended to be supported; reference the packages array,
the "xinit" entry, and the "xmonad" desktop selection when making the change.

"network-manager-gnome"
"pavucontrol"
Expand Down
Loading