X2Go Bug report logs - #1431
Extend haltbt functionality to work standalone

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Erik Erik <embracetheunknown@live.com>

Date: Sat, 11 Jan 2020 14:55:02 UTC

Severity: wishlist

Merged with 1430

Found in version 4.1.2.1-4

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1431: Haltbt is useless...
Reply-To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1431@bugs.x2go.org
Resent-From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Mon, 27 Jan 2020 08:55:01 +0000
Resent-Message-ID: <handler.1431.B1431.158011525214767@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1431
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: 
References: <PS2PR06MB34140F8530C447E6FC6AD2FBCD3B0@PS2PR06MB3414.apcprd06.prod.outlook.com> <c1508caf-19d3-377e-7aa9-87d3dd500848@ionic.de> <PS2PR06MB34140F8530C447E6FC6AD2FBCD3B0@PS2PR06MB3414.apcprd06.prod.outlook.com>
Received: via spool by 1431-submit@bugs.x2go.org id=B1431.158011525214767
          (code B ref 1431); Mon, 27 Jan 2020 08:55:01 +0000
Received: (at 1431) by bugs.x2go.org; 27 Jan 2020 08:54:12 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2,
	SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no
	version=3.4.2
Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 3953F5DAE5
	for <1431@bugs.x2go.org>; Mon, 27 Jan 2020 09:54:09 +0100 (CET)
Received: from [192.168.0.14] ([78.43.58.112]) by mrelayeu.kundenserver.de
 (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id
 1McpaE-1jUVxc1xVS-00a0fz; Mon, 27 Jan 2020 09:54:06 +0100
To: Mihai Moldovan <ionic@ionic.de>, 1431@bugs.x2go.org
Cc: Erik Erik <embracetheunknown@live.com>
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Autocrypt: addr=X2Go-ML-1@baur-itcs.de; prefer-encrypt=mutual; keydata=
 xsBNBFLfOiwBCACzIiDVwWVRvuMzgSAvXRFRaPaZOSB8s84PG1oGLfmqhwzF44vj1Xv4tcKD
 mvu0TsLTksOkvop8WwGYeeU8lDaxEG1zyN8SOu1WU/FPEKw2jITRox8yIrSkUsMkWYuxdjv/
 9XcAh9qaPsHP7E1jD6/wVZuYZkuX6W41Nxt06VsvDGCfrbQh4ya7w1IiSnoQeIHNNQVN9f3j
 xcHLj5S5YriSCThtbFCdr3AJXfF5iMolu8kLgAXM0bH1C7PxAjM/pQjWmdMVN/Y+uXXzcMO8
 8aQ0f0q3QeGWxCAP2xwBapUfP6LHDRPp/tV7P7ji8wKlabrSGdv0M9Qd9pn/YCYQE0ZdABEB
 AAHNJlN0ZWZhbiBCYXVyIDxwb3N0bWFzdGVyQHN0ZWZhbmJhdXIuZGU+wsCCBBMBAgAsAhsj
 BwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4ACGQEFAlwtWmgFCRK0IbcACgkQbt30GM2+URkj
 nwgAixhVoMxijCsh9jxxCUYBj7lC5HYhJmlAB+bZOfl1XI8xqMLw8YGECfu0VSe++FlaOAuc
 gArofqu79E2+wKxPaqW2lC94eKR1+kgkDOJyqckYj2Xmyi+vDfrOWjbyawIwiq5FUW2CB6zv
 nkTr68ZQ43mAVC1zz2tpAikn2Af4/OdHwUBzSAOpUt4rDbXDe93WW34XuyG2RDma6kE1Cr0u
 ilqvzKOz5SYp5ASmCyaA0wCzs7fjTy2KuMlOCSFRzwPJpzddr8rS9ZiTLdia/BZvShBEjOq4
 MZHWYv+RGK5RB4eDzw0KbPszXRJBUdXiZIcI0jqbC57Ht64ok3lXquXp987ATQRS3zosAQgA
 4KPXmGU1XE8CTRJ/4m/f8MTri3JfEvGJTerWwC2hBuXHGWrSBmmRNAdJHzNTvq5IoR9tQ6Cb
 Nrqxf6alr/v34Vr2bUg0s+jlK9TWOkVLAFoz6zytm/2BrRBIZ5So6Ymfc6efwsScsHOI++wi
 pzqELkpluqtXysb13RsBVLxBdp5TZCVPjCc9pLWjudfjEagQt2oJgtO2WndasrKvoZYkfRi6
 oSCK9B84YjNJoRF00LdK3n7K3SBvj4UPSl+ygzLVaD+3ZdIlbhX+bfn/Vp/10xdJ+/U8Fr7l
 7umrBKr17D8eO3mRYMGY9w1qc+pfNGOR76GIbPWj2tPVaBD9nmUaowARAQABwsBlBBgBAgAP
 AhsMBQJcLVqtBQkStCH9AAoJEG7d9BjNvlEZInkIAIcchwZxurIpwJJR8qMMXD+RSvj7mY55
 VIXOKUX0uAUTEoJTzFcqbdGkzcJB9y0NlUo9dv4chPT21M61y0bjJjhaDUshCLa1+YyFSSWp
 GBOKrLIsWusqC9zVwgf7TtjVmXt23jZwoDWjXoMlg9eQONMi5Z4u+lDOyPKD+lGJAcjJkQsI
 zL9hha3vuhmUclxgdALTJWzQBp+Y7u9QDub4uqf/TyuDpYASiP0winBRfTug+XjP5YZjU//P
 07H9WhiUCsHp6L9j3QzvrovVy2zz0j7JhyhW3e957vHz2skkSVv3QGtHMswcgK3XaQ9YdgWO
 ELHmBhevaIcJIxDvTBl3pYQ=
Message-ID: <927bf0ed-ebfa-1ed5-a259-9f3b577d9d3f@baur-itcs.de>
Date: Mon, 27 Jan 2020 09:53:58 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.4.1
MIME-Version: 1.0
In-Reply-To: <c1508caf-19d3-377e-7aa9-87d3dd500848@ionic.de>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="mEWEUQZJd0iNSrvQ3fNv54xo97C5UGqMh"
X-Provags-ID: V03:K1:wENS/lpf298/Oi3c/6ICkMNouBXAnL8goOt2FkA0FjvsF6rNobp
 1AmveOkiiYpnGn47bU0XWzK62ceonCvviXCdmtbPtWMh9cjKF2jZ3c1tuXcPUmzxsxez0b9
 6f1bVF7bs/FpqdMncAMKLLltWkYnRvkD7o62EuMvWopU1SSSpz7SAnoAdq0WIzKmPLj4Lha
 yUD1Q1JCfVRRBZNyHzZnA==
X-UI-Out-Filterresults: notjunk:1;V03:K0:/gt41emtj+c=:mDoaOtABbWDvBAenOduZhA
 ikyRpJB4pSZ1870BFQ3bdTmyXVwax/KpT03bTgkxT/9AxMPhffB+hq4QPwYigA0rACs9sOpZN
 0zHnblqZDYJDLqMoG/8TO2hM5KoCCGy8puBKZyxtt2v/02q8UPm2XQIja4mxZEpsssM3ANzOx
 CHQauksP4CFXWL6VJ1JvzKG7m4F8fAZ8CbyNNuHQh68fvEzdItAkBdRPfo44orVLFQ/L1jC7J
 o8ZflZaybACWYIkFMdJBhoK4+mA9eHr+WM2mGOG3pkMv1hX4DzAaspNK9X6BXsNaHucNnnEI5
 hLSEKDWkBhTBHwnhbyZnsXSxN0lZ6/62mIgXJ9cdyx150H/Inkjc+GLebP1AhCA4IwFAcECrS
 8uqdDJaueTKTDSRhcTDkz8lTfJzzETMwkKWt9pkEEAl/ycfs9X/DemAou0STRLuBKC3Jm8ako
 HjyRlqjLYM+nH8QCvdABbWi/UAgiGvY3TI887fmGEJdjrMHRiGppO1LQPff/aw+0B1UjxV6jj
 mxcp43l8ychXZTpAY0M1FneTkzNVD1dHeAPopjvhFrlVgUKXaHH1OhzaAO0y0x3evvXF6oBQ1
 x3LsrHWtYmKyCHOTRnCzaiwVYPPPdjd5c66l8XAb6gYnrAOtathXX1o4dE8GWR2zW/4PqL6l3
 hrLm75HMdBmtmCjBsGscqgc7c1nYG1kHW267me38YDpsoHY5JgN5/d4lKj2zcUX54+anrbGw+
 mlmwGLg+Ua2/HOzM84ZjRkEzhriv98C9ByHovXHurtwASCwXyQmLkv5xtSzVLuw1BH3oYXAUK
 uPkELSLdPcEjLjdsA2KzQl1MReCr9/CKSqOfChgoJFmGYgzDA7C1h7sTaIW4CATuq9zI6yC
[Message part 1 (text/plain, inline)]
Am 25.01.20 um 18:02 schrieb Mihai Moldovan:
> 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.

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

[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 16:25:20 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.