SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
what are the ways to suspend my laptop when running X11 with fluxbox on slackware64-15.0 ?
i don't want to use sudo or install third-party stuff.
currently moving from non-root user desktop to tty3/root, then
Code:
loginctl suspend
kde5 w/ plasma does that nicely because it's a full desktop manager i guess.
Hello,
what are the ways to suspend my laptop when running X11 with fluxbox on slackware64-15.0 ?
i don't want to use sudo or install third-party stuff.
currently moving from non-root user desktop to tty3/root, then
Code:
loginctl suspend
kde5 w/ plasma does that nicely because it's a full desktop manager i guess.
That Fluxbox is so old that when it was invented, that there was no suspend yet.
It's like living in a cottage in the middle of forest, and wondering why you do not have hot water.
Yes, certainly living rustically has it's down sides. It's not like living in New York. So, no hot water for you!
ok, fluxbox wasn't build with suspend in mind you say, noted.
fluxbox stability has a lot of value and it's only 22 years old.
Code:
XF86LaunchA :Exec loginctl suspend < -- not working
XF86PowerOff :Exec dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend < -- dead after elogind was adopted ?
what i fail to understand is the implication of the elogind into things like suspend in fluxbox : no more suspend for non-root user ?
: )
Quote:
Originally Posted by LuckyCyborg
Yes, certainly living rustically has it's down sides.
strongly disagree, living rustically, within one's means, is way better that the the tyranny of modernity (collapsing before our eyes)
admitting i smiled at your reply given the rigid top-down idea of frugality in this country.
Isn't loginctl a user thing as well ?
Is your user a member of the default groups ?
For what it worths, config files are under /etc with defaults commented out. If needed I'll look in my machine this evening to see how my user script handles this in my i3wm setup.
ok, fluxbox wasn't build with suspend in mind you say, noted.
fluxbox stability has a lot of value and it's only 22 years old.
Code:
XF86LaunchA :Exec loginctl suspend < -- not working
XF86PowerOff :Exec dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend < -- dead after elogind was adopted ?
Right
IIRC these features were part of pm-utils, which was removed when elogind was introduced
But, loginctl suspend should work as long as your user is in the "power" group
Isn't loginctl a user thing as well ?
Is your user a member of the default groups ?
indeed, user can run "loginctl suspend" but it does nothing ? i looked that way some months ago but couldn't suspend as a non-root user.
here are the groups guys.
Code:
users lp wheel floppy audio video cdrom plugdev power netdev scanner
merci
Last edited by _peter; 09-03-2022 at 06:29 AM.
Reason: month(s)
This happens because the xinitrc.kde file that launches plasma uses dbus-launch to start the session, thus setting all the required dbus variables, while the xinitrc.fluxbox file only checks for the old consolekit2 (ck). You could try modifying the xinitrc.fluxbox file putting something like
I have Slackware 15.0 32bit full install less xfce4 and kde on a core duo Thinkpad X60. I've set inittab 4 so boots into the xde login. The last stanza of the .xsession file written by xwmconfig when I chose fluxbox is like this...
Code:
# Start the window manager:
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session /usr/bin/startfluxbox
else
exec /usr/bin/startfluxbox
fi
The /usr/bin/ck-launch-session file does not exist on Slackware 15.0. but /usr/bin/dbus-run-session does exist. The startfluxbox script itself includes
Code:
# Start DBUS session bus:
if [ -z "\$DBUS_SESSION_BUS_ADDRESS" ]; then
eval \$(dbus-launch --sh-syntax --exit-with-session)
fi
My user belongs to the following groups (default set from adduser I think, not sure). As you can see my user is in the power group.
Code:
bash-5.1$ groups
users lp floppy audio video cdrom input plugdev power netdev scanner
And the loginctl suspend command just works when issued as user, as does the loginctl shutdown. I don't use hibernate to disk as I have a smallish SSD in this machine.
files&settings are as you described at my end keithpeter.
what do you mean by xde login ?
here it's init 4 with sddm then from the login window:
- X11 for fluxbox
- Plasma for kde.
how many lines in your /usr/bin/startfluxbox 69 ? with #!/bin/sh in line 1 and 36 ?
can't get loginctl suspend top work under Plasma with a non-root user belonging to the power group.
files&settings are as you described at my end keithpeter.
what do you mean by xde login ?
Er - I meant xdm, the graphical login program, apologies for typo.
As the Thinkpad X60 does not have kde/plasma or xfce4 on it, when you set the option to run level 4 in /etc/inittab, you get the very plain xdm graphical login.
Quote:
Originally Posted by _peter
here it's init 4 with sddm then from the login window:
- X11 for fluxbox
- Plasma for kde.
On my X220 Thinkpad, I have a full install of 15.0 64 bit. I can suspend using loginctl suspend from a konsole window within the KDE/plasma session. I don't have an entry for fluxbox in the graphical login screen that comes with kde - I take it that is sddm.
Then I ran xwmconfig within konsole and set the window manager to fluxbox, then logged out and selected 'xsession default' from the list of options. I got fluxbox, and I could suspend using loginctl suspend from an xterm window.
Finally, I exited from fluxbox, and set the session back to plasma X11 without changing xwmconfig. And I got kde/plasma and loginctl suspend still works.
Quote:
Originally Posted by _peter
how many lines in your /usr/bin/startfluxbox 69 ? with #!/bin/sh in line 1 and 36 ?
Yes, on both machines here 69 lines total, first line is #!/bin/sh and line 36 is also #!/bin/sh.
Quote:
Originally Posted by _peter
can't get loginctl suspend top work under Plasma with a non-root user belonging to the power group.
Works here on both a full slackware64 15.0 install with KDE and on the Slackware 32 bit with fluxbox only, no plasma or xfce.
Both these old laptops have intel integrated graphics and suspend on lid close 'just works' on both. The X220 is booting in legacy bios (the X60 only has a bios of course). On both machines the kernel suspend variables show this...
Code:
bash-5.1$ cat /sys/power/state
freeze mem disk
bash-5.1$ cat /sys/power/mem_sleep
s2idle [deep]
Not sure where to go from here but my X220 has a complete fresh 15.0 install that was updated today if anyone can think of any other possible differences to explore. I'll look in tomorrow UK am.
Then I ran xwmconfig within konsole and set the window manager to fluxbox, then logged out and selected 'xsession default' from the list of options.
Finally, I exited from fluxbox, and set the session back to plasma X11 without changing xwmconfig.
yes and yes for the for step by step.
Code:
$cat /sys//power/state
freeze mem disk
$cat /sys//power/mem_sleep
s2idle [deep]
at this stage it's my setup that is suspicious as it works elsewhere with native kde/plasma and xsession default. will try to re-install Slackware on another drive.
Fluxbox's age is irrelevant, but Fluxbox's flexibility is very relevant.
You can try finding the correct command line command for suspend and add it to the Fluxbox menu. I did it once a long time ago. I think it's pm-suspend. Like I said, it's been a while and I can't remember whether I needed something like gksu to make it work.
With SystemD, I believe that the command is systemctl suspend.
Alternatively, you can simply issue the command from the console.
Last edited by frankbell; 09-03-2022 at 09:01 PM.
Reason: Correct a boo-boo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.