Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ConsoleKit: Is it needed/useful?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Mon Jul 13, 2009 5:27 am    Post subject: ConsoleKit: Is it needed/useful? Reply with quote

I've been playing around building a new MythTv box and noticed errors regarding ConsolelKit in the Xorg.0.log file. The consolekit package is installed (pulled in as a dep for xinit with hal USE flag) but it has a daemon that is not running and nothing else on the system is built with USE=consolekit. Things seem to work anyway.

So, questions are:
What is consolekit good for?
Should the daemon be started in boot or default level, or not at all?
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Wed Jul 15, 2009 2:35 am    Post subject: Reply with quote

Seems to be more of a mystery than I thought :)
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
alatar
n00b
n00b


Joined: 12 Feb 2009
Posts: 61

PostPosted: Wed Jul 15, 2009 3:05 am    Post subject: Reply with quote

AFAIK it is used to log some users activity or deal with privileges. If you look at the list of the processes, the number of consolekits would be equal to the number of tty's. That is all that I know about it :)
Back to top
View user's profile Send private message
dreadlorde
Apprentice
Apprentice


Joined: 16 Dec 2008
Posts: 243
Location: /adm/timezone/US_Michigan

PostPosted: Wed Jul 15, 2009 4:53 am    Post subject: Reply with quote

alatar wrote:
AFAIK it is used to log some users activity or deal with privileges. If you look at the list of the processes, the number of consolekits would be equal to the number of tty's. That is all that I know about it :)

I have two tty's, one consolekit, and about ~30 threads of it.

:P
_________________
Ludwig von Mises Institute
Quote:
I am not to be a shepherd, I am not to be a grave-digger. No longer will I speak to the people; for the last time I have spoken to the dead.
Back to top
View user's profile Send private message
pigeon768
l33t
l33t


Joined: 02 Jan 2006
Posts: 683

PostPosted: Thu Jul 16, 2009 2:13 pm    Post subject: Reply with quote

I'm not sure. I know hal & dbus have been all fucked up on all my computers for the last few weeks - I tried uninstalling them, removing all related files, including everything in /etc, /var/lib, /var/run, /var/cache, anything I could find, reinstalling them, twice. Eventually, on a wild-ass-guess, (/var/log/messages showed complaints regarding console-kit-daemon, which I hadn't explicitly installed, USE flags were turned off, and wasn't added to the default runlevel, but was still running in the background for some inexplicable reason) I enabled the policykit and consolekit USE flags, 'emerge -uND @world' and everything started working again - hotplugging USB devices, battery control on my laptop, etc.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Sun Jul 19, 2009 2:08 am    Post subject: Reply with quote

yeah, some time ago I suddenly had problems with 3d not working, failing permissions and stuff - consolekit added to default and everything worked again. Not too happy about it, but it does not hurt either...
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2280
Location: Adendorf, Germany

PostPosted: Mon Jul 20, 2009 10:26 am    Post subject: Reply with quote

... something everybody needs, but nobody knows what it does... "ConsoleKit by Microsoft", install today or suffer the consequences? I think that's really odd ... and somewhat suspicious! (Yay! Feed the conspiracy theorists! *harhar*)

Edith wants to add:
ConsoleKit Documentation wrote:
About

ConsoleKit is a framework for keeping track of the various users, sessions, and seats present on a system. It provides a mechanism for software to react to changes of any of these items or of any of the metadata associated with them.

_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Jul 20, 2009 11:51 am    Post subject: Reply with quote

For what I know, consolekit use flag is necessary for a pam package inside kde 4.x at least.
Back to top
View user's profile Send private message
alatar
n00b
n00b


Joined: 12 Feb 2009
Posts: 61

PostPosted: Tue Jul 21, 2009 1:08 am    Post subject: Reply with quote

Well, I do not have KDE installed, but as I remember ConsoleKit was running even without X. So possibly it is the dependensy of pam.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Tue Jul 21, 2009 7:46 am    Post subject: Reply with quote

so enabling global support in it is a good thing? it will be a good thing?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Jul 21, 2009 11:56 am    Post subject: Reply with quote

I think so, because I'm trying to install KDE 4.2.4 and it's asking to have consolekit as a Use Flags for pam and 2-3 other packages.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Tue Jul 21, 2009 1:29 pm    Post subject: Reply with quote

ok, will add and try.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 994

PostPosted: Wed Sep 30, 2009 11:54 am    Post subject: What is consolekit? Reply with quote

I have recently noticed USE-flag "consolekit" creep into my emerge -uvDaN world. Also,when I upgraded one of my comps to KDE 4, consolekit was pulled in. What does that thing do and why do I need it? Why should I enable it at startup?

http://www.freedesktop.org/software/ConsoleKit/ tells it's a framework for tracking users, but that tells me pretty much squat. What does it actually DO?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Wed Sep 30, 2009 1:12 pm    Post subject: Reply with quote

I'll take a stab at this...

The console brings with it some extra resources, like the cdrom, sound, keyboard, display card, etc. Someone getting in through ssh needs none of these things, and shouldn't be allowed to access them. But whoever is sitting at the console does. There have been numerous stabs at giving the console user the extra authority to use these devices - RedHat used to have some sort of console-tools that was a pam add-on, HAL policies another, and ConsoleKit is the latest'n'greatest.

That's my impression. If someone sees this, and I'm wrong, please correct me.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Sep 30, 2009 1:55 pm    Post subject: Reply with quote

I read that it is recommended for KDE4, and Gnome has consolekit support built in. I also read that it solves many weird problems. Hal, KDM and gnome-volume-manager use consolekit.

Announcing ConsoleKit wrote:
The way it works, currently, is that after the login manager (KDM,
GDM, etc) authenticates a new user it tells ConsoleKit to open a new
session. CK then generates a globally unique secret cookie and
returns that to the login manager. The login manager stores that
cookie in the environment of the new login process as
XDG_SESSION_COOKIE (GDM 2.17.2 or greater already does this). So,
membership in this session is defined as knowledge of this cookie.
This aspect can be considered a replacement for utmp and things like
pam_console.


It needed to be patched to work properly in KDE4 look here
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Sep 30, 2009 7:22 pm    Post subject: Reply with quote

This gives a better insight about the whole thing, it also tells you in which circumstances it can be useful.

http://fedoraproject.org/wiki/Desktop/FastUserSwitching
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Sep 30, 2009 7:36 pm    Post subject: Reply with quote

i92guboj wrote:
This gives a better insight about the whole thing, it also tells you in which circumstances it can be useful.

http://fedoraproject.org/wiki/Desktop/FastUserSwitching


yes, that makes it much easier to get a clearer picture - bookmarking it - for next time someone asks. Thanks :)
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sat Oct 03, 2009 1:24 am    Post subject: Reply with quote

Merged the preceding five posts.
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Tue Oct 06, 2009 12:45 am    Post subject: Reply with quote

I just ran into a problem with consolekit wanting to install pam if you used emerge -uDN and not if you used -u. Had -pam in make.conf and even putting consolekit -pam in package.use didn't help. I normally don't use the -uDN, but was notified of the problem from some family members. After some checking I realized that could use the above to get around it. But further investigation revealed that I have never used consolekit. I have had pam removed for quite a few years and didn't want it installed. So if it rears it's ugly head again will see if can just unmerge consolekit.

Later: Since never used consolekit after all these years, added -consolekit to my make.conf and that has solved the problem.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright


Last edited by Decibels on Tue Oct 13, 2009 3:03 am; edited 1 time in total
Back to top
View user's profile Send private message
chris.c.hogan
Apprentice
Apprentice


Joined: 02 Oct 2005
Posts: 189

PostPosted: Thu Oct 08, 2009 10:07 am    Post subject: Reply with quote

I just ran into Console Kit while putting together a new system for a netbook. It showed up as a USE flag for KDM and defaulted to on using the default/linux/x86/2008.0/desktop profile. I was given the following warning:

Quote:

* You have compiled 'kdm' with consolekit support. If you want to use kdm,
* make sure consolekit daemon is running and started at login time
*
* rc-update add consolekit default && /etc/init.d/consolekit start


Just what I want on a netbook, yet another service stealing resources. Though, I suppose, if I were really worried about resources, I wouldn't be trying KDE out on it... :roll:

I read a little about consolekit when it came out. It is a replacement for pam_console. Redhat, SuSE, and I'm sure others, used to use pam_console to set device permissions exclusively to the user. Their approach differed from mine. I prefer to use groups to control access to devices. pam_console never really made sense to me, and I disabled it anywhere I could. In the past, Gentoo seemed to agree with my method of device access control, with the video, audio, cdrom, plugdev, and other hardware access groups. I really hope this is not changing.

The netbook will be primarily a single-user system. I've even debated not installing KDM and letting mingetty/inittab/.bash_profile/startx handle log-in. It is the setup I used for Myth. Console Kit is a complete waste on this system. I think I'll see how far I can can get with disabling it in the make.conf file. I'll report any success/failures here.

Edit:
Consolekit is not enabled by the profile. kde-base/kdm-4.3.1-r2 and x11-apps/xinit-1.0.8-r8 turn it on. I've forced it off via make.conf and removed it via emerge -C. I don't see anything pulling it in when I do emerge -pve world. This is a build environment. I'll report if I have any problems building, or running once I transfer the system to the netbook...


Last edited by chris.c.hogan on Thu Oct 08, 2009 10:52 am; edited 1 time in total
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Thu Oct 08, 2009 10:11 am    Post subject: Reply with quote

so, you let the useflag on and then you complain that it does what it advertised? Sounds stupid.

and ressources?
root 3483 0.0 0.0 100472 2344 ? Ssl Oct07 0:00 /usr/sbin/console-kit-daemon

yeah, horrible.
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
remi2402
Retired Dev
Retired Dev


Joined: 28 Jun 2003
Posts: 111
Location: Paris, France

PostPosted: Thu Oct 08, 2009 3:24 pm    Post subject: Reply with quote

Of all the controversies surrounding the various *Kits (PackageKit, DeviceKit, ConsoleKit, ...) ConsoleKit is the one that's actually good to have.

It's just a small daemon that sits in the background and does nearly nothing. In a nutshell, it just waits for user sessions to register themselves to the daemon. Then, other tools can ask the daemon to list all the currently running sessions on a system and query their types (X session, remote X, local console, remote console via ssh, serial, whatever).

ConsoleKit is now also used to properly replace pam_console which was just a big steaming pile of s***.

Now, the reason why it spawns 30 threads is because the kernel API for watching ttys (virtual terminals if you will) is a blocking API. So, ConsoleKit has no other choice but to spawn 1 thread for each tty on your system. Almost all of them will be asleep, so this really isn't an issue :)

So, yes, USE="consolekit" globally is a very good idea.
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Thu Oct 08, 2009 9:24 pm    Post subject: Reply with quote

consolekit also wants pam installed, which is aggrevating on a single user system that I have already removed pam years ago. The other day it wanted me to reinstall pam again cause gnumeric wanted consolekit, which wanted pam. I got it remerged, but had to use -consolekit. Doing the same with -pam didn't work and had to play around with it to not install pam, when it wanted to upgrade consolekit. Seems like it is trying to defeat my use of USE Flags.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Thu Oct 08, 2009 9:31 pm    Post subject: Reply with quote

remi2402 wrote:

It's just a small daemon that sits in the background and does nearly nothing. In a nutshell, it just waits for user sessions to register themselves to the daemon. Then, other tools can ask the daemon to list all the currently running sessions on a system and query their types (X session, remote X, local console, remote console via ssh, serial, whatever).


And what are the scenarios when other tools do need that info ? (I am not being sarcastic, just want to judge if any of them are applicable to my setup)
Back to top
View user's profile Send private message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 994

PostPosted: Thu Oct 08, 2009 9:41 pm    Post subject: Reply with quote

Where are the policies on which type of session gets access to what?

For example, someone said that SSH user wouldn't need e.g. access to CD-ROM. I disagree - I happen to have a small laptop that doesn't have a optical disc drive, but my desktop computer has. So if I want to use the DVD drive on the desktop that is sitting right next to the laptop via SSH (using e.g. scp), I bloody well need that access.

I hope it's not in a bunch of XML files like some of the recent stuff Freedesktop.org has been touting...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum