From owner-freebsd-gnome@FreeBSD.ORG Sun Jun 14 19:47:01 2009 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74E7D1065688 for ; Sun, 14 Jun 2009 19:47:01 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from violet.upc.es (violet.upc.es [147.83.2.51]) by mx1.freebsd.org (Postfix) with ESMTP id F2D748FC19 for ; Sun, 14 Jun 2009 19:47:00 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by violet.upc.es (8.14.1/8.13.1) with ESMTP id n5EJkmfl002023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 14 Jun 2009 21:46:48 +0200 Received: from [192.168.100.184] (178.Red-88-11-0.staticIP.rima-tde.net [88.11.0.178]) (authenticated bits=0) by ackerman2.upc.es (8.13.8/8.13.8) with ESMTP id n5EJkuq0025273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 14 Jun 2009 21:46:57 +0200 Message-ID: <4A355339.50100@entel.upc.edu> Date: Sun, 14 Jun 2009 21:44:57 +0200 From: =?ISO-8859-1?Q?Gustau_P=E9rez?= User-Agent: Thunderbird 2.0.0.21 (X11/20090607) MIME-Version: 1.0 To: Joe Marcus Clarke References: <4A2CFAC3.2060408@entel.upc.edu> <1244944034.39104.6.camel@shumai.marcuscom.com> In-Reply-To: <1244944034.39104.6.camel@shumai.marcuscom.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (violet.upc.es [147.83.2.51]); Sun, 14 Jun 2009 21:46:48 +0200 (CEST) Cc: freebsd-gnome@freebsd.org Subject: Re: consolekit problem and CURRENT X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 19:47:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joe Marcus Clarke wrote: > On Mon, 2009-06-08 at 13:49 +0200, Gustau Pérez wrote: >> Hi, >> >> I'm seeing problems with consolekit and CURRENT. When I start a >> session with gnome (via gdm) I can't mount usb's, can't shutdown or >> reboot, etc ... Reading the FAQ, it states that policykit will grant >> those things to local and active sessions automatically (checking is >> done via consolekit). >> >> The faq says proc needs to be mounted (done) and the graphical >> session must be started via gdm (got it). In a terminal ck-list-session, >> shows : >> >> Session6: >> unix-user = '1002' >> realname = 'Gustau Perez' >> seat = 'Seat1' >> session-type = '' >> active = FALSE >> x11-display = ':0' >> x11-display-device = '/dev/rw' >> display-device = 'ttyv1' >> remote-host-name = '' >> is-local = TRUE >> on-since = '2009-06-08T11:05:22.366887Z' >> login-session-id = '' >> >> Looks like it is unable to detect the graphical session as a local >> session. XDG_SESSION_COOKIE is set. GDM has this variable set too (I >> checked it via ps auwwex). >> >> I even tried (in text mode) the following : >> >> # ck-launch-session /usr/local/bin/bash >> # ck-list-sessions >> >> >> I start gdm using gnome_enable="YES" in rc.conf. >> >> Any idea ? > > Looks like something is wrong with your fstat(1) executable. Run the > following commands: > > /usr/local/libexec/ck-get-x11-display-device With ck-get-x11-display-device I got : [gus@gusiport ~]$ /usr/local/libexec/ck-get-x11-display-device fstat: kvm_getprocs: No such process ERROR: Failed to find TTY device for X server on display 0 > > cat /tmp/.X0-lock This one gave me the pid of the xserver. But making something like : # ps auxw | grep 1593 | grep -v grep gave me nothing. That made think maybe a tweak I introduced in sysctl.conf was guilty. What I made was add 'security.bsd.see_other_uids=0' (I use it quite frequently in server configurations). Changing it to 1, allowed ck-get-x11-display-device to find ttyv8 as the device used by the X server. Moreover, typing ck-list-session showed my session as 'active'. It seems to work, policykit allowed me to mount my removable devices with a clean policykit.conf. Thanks, Gus - -- PGP KEY : http://www-entel.upc.edu/gus/gus.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAko1UmYACgkQAvcpDulVChBxLQCfV4dQjBunBSRwSYOIp7sTgpO0 6hwAoJCJdobVNgk6e8M5I2su8jKez8K+ =Kcec -----END PGP SIGNATURE-----