From owner-freebsd-questions@freebsd.org Sun Oct 2 12:54:17 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6562BAD980C for ; Sun, 2 Oct 2016 12:54:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056A7661 for ; Sun, 2 Oct 2016 12:54:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-151-121.dynamic.qsc.de [92.195.151.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id DA358276C3; Sun, 2 Oct 2016 14:45:13 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u92CjDD1002055; Sun, 2 Oct 2016 14:45:13 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 2 Oct 2016 14:45:13 +0200 From: Polytropon To: mexas@bris.ac.uk Cc: freebsd-questions@freebsd.org Subject: Re: recent security updates to 10.3-RELEASE broke xdm? Message-Id: <20161002144513.05902af0.freebsd@edvax.de> In-Reply-To: <201610021000.u92A0Nta016476@mech-as222.men.bris.ac.uk> References: <201610021000.u92A0Nta016476@mech-as222.men.bris.ac.uk> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 12:54:17 -0000 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, ...