From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 23B6313877A for ; Tue, 12 Aug 2014 23:33:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B406EE09DC; Tue, 12 Aug 2014 23:33:43 +0000 (UTC) Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9713AE0817 for ; Tue, 12 Aug 2014 23:33:42 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id c1so57075igq.3 for ; Tue, 12 Aug 2014 16:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=BRsDL8S5iFymHqEI6iwAgsLRn1Z7nV7wYAQRl987zcs=; b=ntzTSwyA4JeU5wMmNvEuYOR7rTIgMTPysQ1ZXnAVevM4rGHFg1AEoMUpMJv7FbzgkI hxSATeBF/TaB1hqnhTEjYam7wBhu/TqJOUs+pSObdNBwoJBjhrZBbhK6/p1itu0//pj6 rocxsbQGEjG8tjfb8DP0Zo5SnSQSV9a4VjTJJP2JWNpsrMClNVhzqcYQROySoq/laM6D j3KK8+NfegC3BxYMqcQmMpln0eqlPCQgJDzOsDOWrjGvs6VeGUxzMM/CjUxgViBwp6G0 27SbJI7EO6gIXiq/y8nyKJznRpNksMnZFCOkKmKfnSveRjG15shzyU+fnVP48UmM4eeI TqPA== X-Received: by 10.50.4.9 with SMTP id g9mr2548502igg.42.1407886421677; Tue, 12 Aug 2014 16:33:41 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.107.12.5 with HTTP; Tue, 12 Aug 2014 16:33:21 -0700 (PDT) In-Reply-To: <20140811120537.0f5d4c36@mizar.aichberg.homenet.org> References: <20140811120537.0f5d4c36@mizar.aichberg.homenet.org> From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= Date: Tue, 12 Aug 2014 18:33:21 -0500 Message-ID: Subject: Re: [gentoo-user] XFCE4: How cab I disable Restart and Shut down buttons? To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0e451f65-48bb-498b-b5ef-1c572388f2af X-Archives-Hash: 7951dc332e38bf8cab72e0de17ea2fc5 On Mon, Aug 11, 2014 at 5:05 AM, Johannes Geiss wro= te: > Hello there, > > I have XFCE4 and Systemd running and I want to know if it is possible > to disable or remove the buttons "Restart" and "Shut down" at the > logout dialog (xfce4-session-logout). > > If so, how? (Sorry I took so long, I was updating my system). You want to disable only the buttons, or the functionality? For one user, or several? Assuming you want to disable the functionality for one user, this disables both the functionality *AND* the buttons (they show up grayed out): $ cat /etc/polkit-1/rules.d/10-no-restart-shutdown.rules polkit.addRule(function(action, subject) { if (subject.user =3D=3D "myuser") { if (action.id.match("org.freedesktop.login1.power-off") || action.id.match("org.freedesktop.login1.reboot")) { return polkit.Result.NO; } } }); Of course, change "myuser" for the user you want to disable this. You can also use groups (subject.isInGroup("group")), or use "suspend" or "hibernate" instead of "reboot". This works for any desktop that uses systemd (logind, technically) for session tracking: AFAIK, this should work for at least GNOME, Xfce, and KDE. Regards. --=20 Canek Pel=C3=A1ez Vald=C3=A9s Profesor de asignatura, Facultad de Ciencias Universidad Nacional Aut=C3=B3noma de M=C3=A9xico