recent security updates to 10.3-RELEASE broke xdm?
Polytropon
freebsd at edvax.de
Sun Oct 2 12:54:17 UTC 2016
On Sun, 2 Oct 2016 11:00:23 +0100 (BST), Anton Shterenlikht wrote:
> This is an amd64 laptop.
> After updating to:
>
> # /bin/freebsd-version -ku
> 10.3-RELEASE-p7
> 10.3-RELEASE-p9
>
> My xdm doesn't want to login me anymore.
> As soon as I enter the passwd, xdm reboots
> and presents me with the login prompt again.
Can you start X without using XDM (i. e., by "startx")?
> I see this in .xsession-errors:
>
> Protocol not supported by server
> Couldn't connect to :0
> Protocol not supported by server
> mwm: Could not open display.
> Protocol not supported by server
This often points to a general X error, like if X wasn't started
at all, or the programs cannot connect to an existing display
because of the wrong permissions (xhost-related). I'm using xdm
myself and I think I encountered this kind of error once, many
years ago, but sadly I cannot remember what it actually was about.
But maybe here is some "guesswork" to help. :-)
> DBUS_SESSION_BUS_ADDRESS='unix:path=/tmp/dbus-dEtC0CeeXH,guid=f1d367e2b8c81e06b0
> b3ce7257f0d422';
> export DBUS_SESSION_BUS_ADDRESS;
> DBUS_SESSION_BUS_PID=1555;
> D-Bus per-session daemon address is:
No idea about the DBus part, I'm not using it, never did.
> My .xsession script is:
>
> xautolock -locker slock &
> mwm
>
> # test for an existing bus daemon, just to be safe
> if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
> # if not found, launch a new one
> eval 'dbus-launch --sh-syntax --exit-with-session'
> echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
> fi
>
> Am I out of date?
No, but I think there is something wrong with the order of
the programs called, and I miss the "exec" statement. In my
experience, the last line should be the one calling the
window manager (or the program which you want to be "in
control" of the session - when it exits, the session quits).
So "exec mwm" should be the last line of that file.
Maybe you can try this:
xautolock -locker slock &
# test for an existing bus daemon, just to be safe
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
# if not found, launch a new one
eval 'dbus-launch --sh-syntax --exit-with-session'
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
fi
exec mwm
If you also want to try the "without xdm approach" I mentioned
earlier, you can create a simple "startx cascade" which enables
you to use both xdm (automatic session start) and "startx" (manual
session start) without having to maintain two startup files:
This is the ~/.xsession file you need:
#!/bin/csh
source ~/.cshrc
exec ~/.xinitrc
And then put the 8 lines listed above into ~/.xinitrc.
Now you can temporarily disable xdm, login with your user name,
and then run "startx" to check. If it works, re-enable xdm, and
then login at the X display. Login should then perform normally.
I'm not fully sure if it is urgently neccessary, but make both
files executable (chmod +x ~/.xinitrc ~/.xsession).
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list