The officially official Devuan Forum!

You are not logged in.

#1 2025-11-08 07:59:18

fredbird67
Member
Registered: 2025-08-28
Posts: 9  

[SOLVED] Can't suspend, reboot, or shut down in a WM

Due to political nonsense with Debian that I've had it up to here with, I'm making the switch from basing my distro, F3OS, a web-filtered  famy-friendly distro, on Debian to Devuan.  I've got the main edition, with Xfce, uploaded and ready to go.  But I'm hung up BAD on an even lighter version I'm trying to create that uses IceWM.

The problem is -- and this, BTW, is how it came from the Devuan repositories (no offense,  y'all) -- the IceWM preferences file does have the commands one needs for the reboot, shut down, and suspend logout menu entries -- FOR PEOPLE USING SYSTEMD. mad That, of course, ain't gonna do jack for us on Devuan.

Since Google ain't much help on this one, does anyone have any idea what the proper commands are for those of us in sysvinit-land that allow one to do all of the above without having to have administrative privileges in order to do so, for use in a menu?

Thanx in advance,
Fred in West Plains, MO

Last edited by fredbird67 (2025-11-08 19:09:22)

Offline

#2 2025-11-08 09:17:12

steve_v
Member
Registered: 2018-01-11
Posts: 540  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Depends... Power management tasks have always inherently required superuser privileges, so you'll need some mechanism to grant them.

Are you using elogind? If you are, loginctl takes much the same arguments as with systemd and the default config should allow this for any "active" login session.
Are you using upower + policykit + dbus? If so, you can call for power-management actions over dbus
Alternatively, you might add a policykit policy to allow an active user to call shutdown / pm-suspend & co. directly.
Otherwise, I guess there's always groups and sudo...

the IceWM preferences file does have the commands one needs for the reboot, shut down, and suspend logout menu entries -- FOR PEOPLE USING SYSTEMD.

Of course it does, shipping untested default configs still full of debian and systemd specific nonsense is apparently SOP.

Last edited by steve_v (2025-11-08 09:26:32)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#3 2025-11-08 10:29:19

rolfie
Member
Registered: 2017-11-25
Posts: 1,350  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Look around in the "Devuan Deriviates" section. Maybe there is a deriviate using IceWM already.

Online

#4 2025-11-08 13:46:02

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 419  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

searched and picked the first one that may/might fit the usage(no personal experience)

https://linuxiac.com/antix-23-systemd-free-linux-distro-released-based-on-debian-12/


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#5 2025-11-08 16:39:07

EDX-0
Member
Registered: 2020-12-12
Posts: 171  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

you can always give https://github.com/eylles/systemact a try, it is a "backend" for power menus, (a wrapper for systemctl and loginctl, anyone that wants consolekit support will have to help providing the equivalent commands) that uses yad to provide a confirmation and timeout dialog for every action except lock, it does the heavy lifting and is configurable to support custom logout and lock commands

all needed for icewm would be to make a local copy of the included power menu entry and replace the systemd commands with the corresponding systemact command.

Offline

#6 2025-11-08 19:12:14

fredbird67
Member
Registered: 2025-08-28
Posts: 9  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Well, I tried Dan's solution from a MiyoLinux IceWM respin he did back in 2020, including his logout menu.  I do, of course, have the logout command in the preferences menu set to point to that script, and I can run it from the terminal just fine.  BUT -- when I click "Logout" in the menu, all it does is just dump me back to the login screen without displaying the script.  What else could I be missing?

Offline

#7 2025-11-08 20:54:01

zapper
Member
Registered: 2017-05-29
Posts: 1,167  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

@fredbird67 First off, I recommend you use openrc + sysvinit rather than just pure sysvinit.

This will be much easier to handle. I have experience with this.

reboot and shutdown however are fairly easy for me.

if you know how to set up doas, you can shutdown by using:

doas poweroff
doas reboot

as for suspend, I am not sure how you would do that in devuan, without hardware keys. So... yeah lol, I draw a blank there.

If you set up doas properly though, you can just type those two commands in and it goes off immediately without requiring a password.

EDIT: If you want an easier way to shutdown though, qshutdown also works flawlessly.by hitting now on the menu and you will powerdown.

Last edited by zapper (2025-11-08 20:55:17)


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

#8 Yesterday 01:13:21

fredbird67
Member
Registered: 2025-08-28
Posts: 9  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

In all honesty, I'm very tempted to just replace IceWM with Openbox over this one...this one's REALLY ticking me off...gonna see if I can get Openbox to do my bidding here...

Offline

#9 Yesterday 01:54:31

steve_v
Member
Registered: 2018-01-11
Posts: 540  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

I recommend you use openrc + sysvinit rather than just pure sysvinit.

Choice of init/rc makes very little difference to shutdown/reboot invocation, and none at all to suspend (unless you have some init scripts wired up to suspend/resume hooks ofc).

as for suspend, I am not sure how you would do that in devuan, without hardware keys.

Suspend / hibernation has nothing to do with "hardware keys", beside the latter often being assigned to trigger such through ACPI button events.

Actually suspending the system is kernel functionality (usually with firmware help for bootstrapping a suspended system), with optional high-level interfaces (pm-utils etc.).
Those can be called however you like, be it a dedicated (i.e. pre-assigned) "hardware" key, remapping a "hardware" key with acpid, a custom key combination in X / whatever DE you use (I like meta+s), or a script / menu / whatever.

You'd set those up the same way as you ever would when writing to sysfs or running any other priveliged command. Sudo / doas / groups / suid / polkit / logind are all a matter of taste for giving normal users permission.

---

In general, I'd suggest [e]logind as  being the most convenient / compatible. I don't see any real reason for not wanting a login/seat manager of some kind on a primarily desktop/GUI setup, and it's also the easiest way to get X running as not-root (i.e. providing dynamic permissions for the nodes in /dev/ X needs)...
Unless of course you're going for knee-jerk "but it comes from systemd, no way" idological nonsense or hair-shirt level "minimalisim", in which case figuring out how you want to do seat management and permissions is up to you.

Last edited by steve_v (Yesterday 02:23:21)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#10 Yesterday 02:22:21

EDX-0
Member
Registered: 2020-12-12
Posts: 171  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

again, the repo i posted is the script i use on my machine, it works nicely for sysvinit + elogind.

Offline

#11 Yesterday 18:26:27

fanderal
Member
Registered: 2017-01-14
Posts: 105  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Got curious about IceWM and installed it. As fredbird67 posted, shutdown and reboot didn't work. In /usr/share/icewm/README:

The directory /etc/X11/icewm used to contain copies of default configuration files shipped with the icewm package. The original files were and are located in /usr/share/icewm/ directory. This was considered service to the users but it has also led to confusion and made package handling more complicated.

Therefore, the default configuration files are now only located in
/usr/share/icewm/ directory. To customize something for all system users, the system administrator shall copy the particular file to /etc/X11/icewm when needed, and icewm will automatically make use of that copy. Regular users can do the same, installing their version into ~/.icewm/.

As root, I copied the menu and preferences files from /usr/share/icewm to /etc/X11/icewm and edited these two lines in preferences:

#  Command to reboot the system.
From
# RebootCommand="test -e /run/systemd/system && systemctl reboot || sudo -n /sbin/reboot"
To
RebootCommand="sudo shutdown -r now"

and 

#  Command to shutdown the system.
From
# ShutdownCommand="test -e /run/systemd/system && systemctl poweroff || sudo -n /sbin/poweroff"
To
ShutdownCommand="sudo shutdown -h now"

NOPASSWORD lines for reboot and shutdown were already in /etc/sudoers so those two cmds in IceWM's menu worked. Same results had ~/.icewm been created with the edited preferences file. My system isn't set up for hibernate but when the line for it in preferences is edited, it should work.

Offline

#12 Yesterday 19:34:31

NakedRider
Member
Registered: 2025-02-01
Posts: 7  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Have you tried antiX? This is a Debian based very lightweight distro that's extremely fast. It has a bunch of WM's including ICEWM and fluxbox.

You can shutdown or reboot with ease. It's got a very well developed version of ICE.

It's still based on Bookworm but it has an outstanding GUI for package management - far better than synaptic it's the same one used by MX Linux.

Last edited by NakedRider (Yesterday 19:38:33)

Offline

#13 Today 01:45:36

zapper
Member
Registered: 2017-05-29
Posts: 1,167  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Choice of init/rc makes very little difference to shutdown/reboot invocation, and none at all to suspend (unless you have some init scripts wired up to suspend/resume hooks ofc).

I was speaking in general probably. I don't know how to do any services with regular sysvinit. So there's that

Unless of course you're going for knee-jerk "but it comes from systemd, no way" idological nonsense or hair-shirt level "minimalisim", in which case figuring out how you want to do seat management and permissions is up to you.

Does this work without root permissions? Also I wonder to myself if elogind has root permissions built in. Not saying one way or the other though. Because I have no clue.

If so, curious.. But doas is still easier than sudo in my experience. Can't say anything about elogind tho

the doas method isn't hard though and is easier than the sudo one if anyone hasn't used sudo's method which I never have due to there being so much clutter in it.

I couldn't figure out how to do stuff the way doas does in sudo

But yeah, etlogind probably is easier, although I have never used that method.

Last edited by zapper (Today 01:46:58)


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

#14 Today 03:17:26

fredbird67
Member
Registered: 2025-08-28
Posts: 9  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

I finally got it to reboot and shut down, y'all! big_smile

I finally did it by installing elogind.  Doing further research, I found that there's also something else I had to do -- run the following command after installing the base Devuan CD:

sudo update-rc.d elogind defaults

I then changed the commands in the IceWM preferences file for rebooting and shutting down to loginctl reboot, loginctl suspend, and loginctl poweroff, which still didn't work.  I then checked later, and found that I forgot to uncomment them. LOL

But once I discovered that oversight on my part about the uncommenting, I tried them again, AND THEY WORKED!!!

Thanx, y'all!

Now, to FINALLY get around to customizing it to my specifications and make the public announcement of the new release later this week.  I'm PUMPED! big_smile

Offline

#15 Today 04:08:49

steve_v
Member
Registered: 2018-01-11
Posts: 540  

Re: [SOLVED] Can't suspend, reboot, or shut down in a WM

Does this work without root permissions?

Logind manages resources for interactive logins/physical "seats", and replaces the likes of consolekit for managing access to devices and executing privileged tasks on behalf of the user.
So yes, you can ask logind to do things like shut down the machine without sudo/being root - so long as logind knows you are logged in to a physical session ("seat"). You can do the same over e.g. ssh, but in that case it will ask you to authenticate.


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

Board footer