I am experiencing the same problem like here: http://mail.xfce.org/pipermail/xfce/2012-March/030209.html. When I try to start XFCE from the xdm log in screen it always switches back to the screen and does not log me in. When I start it from startx I am able to log in like normal.
I get the same error message in .xsession-errors like the reporter from the mailing list:
/usr/bin/startxfce4: X server already running on display :0
XDM authorization key matches an existing client!xfce4-session: Can not open display: .
Type 'xfce4-session --help' for usage.
On FreeBSD 9.0-RELEASE-p1 couldn't start Xfce 4.10 from xdm. Symptoms as described in this bug. Reverting to xinitrc from 4.8 worked for me too. Investigated and found that dbus launch was no longer being done prior to starting xfce4-session. This patch moves dbus launch back to where it was in 4.8. It works for me with xdm. Not tested with any other X login manager.
Patch 4477, "xinitrc: Move dbus launch back before xfce4-session start (like in 4.8)": xinitrc.4.10.diff
Yes, the patch to xinitrc only masks the problem with session detection for xdm in xfce4-session but it provides a means of getting xdm users working on 4.10.
Messing with the internals of xfce4-session are beyond my present capability but I would gladly test any patches to xfce4-session which would help to find the cause of the failed detection.
I'd really like to help track this down. Every time I install xfce4 on a machine I have to patch xinitrc so that folks can login via xdm. The symptoms are always exactly as reported by Daniel.
Can a programmer tell me what I need to type into the C code - and where - to provide some additional logging or diagnostic output that might help?
Are you guys using xdm patched with internal consolekit support? Gentoo,
Arch and SuSE at least are using it:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-apps/xdm/files/
xdm-consolekit.patch?view=log
I bet using a display manager with internal CK support is the solution here,
every DM has such support except XDM which needs a patch
Well I USE Gentoo and I am not able to log in without reverting the order in xinitrc.
Are you guys using xdm patched with internal consolekit support? Gentoo,
Arch and SuSE at least are using it:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-apps/xdm/files/
xdm-consolekit.patch?view=log
I bet using a display manager with internal CK support is the solution here,
every DM has such support except XDM which needs a patch
Well I USE Gentoo and I am not able to log in without reverting the order in
xinitrc.
I've tested it myself to be working as I've patched Gentoo's XDM, maintain ConsoleKit and Xfce ...
I guess I'll retest again, but I bet it's a configuration problem, like missing USE="consolekit" or you forgot something like ck-launch-session/dbus-launch accidentally in /etc/X11/Sessions/Xfce or ~/.x{initrc,session} since those shouldn't be there anymore since the USE="consolekit" covers all that
Are you guys using xdm patched with internal consolekit support? Gentoo,
Arch and SuSE at least are using it:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-apps/xdm/files/
xdm-consolekit.patch?view=log
I bet using a display manager with internal CK support is the solution here,
every DM has such support except XDM which needs a patch
Well I USE Gentoo and I am not able to log in without reverting the order in
xinitrc.
I've tested it myself to be working as I've patched Gentoo's XDM, maintain
ConsoleKit and Xfce ...
I guess I'll retest again, but I bet it's a configuration problem, like
missing USE="consolekit" or you forgot something like
ck-launch-session/dbus-launch accidentally in /etc/X11/Sessions/Xfce or
~/.x{initrc,session} since those shouldn't be there anymore since the
USE="consolekit" covers all that
I have consolekit globally enabled in make.conf, there are no traces of ck-launch-session/dbus-launch in /etc/X11/Sessions/Xfce and I don't use /.x{initrc,session}.
I have a patch from a guy named Fred in /usr/local/etc/xdg/xfce4/xinitrc for xfce 4.12 installed Tue Apr 12 20:28:52 EDT via pkg. This change is incorporated in xfce 4.12 installed Fri Sep 2 01:14:35 2016 EDT. xorg xorg-7.7_2, xdm 1.1.11_3, and xfce 4.12_1 are the same levels but clearly xfce is not exactly the same as xinitrc is different.
In FreeBSD 10.1 logging in and out works. Console switching (ctrl+alt+f1) does not. In FreeBSD 10.3 the first login after a reboot starting xfce from /etc/ttys always works. Subsequent logins fail. Starting xdm manually produces random results but generally the first login works. My.xsession file in 10.1 is
'/usr/bin/ssh-agent /usr/local/bin/startxfce4' in 10.3 '/usr/local/bin/startxfce4' because I get an error saying ssh-agent is already running. Both are sh scripts.
The error in .xsessions-errors:
/usr/local/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.
I am not running hald or dbusd in either system. I am happy to test fixes and/or provide any additional information. The 10.3 is an out-of-the-box system and fails reliably. Unless this is a timing issue it should be easy to produce. This may be FreeBSD only error as I can not find anything from the last few months on this. I do not see anything useful in the logs but that probably way beyond I knowledge
I don't think this is an issue any more. Many things around this issue have changed since. Especially with consolekit being phased out in favour of other solutions.