Add MATE desktop support with branding and menu - #810
#810Conversation
- Remove Cinnamon applets and Nemo settings from dconf (copy-paste error) - Add proper MATE-only dconf settings (background, terminal, WM, power) - Add fonts-ubuntu, dmz-cursor-theme, gtk2-engines, evince, network-manager-gnome, libpam-gnome-keyring - Add NM coexistence with systemd-networkd - Remove gdebi, add armhf/riscv64 architectures
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughAdds MATE desktop support and related packaging/configuration: updates MATE post-install to remove large dconf dumps, keep a narrowed Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tools/include/branding/postinst/mate.sh`:
- Around line 65-101: The preset currently replaces the whole panel layout
(object-id-list and single toplevel 'top'), removing the
bottom/workspace/window-list panel; instead keep an explicit bottom toplevel and
only remove the broken applets: update object-id-list to include the window-list
and workspace-switcher IDs, add a [org/mate/panel/toplevels/bottom] stanza
(orientation/bottom, size) and corresponding
[org/mate/panel/objects/window-list] and
[org/mate/panel/objects/workspace-switcher] entries (locked,
toplevel-id='bottom', positions) so fresh MATE profiles retain the bottom panel
while you still omit the broken applet object sections (e.g.,
NotificationAreaApplet/Clock/ShowDesktop) rather than dropping the entire second
panel.
- Around line 108-111: The loop that deletes each user's ~/.config/dconf/user
must not be used because it wipes all GSettings for existing accounts; remove
the for ... rm -f "$home/.config/dconf/user" code and instead implement one of
two safe approaches: (A) set MATE/Caja-specific defaults via system dconf
profiles and keyfiles (create/update entries under /etc/dconf/db/* and run dconf
update) so new-user defaults apply without touching existing user files, or (B)
if you must modify existing accounts, iterate users and run dconf write/reset
only for the specific MATE/Caja keys needed using the dconf CLI (e.g., dconf
reset -f /org/mate/... or dconf write /org/mate/... for targeted keys) rather
than deleting the entire $home/.config/dconf/user file; replace references to
the removed rm line with the chosen safe method.
- Around line 136-144: The script currently unconditionally writes an NM
override which can disable NetworkManager-managed ethernet; instead source the
runtime variables (e.g. run set_runtime_variables.sh) and check the
NETWORK_RENDERER variable, and only create
/etc/NetworkManager/conf.d/10-armbian-unmanaged.conf and restart NetworkManager
when NETWORK_RENDERER indicates systemd-networkd is the active renderer (match
the exact value provided by set_runtime_variables.sh, e.g. "systemd-networkd");
leave the existing NetworkManager logic (command -v NetworkManager) intact but
gate the unmanaged-devices write behind that NETWORK_RENDERER check.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9fba0c33-f241-48a8-9571-6af8a895775d
📒 Files selected for processing (8)
tools/include/branding/postinst/mate.shtools/include/branding/skel/.local/share/applications/mate-color-select.desktoptools/include/branding/skel/.local/share/applications/mate-terminal.desktoptools/include/markdown/Desktops-header.mdtools/include/markdown/MATE01-footer.mdtools/include/markdown/MATE01-header.mdtools/json/config.system.jsontools/modules/system/module_desktop_packages.sh
There was a problem hiding this comment.
♻️ Duplicate comments (1)
tools/include/branding/postinst/mate.sh (1)
154-162:⚠️ Potential issue | 🟠 MajorGate unmanaged ethernet override on the active renderer.
Line 155 still applies
unmanaged-devices=type:ethernetwhenever NetworkManager exists. That can break wired networking when NetworkManager is the active renderer. Please guard this block withNETWORK_RENDERER=="systemd-networkd".Proposed patch
-# Let NetworkManager coexist with systemd-networkd -if command -v NetworkManager > /dev/null 2>&1; then +# Let NetworkManager coexist with systemd-networkd +if command -v NetworkManager > /dev/null 2>&1 && [ "${NETWORK_RENDERER:-}" = "systemd-networkd" ]; 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 fiBased on learnings:
set_runtime_variables.shestablishesNETWORK_RENDERER, and independent modules must match that runtime variable exactly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/include/branding/postinst/mate.sh` around lines 154 - 162, The script currently unconditionally writes an unmanaged-devices override when NetworkManager exists, which can break wired networking if NetworkManager is the active renderer; modify the block that creates /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf so it first sources or checks the runtime NETWORK_RENDERER variable (as set by set_runtime_variables.sh) and only applies the override when NETWORK_RENDERER == "systemd-networkd"; locate the conditional that uses command -v NetworkManager and add a guard testing NETWORK_RENDERER for equality to "systemd-networkd" before creating the conf file and restarting NetworkManager.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@tools/include/branding/postinst/mate.sh`:
- Around line 154-162: The script currently unconditionally writes an
unmanaged-devices override when NetworkManager exists, which can break wired
networking if NetworkManager is the active renderer; modify the block that
creates /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf so it first sources
or checks the runtime NETWORK_RENDERER variable (as set by
set_runtime_variables.sh) and only applies the override when NETWORK_RENDERER ==
"systemd-networkd"; locate the conditional that uses command -v NetworkManager
and add a guard testing NETWORK_RENDERER for equality to "systemd-networkd"
before creating the conf file and restarting NetworkManager.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 09b4a8e9-1b42-4409-bc1e-7ab8f8c4b645
📒 Files selected for processing (1)
tools/include/branding/postinst/mate.sh
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
tools/include/branding/postinst/cinnamon.sh (1)
135-143:⚠️ Potential issue | 🟠 MajorMirror the same stale-config cleanup here.
At Line 135, this block has the same upgrade-path issue: existing
/etc/NetworkManager/conf.d/10-armbian-unmanaged.confis not removed whensystemd-networkdis inactive, so Ethernet can remain unmanaged unintentionally.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/include/branding/postinst/cinnamon.sh` around lines 135 - 143, The NetworkManager block in cinnamon.sh leaves a stale /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd becomes inactive, so update the logic around the command -v NetworkManager / systemctl is-active --quiet systemd-networkd check to remove the file when systemd-networkd is not active (mirror the existing stale-config cleanup elsewhere); specifically, ensure the script either deletes /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd is inactive or conditionally creates it only when active, and restart NetworkManager via systemctl restart NetworkManager || true after making that change (reference the 10-armbian-unmanaged.conf path, the NetworkManager check, and the systemctl is-active --quiet systemd-networkd call).tools/include/branding/postinst/gnome.sh (1)
42-50:⚠️ Potential issue | 🟠 MajorClean up stale NM override when
systemd-networkdis inactive.At Line 42, the new guard prevents new writes, but existing
/etc/NetworkManager/conf.d/10-armbian-unmanaged.confis never removed on upgrade paths. That can keep Ethernet unmanaged after networkd is no longer active.Proposed fix
# Let NetworkManager coexist with systemd-networkd (only if networkd is active) if command -v NetworkManager > /dev/null 2>&1 && systemctl is-active --quiet systemd-networkd 2>/dev/null; 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 +else + if [ -f /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf ]; then + rm -f /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf + systemctl is-active --quiet NetworkManager 2>/dev/null && systemctl restart NetworkManager 2>/dev/null || true + fi fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/include/branding/postinst/gnome.sh` around lines 42 - 50, The current guard only creates /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd is active but never removes it when networkd becomes inactive, leaving Ethernet permanently unmanaged; update the logic in gnome.sh around the systemctl is-active check so that if systemd-networkd is inactive and the file /etc/NetworkManager/conf.d/10-armbian-unmanaged.conf exists you remove that file (and then restart NetworkManager), otherwise keep the existing creation path when systemd-networkd is active; ensure removals ignore errors (e.g., rm -f) and always attempt to restart NetworkManager after creating or removing the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/MATE01.conf`:
- Around line 5-9: The test currently uses set -e so a failing
./bin/armbian-config --api module_desktop install de=mate will prevent the
subsequent remove call; add an EXIT trap inside the testcase() subshell (after
set -e and before the install command) that always runs ./bin/armbian-config
--api module_desktop remove de=mate to guarantee cleanup even on failure. Use
the trap with the EXIT signal inside the subshell so the remove runs when the
subshell exits, and keep the trap target exactly the remove invocation shown in
the diff.
In `@tools/modules/system/module_appimage.sh`:
- Around line 78-81: The script currently may resolve fusermount to an empty
path (variable fmount) and later re-run a lookup that can embed an empty
FUSERMOUNT_PROG into the generated Exec, breaking AppImage startup; fix by
resolving fusermount once into the local variable fmount, validate that fmount
is non-empty before writing to /etc/environment or embedding into any Exec
lines, and reuse that same fmount value later instead of performing a second
lookup (ensure any code that references FUSERMOUNT_PROG reads from the resolved
variable fmount and, if empty, either skip writing/embedding or fail with a
clear message).
- Around line 71-73: The pkg_install call that ensures FUSE support
("pkg_install libfuse2 fuse3") must be checked and the script should fail fast
if installation fails; update the AppImage FUSE block to capture the exit status
of pkg_install (the invocation in the "ensure FUSE support for AppImages"
block), log an error describing the failure, and exit with a non‑zero status (or
return non‑zero) instead of continuing to create the launcher when
libfuse2/fuse3 installation fails.
---
Outside diff comments:
In `@tools/include/branding/postinst/cinnamon.sh`:
- Around line 135-143: The NetworkManager block in cinnamon.sh leaves a stale
/etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd
becomes inactive, so update the logic around the command -v NetworkManager /
systemctl is-active --quiet systemd-networkd check to remove the file when
systemd-networkd is not active (mirror the existing stale-config cleanup
elsewhere); specifically, ensure the script either deletes
/etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd is
inactive or conditionally creates it only when active, and restart
NetworkManager via systemctl restart NetworkManager || true after making that
change (reference the 10-armbian-unmanaged.conf path, the NetworkManager check,
and the systemctl is-active --quiet systemd-networkd call).
In `@tools/include/branding/postinst/gnome.sh`:
- Around line 42-50: The current guard only creates
/etc/NetworkManager/conf.d/10-armbian-unmanaged.conf when systemd-networkd is
active but never removes it when networkd becomes inactive, leaving Ethernet
permanently unmanaged; update the logic in gnome.sh around the systemctl
is-active check so that if systemd-networkd is inactive and the file
/etc/NetworkManager/conf.d/10-armbian-unmanaged.conf exists you remove that file
(and then restart NetworkManager), otherwise keep the existing creation path
when systemd-networkd is active; ensure removals ignore errors (e.g., rm -f) and
always attempt to restart NetworkManager after creating or removing the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ecbe0d8e-d3d0-4795-8efb-3cd22ff2708b
📒 Files selected for processing (10)
tests/CINM01.conftests/GNME01.conftests/MATE01.conftests/XFCE01.conftests/gnome_desktop.conftests/xfce_desktop.conftools/include/branding/postinst/cinnamon.shtools/include/branding/postinst/gnome.shtools/include/branding/postinst/mate.shtools/modules/system/module_appimage.sh
💤 Files with no reviewable changes (5)
- tests/CINM01.conf
- tests/GNME01.conf
- tests/XFCE01.conf
- tests/xfce_desktop.conf
- tests/gnome_desktop.conf
🚧 Files skipped from review as they are similar to previous changes (1)
- tools/include/branding/postinst/mate.sh
Summary
Test plan