From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QHgvDqiXIWT1RwAASxT56A (envelope-from ) for ; Mon, 27 Mar 2023 15:18:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GM0hDaiXIWS2pAAAG6o9tA (envelope-from ) for ; Mon, 27 Mar 2023 15:18:32 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B18AC37559 for ; Mon, 27 Mar 2023 15:18:31 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=uni-bremen.de header.s=2019 header.b=EsofYo8G; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=uni-bremen.de (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679923112; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lkVXpP/KdFMh+LtWXV5nZeJwXM5ecxqPJW84gctoxIA=; b=d+MO7DXeRhs5kyseF64U5PVr3MgREdNciKZCFBeZrY057Gy6DpyOBrA1fHZj2ndwX5LE2B eHAYDqeQe5SobFZJJVxf7Jk2tKKim6Z0APyr+A9c95CF26aPmybKX8aoqJr5lSA160OM7d 0E+F6uLQvXRtBkbAonw81yb+q22TyTQm3fdWeKeEkD7FKlm5QmlH6uQYUd1lIW4sF5MvAX T+DGuQHiB3TjsoY2GL6dySSRXN4FcEM6wEqMcBQYwEezAJl5XHpwkccgkNLpRzpVdTewTA VRSlEllqzLqvOGas+l8sB66uVSH0qfNQ67LWMpmkcEBiUrK0ZY9rP3xjHvoMNQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679923112; a=rsa-sha256; cv=none; b=OS6MHQS5yw03s4Jye+V6dDLlXYNxFE1N2vQUVpgVG7UicxAGurRDNaplLE2JmyDBsbR955 LlLCEnjI3c23yiGBAPJdsT2K5caG9kShexxiXHSz1UQNEOCcQKSLnjZ9rw7ctQinGK0uPh ig7oRmuY+7XED/N96OOQRmkZsMcJleyGsrHFESrNwBZtiMvKZMpXR7vAVzkN2MqLFFq2iw 60L6N55RC4OxWUTUhs3wxOTz/RZ+68PrMIofsDF7zuuH/F8aYlAgxKC/opQNfSo/+3nKRe iTjJDeNeLOsKEraHCLPNQsbhaLr/0jqmJmLylvTR4EPjWBsglJHPICWgY45Dtw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=uni-bremen.de header.s=2019 header.b=EsofYo8G; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=uni-bremen.de (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgmjf-0005oq-Mj; Mon, 27 Mar 2023 09:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgmjd-0005na-LL for help-guix@gnu.org; Mon, 27 Mar 2023 09:18:05 -0400 Received: from smtp.zfn.uni-bremen.de ([2001:638:708:32::21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgmja-0004HD-PT for help-guix@gnu.org; Mon, 27 Mar 2023 09:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-bremen.de; s=2019; t=1679923076; bh=BdsWy21LWvRNuSJpSKYbAi++0ZExoVfPM/Wxqs33F3I=; h=Date:To:References:From:In-Reply-To; b=EsofYo8GXQVg8hgv1q36c+JRWWvl/IbhDMn7FmeOxFFx2ZnEoMaGqqFa6PyBbe5Ek XMxkdSDfr5UGmWg3bM5fyEqnau587rxWG3I7usojl2U4BsE2+CBH/YPhFg3c5Jrj91 jYpVASvV74zzpSp9mCaLJEaArK+mY+YBE01241JOpHLCVFMeAC1jK4zQIyGmmgQPjT m2HIBmmtFnhqbvpKj0V27t/EuCGME3VfyWG2ko770jHYxA9YsKZypXtl8atXNKThWz EAdX2KxMMxnbFqDU5pQW+V4LWY7DC6ZBD2PmsjvOalFRkLpX/CKI842AvUN1eA05O2 uyICaRzLAv4Hw== Received: from [IPV6:2a02:8109:19bf:639a:a48f:75a8:97:ac4d] (unknown [IPv6:2a02:8109:19bf:639a:a48f:75a8:97:ac4d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4PlYK04pWpzDCnl; Mon, 27 Mar 2023 15:17:56 +0200 (CEST) Message-ID: Date: Mon, 27 Mar 2023 15:18:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: getting loginctl to work Content-Language: de-DE To: SeerLite , help-guix@gnu.org References: From: Martin Castillo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2001:638:708:32::21; envelope-from=castilma@uni-bremen.de; helo=smtp.zfn.uni-bremen.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: B18AC37559 X-Spam-Score: -2.43 X-Migadu-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: y84Ad8pUz8hc Hi, Am 27.03.23 um 12:21 schrieb SeerLite: > Hi! Is it maybe Polkit? Polkit was stopping me from suspending my laptop via SSH. The exact same behavior as you: no output and error code 1. > > Since the only `loginctl` command I cared about was `suspend`, I added my user to the `power` group, added the `power` group to `operating-system`, defined the following extension: > > ; Rule template stolen from from gnu/services/desktop.scm: polkit-wheel > ; and rule itself stolen from https://askubuntu.com/a/992878 > (define polkit-power-rules > (file-union > "polkit-power" > `(("share/polkit-1/rules.d/power.rules" > ,(plain-file > "power.rules" > "polkit.addRule(function(action, subject) { > if (action.id == \"org.freedesktop.login1.suspend\" && > subject.isInGroup(\"power\")) { > return polkit.Result.YES; > } > });"))))) > > > and added the above to my services like: > > (simple-service 'polkit-power-rules polkit-service-type (list polkit-power-rules)) > > You'd have to do something but I'm guessing for `login1.poweroff` instead. Thank you, that works. I think this kind of rule should be expected on most systems. It would be nice if this kind of polkit rule was predefined as a variable in guix, or the manual (or at least the cookbook) should give this as an example.