anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#1
Finally found the fix to password/keyring not being stored when opening root apps via gksu.

# apt-get install libpam-gnome-keyring

Edit: Hmm, it works if gdm is installed and used as default login manager.

I think I have found a fix. See later post.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#2
anti, I'm not sure why, since I have Xfce also, but the keyring is stored fine in my antiX Sid. I noticed it doesn't work in my 'stock' antiX.
Today I set my ~/.icewm/startup file to load gnome-keyring-daemon to see if it would solve it but haven't booted into it yet to check.

-edit- now thinking better, in my antiX Sid I don't use ~/.xinitrc to load the X session. I use the default Debian Xsession setup. I must look into /etc/X11/Xsession.d to see what starts.
Maybe 75dbus_dbus-launch?

Code: Select all

# $Id:$
# In order to activate the session bus at X session launch
# simply place use-session-dbus into your /etc/X11/Xsession.options file
#

STARTDBUS=
DBUSLAUNCH=/usr/bin/dbus-launch

if has_option use-session-dbus; then
  if [ -x"$DBUSLAUNCH" ]; then
    STARTDBUS=yes
  fi
fi

if [ -n"$STARTDBUS" ]; then
  STARTUP="$DBUSLAUNCH --exit-with-session $STARTUP"
fi
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#3
Yep, the gnome-keyring-daemon doesn't make any difference (not started from icewm at least).
Either the sid version is working which I suspect isn't the issue because you have antiX sid as well or most probably the ~/.xinitrc isn't supplying the same functionalities as /etc/X11/Xsession.

/etc/X11/Xsession.d/90consolekit

Code: Select all

# -*- sh -*-
# Xsession.d script for ck-launch-session.
#
#
# This file is sourced by Xsession(5), not executed.

CK_LAUNCH_SESSION=/usr/bin/ck-launch-session

is_on_console() {
    session=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \
        --type=method_call --print-reply --reply-timeout=2000 \
        /org/freedesktop/ConsoleKit/Manager \
        org.freedesktop.ConsoleKit.Manager.GetCurrentSession \
        | grep path | awk '{print $3}' | sed s/\"//g)
    x11_display=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \
        --type=method_call --print-reply --reply-timeout=2000 \
        $session org.freedesktop.ConsoleKit.Session.GetX11Display \
        | grep string | awk '{print $2}' | sed s/\"//g)

    if [ -z"$x11_display" ] ; then
        return 0
    else
        return 1
    fi
}

# gdm already creates a CK session for us, so do not run the expensive D-Bus
# calls if we have $GDMSESSION
if [ -z"$GDMSESSION" ] && [ -x"$CK_LAUNCH_SESSION" ] && \
 ( [ -z"$XDG_SESSION_COOKIE" ] || is_on_console ) ; then
    STARTUP="$CK_LAUNCH_SESSION $STARTUP"
fi
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#4
Just to confirm: I purged and re-installed slim and gksu keyring works.

Just re-installing slim I think doesn't replace the init script that in antiX sets it to start at level 5, instead of 2 3 4 5. But I don't know if that makes any difference in the keyring workings.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#5
Ok, the issue is with how /etc/slim.conf is set up in antiX.

We have this line:

Code: Select all

login_cmd           exec /bin/bash -login ~/.xinitrc %session
and the one that works is:

Code: Select all

login_cmd          exec /bin/bash -login /etc/X11/Xsession %session
As antiX needs the .xinitrc file, anyone know how to get gksu keyring and .xinitrc working together?
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#6
Why does it need it? There are the rox pinboard sessions but that could be set up some other way. Is there something else?
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#7
Found the solution!

Edit /etc/slim.conf to have this login_cmd line.

Code: Select all

login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1 
Posts: 516
oldhoghead
Site Admin
Joined: 01 Oct 2007
#8
Ok,

I can confirm it does work, nice job anti!!

cheers,
oldhoghead
Posts: 609
dark-D
Joined: 02 Jun 2008
#9
works here as well and without libpam-gnome-keyring. great work anti.