FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-30-2011, 01:22 AM
David Purton
 
Default What is the right way to use consolekit with startx?

Hi everyone,

I have not been able to get consolekit working properly since version
0.4.1-4.

I believe it is something to do with bug #597937.

With more recent versions of consolekit, my session is not marked as
active, and as a result a bunch of stuff with network-manager doesn't
work. (I know about wicd, but it doesn't support broadband modems.)

I've googled a plenty and tried different things without success. Any
suggestions? Surely I'm not the only person running debian who doesn't
use a desktop manager?

Thanks,

David


My setup is pretty simple.

I use startx and have a ~/.xession file looking like this:

#!/bin/bash

# Set multi-touch emulation parameters
synclient EmulateTwoFingerMinZ=10
synclient EmulateTwoFingerMinW=8
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient CornerCoasting=0
synclient PalmDetect=0
synclient TapButton1=1
synclient TapButton2=2
synclient TapButton3=3

setxkbmap -layout 'us,gr,il(biblical)' -variant polytonic -option
ctrl:nocaps,compose:ralt,grp:switch,grp:alt_shift_ toggle

xrdb -merge ~/.Xdefaults

gnome-keyring-daemon &
nm-applet &
skype &
fbxkb &
xbacklightd &

exec awesome

--
David Purton
dcpurton@marshwiggle.net

For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
2 Chronicles 16:9a
 
Old 08-30-2011, 09:07 AM
Brian
 
Default What is the right way to use consolekit with startx?

On Tue 30 Aug 2011 at 11:22:07 +1000, David Purton wrote:

> I have not been able to get consolekit working properly since version
> 0.4.1-4.
>
> I believe it is something to do with bug #597937.

I have xfce4 (unstable) started with startx. Replacing consolekit with
Squeeze's version (and putting it on hold) and installing policykit-1
and libpam-ck-connector marks the X session as 'active'.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110830090718.GC28063@desktop">http://lists.debian.org/20110830090718.GC28063@desktop
 
Old 08-30-2011, 09:59 AM
 
Default What is the right way to use consolekit with startx?

> I've googled a plenty and tried different things without success. Any
> suggestions? Surely I'm not the only person running debian who doesn't
> use a desktop manager?

I do not pretend to know the correct way to do this,
at least I can share my experience. This works here for
starting an X session with startx or with xdm:

1 - I installed libpam-ck-connector
I do not remember if it is necessary, but
I removed the nox11 option in /etc/pam.d/common-session
file (probably for xdm, may not be necessary for startx).

Installing libpam-ck-connector is necessary because startx
has no consolekit support.

2 - I modified /etc/X11/Xsession.d/90-consolekit such as
to unconditionnally start ck-launch, like this:

-if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] &&
- ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then
+if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] ; then
STARTUP="$CK_LAUNCH_SESSION $STARTUP"
fi

I do not know why test fails here with xdm or with startx.

3 - For i386 (I do not need this for amd64), I had the
following line in /etc/pam.d/common-session:

session optional pam_loginuid.so

before
session optional pam_ck_connector.so

If I do not do this on i386, ck-list-session reports that
the session has no login-session-id, then it cannot be active.

Hope that helps.

Regards

Pascal Dormeau


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 9794e46d-0298-43cc-a5d7-b0ddc46704d8@zimbra60-e10.priv.proxad.net">http://lists.debian.org/9794e46d-0298-43cc-a5d7-b0ddc46704d8@zimbra60-e10.priv.proxad.net
 
Old 08-30-2011, 09:48 PM
Liam O'Toole
 
Default What is the right way to use consolekit with startx?

On 2011-08-30, David Purton <dcpurton@marshwiggle.net> wrote:
>
> --X1bOJ3K7DJ5YkBrT
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Hi everyone,
>
> I have not been able to get consolekit working properly since version
> 0.4.1-4.
>
> I believe it is something to do with bug #597937.

Yes, I believe it is. Unfortunately, I also believe it is not about to
be fixed. consolekit expects the display manager to set the required
permissions. gdm and gdm3 (and possibly kdm; I haven't used it recently)
do so, whereas other display managers and startx do not.

>
> With more recent versions of consolekit, my session is not marked as
> active, and as a result a bunch of stuff with network-manager doesn't
> work. (I know about wicd, but it doesn't support broadband modems.)
>
> I've googled a plenty and tried different things without success. Any
> suggestions? Surely I'm not the only person running debian who doesn't
> use a desktop manager?

(...)

The simplest solution I have found is to override the default consolekit
permissions. In the case of suspend and hibernate, these are specified
in the file /usr/share/polkit-1/actions/org.freedesktop.upower.policy.
To override, create a new file in
/etc/polkit-1/localauthority/50-local.d/, give it a .pkla extension, and
add the following content:

[upower]
Identity=unix-user:*
Action=org.freedesktop.upower.*
ResultAny=yes

With that, I have the freedom to suspend and hibernate when using slim
and startx. I have been able to remove gdm3, an important step towards
removing all things GNOME-y in wheezy :-)

I don't have the network-manager package installed, but apt-file tells
me that it contains the files
/usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy and
/usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy.
Therefore I'm sure you can adapt the above approach to suit your needs.

Liam

--
Liam O'Toole
Cork, Ireland


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: slrnj5qmlv.58k.liam.p.otoole@dipsy.tubbynet">http://lists.debian.org/slrnj5qmlv.58k.liam.p.otoole@dipsy.tubbynet
 
Old 08-31-2011, 01:45 AM
David Purton
 
Default What is the right way to use consolekit with startx?

On Tue, Aug 30, 2011 at 10:07:18AM +0100, Brian wrote:
> On Tue 30 Aug 2011 at 11:22:07 +1000, David Purton wrote:
>
> > I have not been able to get consolekit working properly since version
> > 0.4.1-4.
> >
> > I believe it is something to do with bug #597937.
>
> I have xfce4 (unstable) started with startx. Replacing consolekit with
> Squeeze's version (and putting it on hold) and installing policykit-1
> and libpam-ck-connector marks the X session as 'active'.

Yeah - that is what I'm doing at the moment.. I'm looking for a way that
doesn't involve editing non-config files ad uses the latest version of
consolekit so that other problems are not introduced down the track by
having this package out of date.

There is a good idea in this thread suggesting to modify policies with
local exceptions which I am going to try.

David

--
David Purton
dcpurton@marshwiggle.net

For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
2 Chronicles 16:9a
 
Old 08-31-2011, 01:48 AM
David Purton
 
Default What is the right way to use consolekit with startx?

On Tue, Aug 30, 2011 at 11:59:03AM +0200, pdormeau@free.fr wrote:
> > I've googled a plenty and tried different things without success. Any
> > suggestions? Surely I'm not the only person running debian who doesn't
> > use a desktop manager?
>
> I do not pretend to know the correct way to do this,
> at least I can share my experience. This works here for
> starting an X session with startx or with xdm:
>
> 1 - I installed libpam-ck-connector
> I do not remember if it is necessary, but
> I removed the nox11 option in /etc/pam.d/common-session
> file (probably for xdm, may not be necessary for startx).
>
> Installing libpam-ck-connector is necessary because startx
> has no consolekit support.
>
> 2 - I modified /etc/X11/Xsession.d/90-consolekit such as
> to unconditionnally start ck-launch, like this:
>
> -if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] &&
> - ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then
> +if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] ; then
> STARTUP="$CK_LAUNCH_SESSION $STARTUP"
> fi
>
> I do not know why test fails here with xdm or with startx.
>
> 3 - For i386 (I do not need this for amd64), I had the
> following line in /etc/pam.d/common-session:
>
> session optional pam_loginuid.so
>
> before
> session optional pam_ck_connector.so
>
> If I do not do this on i386, ck-list-session reports that
> the session has no login-session-id, then it cannot be active.
>

Ha! Nice instructions. I'd tried similar combinations, but I think I
hadn't been successful. I might try this again because it isn't too
invasive.

David

--
David Purton
dcpurton@marshwiggle.net

For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
2 Chronicles 16:9a
 
Old 08-31-2011, 01:50 AM
David Purton
 
Default What is the right way to use consolekit with startx?

On Tue, Aug 30, 2011 at 09:48:47PM +0000, Liam O'Toole wrote:
> On 2011-08-30, David Purton <dcpurton@marshwiggle.net> wrote:
> >

[SNIP]

>
> The simplest solution I have found is to override the default consolekit
> permissions. In the case of suspend and hibernate, these are specified
> in the file /usr/share/polkit-1/actions/org.freedesktop.upower.policy.
> To override, create a new file in
> /etc/polkit-1/localauthority/50-local.d/, give it a .pkla extension, and
> add the following content:
>
> [upower]
> Identity=unix-user:*
> Action=org.freedesktop.upower.*
> ResultAny=yes
>
> With that, I have the freedom to suspend and hibernate when using slim
> and startx. I have been able to remove gdm3, an important step towards
> removing all things GNOME-y in wheezy :-)
>
> I don't have the network-manager package installed, but apt-file tells
> me that it contains the files
> /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy and
> /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy.
> Therefore I'm sure you can adapt the above approach to suit your needs.
>

Nice solution. I will look into it as it doesn't modify any existing
files.

Thanks.

David

--
David Purton
dcpurton@marshwiggle.net

For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
2 Chronicles 16:9a
 
Old 08-31-2011, 08:37 PM
Brian
 
Default What is the right way to use consolekit with startx?

On Tue 30 Aug 2011 at 21:48:47 +0000, Liam O'Toole wrote:

> The simplest solution I have found is to override the default consolekit
> permissions. In the case of suspend and hibernate, these are specified
> in the file /usr/share/polkit-1/actions/org.freedesktop.upower.policy.
> To override, create a new file in
> /etc/polkit-1/localauthority/50-local.d/, give it a .pkla extension, and
> add the following content:
>
> [upower]
> Identity=unix-user:*
> Action=org.freedesktop.upower.*
> ResultAny=yes
>
> With that, I have the freedom to suspend and hibernate when using slim
> and startx. I have been able to remove gdm3, an important step towards
> removing all things GNOME-y in wheezy :-)

This appears to be a very elegant solution and far better than
downgrading consolekit or altering a file in /etc/pam.d. For a start, it
gives better granuality and flexibility. It also has the the advantage
of fitting in better with the existing consolekt/policykit setups, For
example, I changed the second line to 'Identity=unix-groupowerdev' to
reflect the usual Debian way of allowing users to access a service.

Apologies for being a little lazy but is there documentation for the
stanza you have given above? I'd guess it's something to do with d-bus
but would not be surprised to be wrong.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110831203710.GG28063@desktop">http://lists.debian.org/20110831203710.GG28063@desktop
 
Old 08-31-2011, 09:39 PM
Walter Hurry
 
Default What is the right way to use consolekit with startx?

On Wed, 31 Aug 2011 21:37:10 +0100, Brian wrote:

> On Tue 30 Aug 2011 at 21:48:47 +0000, Liam O'Toole wrote:
>
>> The simplest solution I have found is to override the default
>> consolekit permissions. In the case of suspend and hibernate, these are
>> specified in the file
>> /usr/share/polkit-1/actions/org.freedesktop.upower.policy. To override,
>> create a new file in
>> /etc/polkit-1/localauthority/50-local.d/, give it a .pkla extension,
>> and add the following content:
>>
>> [upower]
>> Identity=unix-user:*
>> Action=org.freedesktop.upower.*
>> ResultAny=yes
>>
>> With that, I have the freedom to suspend and hibernate when using slim
>> and startx. I have been able to remove gdm3, an important step towards
>> removing all things GNOME-y in wheezy :-)
>
> This appears to be a very elegant solution and far better than
> downgrading consolekit or altering a file in /etc/pam.d. For a start, it
> gives better granuality and flexibility. It also has the the advantage
> of fitting in better with the existing consolekt/policykit setups, For
> example, I changed the second line to 'Identity=unix-groupowerdev' to
> reflect the usual Debian way of allowing users to access a service.
>
> Apologies for being a little lazy but is there documentation for the
> stanza you have given above? I'd guess it's something to do with d-bus
> but would not be surprised to be wrong.

At the risk of butting in, in case it helps. my notes say:

See <http://hal.freedesktop.org/docs/polkit/pklocalauthority.8.html>
and
<http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: j3m9mn$7ov$1@dough.gmane.org">http://lists.debian.org/j3m9mn$7ov$1@dough.gmane.org
 
Old 08-31-2011, 10:13 PM
Brian
 
Default What is the right way to use consolekit with startx?

On Wed 31 Aug 2011 at 21:39:35 +0000, Walter Hurry wrote:

> At the risk of butting in, in case it helps. my notes say:
>
> See <http://hal.freedesktop.org/docs/polkit/pklocalauthority.8.html>
> and
> <http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html>

You are hardly butting in. This is very helpful and should get me to
understand what I am doing. I really should have made more of an effort
to find it. Thank you.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110831221322.GI28063@desktop">http://lists.debian.org/20110831221322.GI28063@desktop
 

Thread Tools




All times are GMT. The time now is 12:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org