Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260842 - sys-auth/consolekit: session not being created
Summary: sys-auth/consolekit: session not being created
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-02 10:30 UTC by James Le Cuirot
Modified: 2009-06-11 23:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2009-03-02 10:30:09 UTC
Decided to give this a bug report of its own. When I log in, either via the console or via X (slim), no ConsoleKit session gets started. I have to start one manually with ck-launch-session. consolekit is definitely installed. pambase is built with the consolekit USE flag. /var/run/console also exists and a file does get created in there when I start a session. I have the following line in /etc/pam.d/system-local-login, as was added by Portage.

session		optional	pam_ck_connector.so

PAM is definitely active because I get this in my logs.

Feb 28 11:53:34 [login] pam_unix(login:session): session opened for user chewi
by LOGIN(uid=0)

Anything else I can check? Here's my info.

Portage 2.2_rc23 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Sat, 28 Feb 2009 16:15:02 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.3.8
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.virginmedia.com http://distro.ibiblio.org/pub/linux/distributions/gentoo http://gentoo.osuosl.org"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/cwiid /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="16bit 3ds 7zip S3TC X X509 Xaw3d a52 aac aalib acpi aften aim allegro alsa amd amd64 amr amrnb amrwb async audiofile autoipd avahi bash-completion bcp berkdb bjam blender-game bluetooth bogofilter boost branding bzip2 cairo cap cardbus ccache cdda cddb cdio cdparanoia cdr cdrom cegui cg cgi chardet cli console consolekit cracklib crosscompile crypt cscope css ctype cups curl dba dbus dc1394 devil dhcp dillo directfb divx dri dso dts dv dvb dvd dvdnav dvdr dvdread effects emoticon enca encode exif fam fastcgi fat fb fbcon fbcondecor fbdev fbsplash ffmpeg fftw filter firefox flac fluidsynth fmod fontconfig ftp fuse fusion gd gdbm gif gimp gimpprint gkrellm glitz glut gnutls gphoto2 gpm gs gsl gtk hal hddtemp iconv icq id3 id3tag ieee1394 ilbc image imagemagick imap imlib inkjar isdnlog islsm_2.5.8.0 ithreads jabber jack jack-tmpfs java5 java6 javascript jdbc4 jfs joystick jpeg jpeg2k json kqemu ladcca ladspa lame libffi libsamplerate libvisual lighttpd lirc live lj lm_sensors lufsusermount lzo m17n-lib mad maildir mbox mbrola md5sum mdnsresponder-compat midi mikmod ming mmap mmx mmxext mng mod modplug mozbranding moznocompose moznoirc moznomail mozp3p mozsvg mp2 mp3 mpeg mpeg2 mpeg4 mplayer msn mudflap multilib musepack music mysql mysqli ncurses network nfs no-seamonkey nocd nptl nptlonly nsplugin ntfs offensive ogg openal opengl pam pcre pdf png pnm posix ppds pppd qmax qt3support qt4 quicktime rar readline realmedia reflection reiserfs rtc rtsp ruby samba sasl scanner scenarios scrobbler sdl sdl-image sdl-sound sdlaudio session sha512 simplexml skins slang smp sndfile soap sockets socks5 sound soundex sounds soundtouch sox spamassassin speex spell spl sse sse2 sse3 ssl ssse3 startup-notification stream subversion svg svgz sysfs sysvipc textures tga theora threads tiff timidity tordns transparent-proxy truetype type1 uk_rt unicode unzip upnp usb userlocales utf8 v4l v4l2 vcd vhosts videos vnc vncviewer vorbis wideband wifi wma wmf wmp wxwindows x264 xanim xattr xcb xchattext xcomposite xext xface xfs xft xml xorg xosd xpm xprint xrandr xscreensaver xsl xulrunner xv xvid xvnc yahoo zip zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="all" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-02 14:29:03 UTC
is /etc/X11/xinitrc/xinitrc.d/*consolekit chmod +x ?
Comment 2 James Le Cuirot gentoo-dev 2009-03-02 14:38:26 UTC
I think you meant /etc/X11/xinit/xinitrc.d/*consolekit but yes, I've already done that. I'm not sure if that's necessary anyway since I'm using PAM?
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-02 15:05:40 UTC
if you're using pam integration then that script needs to be -x or add nox11 to the pam line (that's a new option taken from a debian patch). All you need to know is if your login manager actually goes through pam stack and reaches pam_ck_connector.
Comment 4 James Le Cuirot gentoo-dev 2009-03-03 11:53:19 UTC
I've tried with that script both executable and not executable. Neither works. I forgot to mention that I have the consolekit daemon starting on boot so it's not that either.

I tried adding the debug option to pam_ck_connector.so. That didn't seem to do anything but then I remembered that I probably need to build it with debug enabled. I did that and I still don't seem to be getting any messages from the connector but it did highlight a different problem with the daemon init script. The pid path is wrong. It's currently /var/run/consolekit.pid when it should be /var/run/ConsoleKit/pid. Maybe this changed in 0.3.0.

It's still not working though. I continue to try from both the console and X. I'm starting to wonder if PAM is even using system-local-login at all. Is there are reason why it might not be? This is what's in the file now. I've never made any changes to the PAM files beyond what Portage does.

auth		include		system-login
account		include		system-login
password	include		system-login
session		optional	pam_ck_connector.so debug
session		include		system-login
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-03 13:27:07 UTC
like I said, it depends on your login manager. For some reason in gdm we are using system-login, not local. iirc that's because gdm can be used from a remote host via xdmcp. But in any case I believe gdm talks to CK directly so that's why it's not in the pam file of gdm. Currently it looks like gnome-screensaver is the only one that uses system-local-login.

I remember there was some thread on hal mailing list about where to place pam_ck_connector in fedora. I'll try to paste it here.
Comment 6 James Le Cuirot gentoo-dev 2009-03-03 13:35:11 UTC
Okay, I wouldn't be surprised if slim was getting this wrong but what about the console? I'm just using plain old agetty there and that should work, right?
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-03-03 13:45:13 UTC
it's all explained in the thread I need to find, that we in gentoo don't place ck-connector in the right place :)
for your situation, you should try placing the line in slim's pam file and it should just work then.
Comment 8 James Le Cuirot gentoo-dev 2009-03-20 16:26:49 UTC
Is this the thread you were referring to?

http://lists.freedesktop.org/archives/hal/2007-September/009525.html

I actually meant that I was running ck-list-sessions from the console. I wasn't calling startx or xinit or whatever. This stuff doesn't just apply to X so why wouldn't placing pam_ck_connector in system-local-login start a session when just logging it at the console?
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-04-29 08:31:06 UTC
adding pambase maintainer so we can discuss changes to be done.

On first tought, pam_ck_connector should be moved to system-auth so logins through gdm, login and ssh for example are caught.

Also we changes I made to consolekit-0.3, we should add a nox11 options to the pam parameters since it will be handled by a xinit script.
Comment 10 James Le Cuirot gentoo-dev 2009-04-29 09:13:31 UTC
I actually just switched to gdm because slim was giving me grief and now it works but I still think it should work when logging in at the console. The world doesn't revolve around gdm or even X.
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-29 13:59:16 UTC
I just came home so I'm not checking this throughout yet, but system-auth is _not_ what you want for login, gdm, ssh, system-login is.

You need remote logins too?
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-04-29 15:04:07 UTC
Any login should be caught, not stuff that happens through cron maybe but everything else that is interactive. We might have more than a few packages not respecting the new pambase which led me to think it should land in system-auth even though system-login sounds more appropriate.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-29 15:05:53 UTC
Interactive stuff goes through -login, -auth is used for cron, services, mail and other crap :P

I'll see if I can roll out a new pambase tonight.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-30 16:32:10 UTC
I've committed a new pambase with pam_ck_connector in system-login. Enjoy!
Comment 15 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-06-11 23:02:25 UTC
changed consolekit xinit script to be +x by default without a bump. Should fix the consolekit side of things for people not having a graphical login manager speaking to consolekit directly.

Feel free to reopen if those changes does not fix things for you.