Control: retitle -1 Extend haltbt functionality to work standalone Control: severity -1 wishlist
I'm using raspberry pi 4 with fresh installation of raspbian buster.
When I start x2goclient with --haltbt the shutdown button is doing nothing when I clicked 100 times? Please let me know how many times should I click for the button to works?
The button works like expected. You're just hold it wrong.
No, seriously, the halt button does exactly what it's supposed to do, you just misinterpreted what it does. What the button really does is creating a single file. This file is then interpreted and acted upon by the other scripts within a thinclient environment.
However, I believe you're not using a thinclient environment. In that case, yes, the halt button will do nothing useful to you.
I'm changing this issue report into a wishlist bug, because it might make sense to extend the scope of this button to work in non-TCE modes.
This said, the amount of work required for this is huge, so I probably won't implement it. Essentially, we'd have to figure out whether we're running inside of a TCE or not (which is very difficult on its own, since we now have TCEs with full desktop environment like the MATE Minidesktop variant that are not easily distinguished from non-TCE environments) and actually initiating a system shutdown is crazy difficult. Since a normal user can't do that (for obvious reasons), each desktop environment pretty much has its own way of talking to a daemon running with higher privileges (usually via dbus) that checks whether the user is allowed to cause a system shutdown or not and executes the action if needed. I'm not even sure if there is a standard way of doing so.
Mihai
Am 25.01.20 um 18:02 schrieb Mihai Moldovan:
Actually, we could create a new package and set it as "recommends" or "suggests" on the x2goclient / x2gothinclient package.
The script we use to shutdown the system in the thinclient environment is rather simple: <https://code.x2go.org/gitweb?p=live-build-x2go.git;a=blob;f=config/includes.chroot/lib/live/config/2800-x2go-powerbuttonmonitor;h=cb8d29cf9e1c5cfbed00e8a842f0d1aff0c2fe24;hb=refs/heads/feature/openbox-magic-pixel-workaround-stretch>
The poweroff can be performed faster with the first sequence, but should not be done that way when there are rw-mounted filesystems under /dev, that's what the if/else is for.
In its current form, the script has a hardcoded user homedirectory of /home/user/, but expanding that to check a list of users or all homedirs under /home should not be hard.
However, on systems where /home/ is on a persistent storage device and not a ramdisk (as in the thinclient environment), the .halt file needs to be deleted before executing the shutdown. That's currently missing.
-Stefan
-- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243