You are not logged in.
Hello
I have been using
xfce4-session-logout --halt
in a script in MXLinux to power off the computer. After reading about halt in other contexts, I wonder why this works! For example,
https://unix.stackexchange.com/question … f-and-halt
halt terminates all processes and shuts down the cpu. poweroff is exactly like halt, but it also turns off the unit itself (lights and everything on a PC).
Could someone explain exactly what the --halt switch means in xfce4-session-logout?
Thanks.
Last edited by Vincent17 (2018-11-21 02:08:17)
Offline
The second answer in your link gives a reference that puts it all in perspective, selected quote:
In the systemd toolset halt, poweroff, reboot, telinit, and shutdown are all symbolic links to /bin/systemctl. They are all backwards compatibility shims, that are simply shorthands for invoking systemd's primary command-line interface: systemctl. They all map to (and in fact are) that same single program. (By convention, the shell tells it which name it has been invoked by.)
It's all systemd now.
Offline
alcornoqui, thanks for your answer.
The reason for my original question was that the command, which powers off one computer, only halts another laptop, leaving power on. So I was curious how exactly xfce4-session-logout --halt works, and why there isn't a --poweroff option. I infer from your answer that it calls systemctl halt.
This computer runs MX Linux-i386, where
Systemd is included by default but not enabled. ... MX Linux uses systemd-shim, which emulates the systemd functions that are required to run the helpers without actually using the init service. (from MX users manual)
To achieve poweroff, I tried systemctl poweroff among many commands, but halt with power still on was nearly always the result. /sbin/poweroff -fih works most of the time In MX Linux, this command links to /sbin/halt -p, not to systemctl.
Last edited by Vincent17 (2019-01-30 01:03:08)
Offline
[ Generated in 0.007 seconds, 8 queries executed - Memory usage: 523.7 KiB (Peak: 524.54 KiB) ]