LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   14.0-BETA1 - XDM authorization key matches an existing client!xfce4-session (http://www.linuxquestions.org/questions/slackware-14/14-0-beta1-xdm-authorization-key-matches-an-existing-client-xfce4-session-4175418231/)

GazL 07-23-2012 08:06 AM

14.0-BETA1 - XDM authorization key matches an existing client!xfce4-session
 
Found a bug with 14.0 BETA1: The xinitrc-xfce when started from xdm fails to login and .xsession-errors contains:
Code:

/usr/bin/startxfce4: X server already running on display :0
XDM authorization key matches an existing client!xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.


A quick google finds this unresolved upstream bug which seems to indicate that xfce4-session is failing to launch dbus/consolekit sessions correctly.
https://bugzilla.xfce.org/show_bug.cgi?id=8841

As a work around, I found that replacing the new (minimal) /etc/X11/xinit/xinitrc.xfce with a more "traditional" script along the lines of the following gets things working again.:
Code:

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                    ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

[ -f $sysresources ] && /usr/bin/xrdb -merge $sysresources
[ -f $sysmodmap ] && /usr/bin/xmodmap $sysmodmap
[ -f $userresources ] && /usr/bin/xrdb -merge $userresources
[ -f $usermodmap ] && /usr/bin/xmodmap $usermodmap


########################################################################
##  Start DBUS session bus                                            ##
########################################################################

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
  eval `dbus-launch --sh-syntax --exit-with-session`
fi


########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
    exec ck-launch-session /usr/bin/startxfce4
else
    exec /usr/bin/startxfce4
fi


########################################################################

Gotta love ConsoleKit: an over-complicated solution to a problem no one had! :(


P.S, while were on the subject of launching X from xdm,
/etc/skel/.xsession ought to be removed from the etc package. It's an incomplete and non-functional .xsession file, that seems to contain a bit of gpg2 shell code but nothing to do with Xsessions. As luck would have it /etc/X11/xdm/Xsession checks for execute permissions before running ~/.xsession so it is just ignored and doesn't do any harm, but it ought to be cleaned-up.


Would have emailed Pat about these, but my ISP has mistakenly disabled my email address and it's going to take "up to 5 days" to get it back. :banghead:

edit: nuts! How'd this end up in general. Please could a passing mod move it to slackware. thankyou.

GazL 07-23-2012 12:03 PM

Update:

USB flashdrives are failing to automount via thunar after doing the above. So whatever problem there are with the fluxbox and other minimal environments running thunar, it is also affecting starting xfce this way (not surprising since it's more or less exactly how the other environments have been done for years.

So, I've not managed to get a fully working xfce environment yet. :(

volkerdi 07-23-2012 12:17 PM

Probably nothing this simple, but I found here that on an upgraded system udisks2 doesn't kick in until after a reboot.

sahko 07-23-2012 01:02 PM

Indeed, i got that error too while trying to figure out whats wrong with nm-applet. I can confirm XDM doesnt start XFCE here either.

GazL 07-23-2012 01:23 PM

Got there in the end. It seems you need to start dbus within the console-kit session.

This is working for me now. :)

Code:

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                    ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

[ -f $sysresources ] && /usr/bin/xrdb -merge $sysresources
[ -f $sysmodmap ] && /usr/bin/xmodmap $sysmodmap
[ -f $userresources ] && /usr/bin/xrdb -merge $userresources
[ -f $usermodmap ] && /usr/bin/xmodmap $usermodmap


########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
    exec ck-launch-session dbus-launch /usr/bin/startxfce4
else
    exec dbus-launch /usr/bin/startxfce4
fi


########################################################################



All times are GMT -5. The time now is 12:17 AM.