tce-load -i git curl automake libtool-dev intltool gettext-dev dbus-glib-dev linux-pam-dev polkit-dev git clone https://github.com/ConsoleKit2/ConsoleKit2 cd ConsoleKit2 patch -Np1 -i ../ConsoleKit-0.4.6.patch ./autogen.sh CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib/ConsoleKit --enable-pam-module --with-pam-module-dir=/usr/local/lib/security find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \; make sudo make install cat >> /usr/local/etc/pam.d/system-session << "EOF" # Begin ConsoleKit addition session optional pam_loginuid.so session optional pam_ck_connector.so nox11 # End ConsoleKit addition EOF cat > /usr/local/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck << "EOF" #!/bin/sh TAGDIR=/var/run/console [ -n "$CK_SESSION_USER_UID" ] || exit 1 [ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0 TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" if [ "$1" = "session_added" ]; then mkdir -p "$TAGDIR" echo "$CK_SESSION_ID" >> "$TAGFILE" fi if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" [ -s "$TAGFILE" ] || rm -f "$TAGFILE" fi EOF sudo chmod 755 /usr/local/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck ConsoleKit 0.9.2 ======================== prefix: /usr/local exec_prefix: ${prefix} libdir: ${exec_prefix}/lib bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/sbin sysconfdir: ${prefix}/etc localstatedir: /var rundir: /var/run datadir: ${datarootdir} source code location: . compiler: gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe cflags: -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2 -g -O2 -Wno-strict-aliasing -Wno-sign-compare debug cflags: -DG_ENABLE_DEBUG Base libs: -L/usr/local/lib -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0 Tools libs: -L/usr/local/lib -lX11 -lglib-2.0 Maintainer mode: no dbus-1 system.d dir: ${prefix}/etc/dbus-1/system.d Build backend: linux PAM module dir: /usr/local/lib/security Build PAM module: yes Build udev-acl: no Build docs: no xinitrc dir: ${prefix}/etc/X11/xinit/xinitrc.d PolicyKit support yes RBAC (Solaris) support: no