X2Go Bug report logs - #458
Apps launched by pkexec fail to start on specific distros

version graph

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

Reported by: Michael DePaulo <mikedep333@gmail.com>

Date: Sat, 22 Mar 2014 16:05:02 UTC

Severity: normal

Tags: pending

Found in version 4.0.1.13

Fixed in version 4.0.1.16

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 22 Mar 2014 16:03:14 +0000
From mikedep333@gmail.com  Sat Mar 22 17:03:13 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
	T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham version=3.3.2
Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178])
	by ymir (Postfix) with ESMTPS id 618E35DA7B
	for <submit@bugs.x2go.org>; Sat, 22 Mar 2014 17:03:13 +0100 (CET)
Received: by mail-lb0-f178.google.com with SMTP id s7so2464069lbd.23
        for <submit@bugs.x2go.org>; Sat, 22 Mar 2014 09:03:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:content-type;
        bh=tHsGnD8BybeDAHLS8sefRzh6+i77RMLMbjlcVkj7OPA=;
        b=M8lUErwbRUxskFUoqc10iWGpoV5+DFiYYJrBi7wJ14M+DrCmeSkqolJl2V9r1W/2cq
         phNProIZAHC1XZA0sik2UFWJFZ310/OrEygRRyXEwCp9IWXXVtVnoVSlG1rrhsfiMu8K
         rHv3ZkQky1SPX4zKPTvITJEHH+jYmNWq3srhswKNkIIS6bw+tGP+3we0dmeibRSQ2D2n
         Xb1nvusD4Oi4iavn+tgvMGYGUSXB/n+OYLteB+HpIsP3bQBtS7M4F5NZ5XfKTBfgtOZb
         W1PnzTYGPAh1q9dgtcorTBgrGTp4hsnBhuc2i1ckWlsAS8V9SdafFuTTadp+0V+igB3n
         jbLQ==
MIME-Version: 1.0
X-Received: by 10.112.39.97 with SMTP id o1mr387659lbk.38.1395504192766; Sat,
 22 Mar 2014 09:03:12 -0700 (PDT)
Received: by 10.114.176.105 with HTTP; Sat, 22 Mar 2014 09:03:12 -0700 (PDT)
Date: Sat, 22 Mar 2014 12:03:12 -0400
Message-ID: <CAMKht8hh-6Ni_4Zu9k=UbL0C=E17B3jB_ByxR+xDijT+R3VrAQ@mail.gmail.com>
Subject: Apps launched by pkexec fail to start on specific distros
From: Michael DePaulo <mikedep333@gmail.com>
To: submit@bugs.x2go.org
Content-Type: text/plain; charset=ISO-8859-1
Package: x2goserver
Version: 4.0.1.13

Notes:

1. I am not sure if this is a bug in x2goserver, x2goserver-xsession,
or in nx-libs.

2. PolicyKit depends on ConsoleKit (and on systemd-logind in
newer distros.)

3. RHEL7 beta (systemd-logind) is not affected and pkexec commands do
work. However, PolicyKit authentication within apps fails. I will file
a separate bug about this.

4. I also tested CentOS 6.5 64-bit (ConsoleKit) and saw an issue that
precludes even testing for this bug.
(polkit-gnome-authentication-agent-1 fails to start) I wrote bug 457
about this.

5. The workaround I discovered is to set your XAUTHORITY env var. I
demonstrated this below.

Test system:
Ubuntu 12.04.4 32-bit
x2goserver: 4.0.1.13
x2goserver-xsession: 4.0.1.13
nx-libs: 3.5.0.22
mate-desktop: 1.6.0-3+precise from this apt repo:
deb http://packages.mate-desktop.org/repo/ubuntu precise main
(This distro uses ConsoleKit, not systemd-logind)

Test Case 1:
Unity desktop

(The authentication window opens and prompts me for my password both
times. Only the latter time does synaptic start.)

mike@mothership-u-p:~$ ps -ef | grep polkit
root       755     1  0 10:55 ?        00:00:01
/usr/lib/policykit-1/polkitd --no-debug
mike     25151 25098  0 11:51 ?        00:00:00
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
mike     25515 25447  0 11:51 pts/0    00:00:00 grep --color=auto polkit
mike@mothership-u-p:~$ pkexec synaptic
No protocol specified
No protocol specified

(synaptic:25559): Gtk-WARNING **: cannot open display: :50
mike@mothership-u-p:~$ export XAUTHORITY=/home/mike/.Xauthority
mike@mothership-u-p:~$ pkexec synaptic
mike@mothership-u-p:~$

Test Case 2:
MATE desktop

(This time I am prompted to authentication on the command-line, which
works fine for me. I assume that me not being prompted the 2nd time is
intentional because sudo works in a similar manner. Only the latter
time does synaptic start.)

(And in case isn't clear, polkit-mate-authentication-agent-1 doesn't
start until I run the pkexec command the 1st time. This differs from
Unity where it is launched during login. When I login locally to MATE)

mike@mothership-u-p:~$ ps -ef | grep polkit
root       755     1  0 10:55 ?        00:00:01
/usr/lib/policykit-1/polkitd --no-debug
mike     21645 21522  0 11:46 pts/0    00:00:00 grep --color=auto polkit
mike@mothership-u-p:~$ pkexec synaptic
==== AUTHENTICATING FOR com.ubuntu.pkexec.synaptic ===
Authentication is required to run the Synaptic Package Manager
Authenticating as: Michael DePaulo,,, (mike)
Password:
==== AUTHENTICATION COMPLETE ===
No protocol specified
No protocol specified

(synaptic:21673): Gtk-WARNING **: cannot open display: :50.0
mike@mothership-u-p:~$ ps -ef | grep polkit
root       755     1  0 10:55 ?        00:00:01
/usr/lib/policykit-1/polkitd --no-debug
mike     21701 21379  0 11:47 ?        00:00:00
/usr/lib/polkit-mate/polkit-mate-authentication-agent-1
mike     21803 21522  0 11:47 pts/0    00:00:00 grep --color=auto polkit
mike@mothership-u-p:~$ export XAUTHORITY=/home/mike/.Xauthority
mike@mothership-u-p:~$ pkexec synaptic
mike@mothership-u-p:~$


Test Case 3:
MATE desktop from a local login

Same behavior as test case 2. I wanted to verify that
polkit-mate-authentication-agent-1 is not supposed to start until you
call pkexec, and that you are normally prompted to authentication on
the command-line.


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Mon Aug 3 15:54:55 2020; 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.