You are not logged in.

#1 2011-11-05 14:16:12

erzmel
Member
Registered: 2011-11-05
Posts: 3

Xfce + Slim + Keyrings

Hi!


Yesterday I installed Xfce on my IBM T42 - I've been using GNOME, but I want to try something different; I have only big problem with passwords for wireless connections. I made research, I tried everything what I found on Arch Wiki, forum or even this, but nothing seems to fix my problem. Networkmanager applet can't find or save password.

cat /etc/pam/slim.conf

#%PAM-1.0
auth            requisite       pam_nologin.so
auth            required        pam_env.so
auth            required        pam_unix.so
auth		optional	pam_gnome_keyring.so
account         required        pam_unix.so
password        required        pam_unix.so
session         required        pam_limits.so
session         required        pam_unix.so
session         optional        pam_loginuid.so
session         optional        pam_ck_connector.so
session		optional	pam_gnome_keyring.so	auto_star

cat /etc/pam/passwd

#%PAM-1.0
#password	required	pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
#password	required	pam_unix.so md5 shadow use_authtok
password	required	pam_unix.so md5 shadow nullok
password	optional	pam_gnome_keyring.so

cat ~/.xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
#exec ck-launch-session startx gnome-session
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
	eval `dbus-launch --sh-syntax --exit-with-session`
	echo "D-Bus per-session daemon address is: 
$DBUS_SESSION_BUS_ADDRESS"
fi
eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh)
exec ck-launch-session startxfce4
setxkbmap pl

cat /etc/slim.conf |grep login_cmd

# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec dbus-launch /bin/bash -login ~/.xinitrc %session
# The current chosen session name is replaced in the login_cmd

/var/log/slim.log

** Message: applet now removed from the notification area
** Message: applet now embedded in the notification area
** (nm-connection-editor:1480): WARNING **: nm_connection_list_new: failed to load VPN plugins: Couldn't read VPN .name files directory /etc/NetworkManager/VPN.
** (nm-applet:1458): WARNING **: _nm_object_get_property: Error getting 'Default' for /org/freedesktop/NetworkManager/ActiveConnection/4: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist
** Message: No keyring secrets found for Auto Wireless G Router 523431/802-11-wireless-security; asking user.

But I found something interesting in /var/log/auth.log

Nov  5 15:13:17 myhost gnome-keyring-daemon[996]: couldn't set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files
Nov  5 15:13:17 myhost gnome-keyring-daemon[996]: couldn't set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files
Nov  5 15:13:19 myhost gnome-keyring-daemon[996]: The SSH agent was already initialized
Nov  5 15:13:19 myhost gnome-keyring-daemon[996]: The Secret Service was already initialized
Nov  5 15:13:19 myhost gnome-keyring-daemon[996]: The PKCS#11 component was already initialized

What about the "environment variable"?

EDIT:
I also tried "Launch GNOME Services on startup" in settings.

Thanks for any help!

Last edited by erzmel (2011-11-06 21:11:25)

Offline

#2 2011-11-07 16:09:47

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: Xfce + Slim + Keyrings

I really don't know much or anything about this subject, but I'll just comment on these lines:

eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh)
exec ck-launch-session startxfce4
setxkbmap pl

- I don't have the "eval ... gnome-keyring ..." line in my .xinitrc, only the "exec ck-launch-session startxfce4", and gnome-keyring is launched at startup.
- "setxkbmap pl" will never be executed since it is after "exec ...".

Edit: I'm not using SLIM, I'm autologining (? smile) using the bash_profile method.

Last edited by stqn (2011-11-08 12:24:58)

Offline

#3 2011-11-08 03:23:15

rene
Member
From: the Netherlands
Registered: 2010-08-18
Posts: 31

Re: Xfce + Slim + Keyrings

This seems likely to be a ConsoleKit/Policykit issus. SLiM is broken and doesn't interact with console-kit correctly, even with an explicit ck-launch-session. I'd advice to replace it by LXDM (or GDM, or KDM, ...).

Also see:

https://bbs.archlinux.org/viewtopic.php?id=129851
https://bbs.archlinux.org/viewtopic.php … 2#p1013832

Offline

#4 2011-11-08 18:40:54

erzmel
Member
Registered: 2011-11-05
Posts: 3

Re: Xfce + Slim + Keyrings

Thanks for help.
I've tried LXDM, still not working.
Now keyring doesn't work on GDM+GNOME too. I'm trying to undo any change in configuration, propably I've damaged sth.
Is there any way to remove all important config in GNOME and "reconfig"? The only way I see is to remove GNOME with -Rn option in pacman and install again.

Offline

#5 2011-11-08 19:26:33

rene
Member
From: the Netherlands
Registered: 2010-08-18
Posts: 31

Re: Xfce + Slim + Keyrings

That's unfortunate. It seemed likely to be an authorization issue, which in turn made it likely to involve the incorrect ConsoleKit/PolicyKit use by SLiM.

Note, by the way, that when using LXDM or GDM (either through /etc/inittab or through adding "lxdm" to the DAEMONS line in /etc/rc.conf) your .xinitrc should just "exec startxfce4", or "exec xfce4-session" rather than with an additional ck-launch-session in front: LXDM/GDM does that part itself. In fact, ConsoleKit registration (through the display manager, or through an explicit ck-launch-session) should actually come BEFORE the dbus-launch and, as such, with SLiM that may have been part of the problem. Concentrating on SLiM, I (used to) have, in /etc/slim.conf:

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

and a fully vanilla archlinux .xinitrc consisting of

===
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d  /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

#exec gnome-session
#exec startkde
#exec startxfce4
exec xfce4-session
# ...or the Window Manager of your choice
===

Except the bit about SLiM being broken, such is the idea of the order of things (dbus-launch is launched from a script in /etc/X11/xinit/xinitrc.d/: that's again vanilla arch).

Now, I guess you could try removing the ck-launch-session in the LXDM/GDM case, but I must say I doubt that's actually the problem. It'll probably just be unnecessary but not fatal. I'm also afraid that the opaque nature of GNOME configuration is the probably primary reason that I do not use GNOME. As such, removing it and re-installing like you are suggesting would be my best guess as well. Sorry :-/

Last edited by rene (2011-11-08 19:31:49)

Offline

#6 2011-11-09 19:42:01

erzmel
Member
Registered: 2011-11-05
Posts: 3

Re: Xfce + Slim + Keyrings

It's funny.
After switching to GNOME suddenly keyrings have started working again. So I've run(by GDM) Xfce session and... it's working!
So I changed password to network, connecting again, request for new password, connected, reconnect and... "No keyring secrets found".
It looks like Xfce+nm-applet+gnome-keyring can't save password and I have no idea how make them to do this.
Anyway, great thanks for your posts and help.

Offline

#7 2011-11-09 21:06:43

oboedad55
Member
From: Baku
Registered: 2011-04-05
Posts: 392

Re: Xfce + Slim + Keyrings

If you do decide to go back to SLim you need to put in "dbus-launch" after "ck-launch-session" in your .xinitrc.


Registered Linux user #436067

Offline

Board footer

Powered by FluxBB