You are not logged in.

#1 2011-01-30 11:10:39

Watermel0n
Member
Registered: 2010-03-10
Posts: 60

[ConsoleKit] Bug after upgrading?

Hello ArchLinux forums. This is the first time that I actually have a problem with an Archlinux upgrade.
Yesterday (2011-01-29) I upgraded consolekit ( http://www.archlinux.org/packages/extra … onsolekit/ ) and now udisks mounting doesn't work anymore. It says that I'm not authorized.
ck-list-session outputs:

Session1:
        unix-user = '1000'
        realname = 'blablabla'
        seat = 'Seat2'
        session-type = ''
        active = FALSE
        x11-display = ':0.0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = FALSE
        on-since = '2011-01-30T10:55:29.998988Z'
        login-session-id = '4294967295'

As you can see, active is set to false and is-local also. My common sense says that this is unexpected behaviour, because by default consolekit only allows local users to mount disks.
I'm using slim and my .xinitrc contains

export GTK2_RC_FILES=~/.gtkrc-2.0
xrdb -merge ~/.Xresources
exec dbus-launch ck-launch-session pekwm

Is somebody able to reproduce this? Should I file a bugreport? Is this an upstream issue? Hopefully somebody is able to help me wink

Last edited by Watermel0n (2011-01-30 11:12:52)

Offline

#2 2011-01-30 11:15:32

Dogmeat
Member
From: Slovak Republic
Registered: 2009-02-24
Posts: 193

Re: [ConsoleKit] Bug after upgrading?

Offline

#3 2011-01-30 11:28:10

Watermel0n
Member
Registered: 2010-03-10
Posts: 60

Re: [ConsoleKit] Bug after upgrading?

Oh, I tried to search but couldn't find anything. I guess then this can be closed. I'm sorry. I will change to lxdm then or stick with startx. Thanks.

Offline

#4 2011-01-30 16:53:07

Miles28
Member
From: Spain
Registered: 2008-08-31
Posts: 88

Re: [ConsoleKit] Bug after upgrading?

I'm using lxdm now, until slim gets a solution.


Inteligencia militar son términos contradictorios (G. Marx).

Offline

#5 2011-01-31 02:50:55

pnutzh4x0r
Member
Registered: 2009-08-11
Posts: 24

Re: [ConsoleKit] Bug after upgrading?

Latest slim (1.3.2-2) with gentoo patch, plus adding the following to /etc/pam.d/slim appears to work fine

session         optional        pam_loginuid.so
session         optional        pam_ck_connector.so

Offline

#6 2011-01-31 22:07:27

ernia
Member
Registered: 2008-03-08
Posts: 27

Re: [ConsoleKit] Bug after upgrading?

@pnutzh4x0r
it worked for me, i applied this one:
http://sources.gentoo.org/cgi-bin/viewv … h?view=log
and added the

session         optional        pam_ck_connector.so

row in /etc/pam.d/slim and all seems to work again.
the only strange thing i can see is that ck-list-sessions list two sessions, one active and one inactive
thanks for the hint

EDIT: it seems that the only relevant thing is to add the

session         optional        pam_ck_connector.so

row in /etc/pam.d/slim, it works with arch slim too. ok, i'll sit down and wait for the new slim package, sorry about this not so useful post

Last edited by ernia (2011-01-31 22:37:06)

Offline

#7 2011-01-31 23:00:36

Juanlu001
Member
From: Madrid, Spain, Europe
Registered: 2010-10-24
Posts: 26

Re: [ConsoleKit] Bug after upgrading?

I added the pam_ck line and tried to use startx instead of slim, but it didn't solve the problem. I might be experiencing a different problem or doing something wrong, but it appeared after upgrading consolekit too (see https://bbs.archlinux.org/viewtopic.php … 43#p886143 for my other post)


Juan Luis Cano
Pybonacci - http://pybonacci.wordpress.com/ Blog about Python and Scientific Computing in Spanish

Offline

#8 2011-01-31 23:04:13

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [ConsoleKit] Bug after upgrading?

Juanlu001 wrote:

I added the pam_ck line and tried to use startx instead of slim, but it didn't solve the problem. I might be experiencing a different problem or doing something wrong, but it appeared after upgrading consolekit too (see https://bbs.archlinux.org/viewtopic.php … 43#p886143 for my other post)

I had to add pam_loginuid.so too, above the ck_connector one in /etc/pam.d/slim. Like this:

session         optional        pam_loginuid.so
-session        optional        pam_ck_connector.so

Offline

#9 2011-01-31 23:25:52

Juanlu001
Member
From: Madrid, Spain, Europe
Registered: 2010-10-24
Posts: 26

Re: [ConsoleKit] Bug after upgrading?

@foutrelis you were right, thank you very much.


Juan Luis Cano
Pybonacci - http://pybonacci.wordpress.com/ Blog about Python and Scientific Computing in Spanish

Offline

#10 2011-01-31 23:43:21

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [ConsoleKit] Bug after upgrading?

You're welcome.

Btw, slim-1.3.2-3, which appears to solve this issue in the same way, just entered [extra].

Offline

#11 2011-02-01 13:26:41

pnutzh4x0r
Member
Registered: 2009-08-11
Posts: 24

Re: [ConsoleKit] Bug after upgrading?

Hmm.  So the fix described above fixes NetworkManager for me, but now Thunar doesn't automount... so this is probably not a long term solution.  Also the double consolekit session thing is worrisome.

Offline

#12 2011-02-01 14:32:22

Juanlu001
Member
From: Madrid, Spain, Europe
Registered: 2010-10-24
Posts: 26

Re: [ConsoleKit] Bug after upgrading?

pnutzh4x0r wrote:

Hmm.  So the fix described above fixes NetworkManager for me, but now Thunar doesn't automount...

Have you tried to install gvfs? It worked for me.


Juan Luis Cano
Pybonacci - http://pybonacci.wordpress.com/ Blog about Python and Scientific Computing in Spanish

Offline

#13 2011-02-01 14:43:42

pnutzh4x0r
Member
Registered: 2009-08-11
Posts: 24

Re: [ConsoleKit] Bug after upgrading?

Juanlu001 wrote:
pnutzh4x0r wrote:

Hmm.  So the fix described above fixes NetworkManager for me, but now Thunar doesn't automount...

Have you tried to install gvfs? It worked for me.

Yes, it's installed.  Thunar says it's "not authorized" if I try to mount anything.  Reverting back to consolekit-0.4.1-4 is currently my solution... everything just works with the older version.

Offline

#14 2011-02-01 15:03:00

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: [ConsoleKit] Bug after upgrading?

Look for pacnew files and merge them

Offline

#15 2011-02-01 15:17:19

pnutzh4x0r
Member
Registered: 2009-08-11
Posts: 24

Re: [ConsoleKit] Bug after upgrading?

skunktrader wrote:

Look for pacnew files and merge them

Ok... I don't think /etc/pacman.d/mirrorlist.pacnew, /etc/sshd/sshd_config.pacnew, or /etc/makepkg.conf.pacnew would affect this problem, but I merged them anyway.  Still doesn't fix anything.   I've already checked abs and made sure files in /etc/pam.d/* matched that found in the shadow and slim packages.  I think it's just that slim doesn't work with new consolekit changes and will require a patch, just like the one for xdm: https://bugs.archlinux.org/task/22671

Offline

#16 2011-02-01 16:14:02

pnutzh4x0r
Member
Registered: 2009-08-11
Posts: 24

Re: [ConsoleKit] Bug after upgrading?

Good news everybody!  Modifying /etc/slim.conf to include ck-launch-session seems to fix my automounting problem, while keeping NetworkManager working:

login_cmd           exec ck-launch-session /bin/sh - ~/.xinitrc %session

Originally, I had ck-launch-session in my ~/.xinitrc file.  Moving it to /etc/slim.conf means that all of the x11 session will be under the consolekit session.  I think what was happening was that I started thunar --daemon before I did exec ck-launch-session in ~/.xinitrc, and so it did not have the appropriate authorization.   Anyway, so with the latest consolekit, shadow, and slim, everything works again by moving the ck-launch-session to /etc/slim.conf.

I still get two sessions... but whatever.  Stuff works.

Last edited by pnutzh4x0r (2011-02-01 16:14:40)

Offline

#17 2011-02-04 18:51:07

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: [ConsoleKit] Bug after upgrading?

Uh, I lost thunar automount before I upgraded consolekit. Don't know why, nothing relevant in pacman log.
Someone said it is about thunar --daemon starting before consolekit and thus it fails to autorise it.
I fixed that with sleep 2 thunar...
Now, day after and after reboot that does not help either. So I upgraded consolekit and it remains the same.
Btw.. this is my setup:

ck-launch-session dbus-launch --sh-syntax --exit-with-session syndaemon -t -i 2 & openbox-session

Offline

#18 2011-02-05 09:52:18

MONVMENTVM
Member
Registered: 2007-10-06
Posts: 50

Re: [ConsoleKit] Bug after upgrading?

Apparently I didn't run into any problems with the consolekit 0.4.3-1 update on my main system, but I'm using networkmanager on my laptop so I'm kinda too frightened to upgrade this one (especially after reading about these problems here).

But the question that really bothers me is why nobody is reporting if the consolekit 0.4.3-2  fixes these problems or not, as it was released just a couple of days after 0.4.3-1. Is it because everybody downgraded back to 0.4.1-* and missed the 0.4.3-2 upgrade? Or does it still break things like 0.4.3-1 did, so nobody is mentioning it as solution?

Would be really cool if someone with a bugging 0.4.3-1 could check 0.4.3-2 and report if it fixes things.

Thanks!

Last edited by MONVMENTVM (2011-02-05 09:52:50)

Offline

#19 2011-02-05 10:05:59

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [ConsoleKit] Bug after upgrading?

0.4.3-1 and 0.4.3-2 are functionally identically. the only difference is the logrotate config


Give what you have. To someone, it may be better than you dare to think.

Offline

#20 2011-02-06 04:01:47

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [ConsoleKit] Bug after upgrading?

Another question: is this behaviour a bug of the new consolekit, or a new security "feature".

If it's a "feature", those of us using the shell to log into our gnome sessions will need a longterm workaround in line with the ones posted above for slim.


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#21 2011-02-06 09:19:51

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [ConsoleKit] Bug after upgrading?

is a new security feature and for gnome to work, you only need a graphical login manager other than slim (i might talk with the maintainer to change the login command) or use startx while using exec ck-launch-session gnome-session.(tested)

Last edited by wonder (2011-02-06 09:24:49)


Give what you have. To someone, it may be better than you dare to think.

Offline

#22 2011-02-06 22:26:46

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [ConsoleKit] Bug after upgrading?

wonder wrote:

...or use startx while using exec ck-launch-session gnome-session.(tested)

I use the following .bash_profile

. $HOME/.bashrc
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  xinit
  logout
fi

with the .xinitrc being

exec ck-launch-session gnome-session

But despite this .xinitrc as you've specified / tested, the non-privileged gnome state continues to exist. I'm open to any and all suggestions and workarounds (which preferably don't involve having to use gdm or another graphical login manager).


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#23 2011-02-06 22:45:16

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [ConsoleKit] Bug after upgrading?

@sultanoswing
you have to take in consideration a lot of factors like dbus have to be started, be sure you don't have a /etc/pam.d/login.pacnew or if you have a consolekit session before running xinit. also it might be cause of xinit since ck-launch-session require a cookie and i know that startx does it.


Give what you have. To someone, it may be better than you dare to think.

Offline

#24 2011-02-07 05:34:59

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: [ConsoleKit] Bug after upgrading?

Thanks for the input. I did have a login.pacnew file (and now get your previous reference to it!), but deleting it didn't help.

Also pretty sure I don't have consolekit starting early - and minimised daemons to test this. Added dbus to startup daemons just in case - but no help. Tried startx in bash_profile instead of xinit, also to no avail.

What's weird is that networkmanager works properly again, but still no shutdown/restart button. And yes, I am a member of the 'power' group.

It's also working properly on my desktop - just not my laptop. Lord knows whether I've altered some other config or permissions files over the months to account for the difference.

[EDIT] Perhaps a workaround using wheel/sudoers to allow the user 'shutdown' access will work, or a script to do similar. At least it'll restore what is pretty important functionality back to my gnome panel!

[EDIT 2] I've caved and started using SliM.... it's actually quite nice!

Last edited by sultanoswing (2011-02-07 10:56:51)


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#25 2011-02-07 13:27:02

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: [ConsoleKit] Bug after upgrading?

You are not supposed to delete pacnew files, you are meant to merge their contents with the file on your system.

Offline

Board footer

Powered by FluxBB