|

hammerhead-desktop 1.6.0: Openbox menu Shutdown/Reboot entries

hammerhead-desktop 1.6.0: Openbox menu Shutdown/Reboot entries

Add "Shutdown" (pfexec /sbin/zygctl poweroff) and "Reboot"
(pfexec /sbin/zygctl reboot) items to the Openbox root menu, above
Log Out / Exit, each with an Openbox confirm <prompt> so a stray click
cannot power off the machine. Privilege comes from the base RBAC profile
"Hammerhead Power Management" (hammerhead repo rootfs). Bump 1.5.0->1.6.0.
Author: Chris Tusa <chris.tusa@leafscale.com>
Date: Jul 24, 2026 13:49
Changeset: 1b5aaf6e10b54c8e0d82ef2b1e897a218bdfc8c0
Branch: default

Diff

diff -r 1aff37681e83 -r 1b5aaf6e10b5 base/hammerhead-desktop/menu.xml
--- a/base/hammerhead-desktop/menu.xml	Fri Jul 24 13:34:37 2026 -0500
+++ b/base/hammerhead-desktop/menu.xml	Fri Jul 24 13:49:05 2026 -0500
@@ -65,6 +65,25 @@
 
     <separator/>
 
+    <!-- Power management. zygctl talks to the root-owned zyginit socket, so
+         it needs root privilege; the desktop runs as zygaena (uid 1000).
+         pfexec elevates via the "Hammerhead Power Management" RBAC profile
+         (base config: rootfs/etc/security/{prof,exec}_attr.d/hammerhead +
+         rootfs/etc/user_attr.d/hammerhead). Each has an Openbox confirm
+         <prompt> so a stray click can't power off the machine. -->
+    <item label="Reboot">
+      <action name="Execute">
+        <command>pfexec /sbin/zygctl reboot</command>
+        <prompt>Reboot the system?</prompt>
+      </action>
+    </item>
+    <item label="Shutdown">
+      <action name="Execute">
+        <command>pfexec /sbin/zygctl poweroff</command>
+        <prompt>Shut down the system?</prompt>
+      </action>
+    </item>
+
     <item label="Log Out / Exit">
       <action name="Exit">
         <prompt>yes</prompt>
diff -r 1aff37681e83 -r 1b5aaf6e10b5 base/hammerhead-desktop/package.toml
--- a/base/hammerhead-desktop/package.toml	Fri Jul 24 13:34:37 2026 -0500
+++ b/base/hammerhead-desktop/package.toml	Fri Jul 24 13:49:05 2026 -0500
@@ -7,9 +7,9 @@
 
 [package]
 name = "hammerhead-desktop"
-version = "1.5.0"
+version = "1.6.0"
 release = 1
-description = "Zygaena marine-dark desktop branding: wallpaper, Openbox theme, tint2/conky configs, categorized menu w/ CBPP-style Places/Recent pipemenus, autostart"
+description = "Zygaena marine-dark desktop branding: wallpaper, Openbox theme, tint2/conky configs, categorized menu w/ CBPP-style Places/Recent pipemenus + Shutdown/Reboot (pfexec zygctl), autostart"
 url = "https://git.sharkos.one/zygaena/hammerhead"
 license = "CDDL-1.0"
 maintainer = "Chris Tusa <chris.tusa@leafscale.com>"