From owner-freebsd-questions@freebsd.org Sun Sep 4 17:22:59 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 39C9DB711BD for ; Sun, 4 Sep 2016 17:22:59 +0000 (UTC) (envelope-from doug@safeport.com) Received: from bucksport.safeport.com (bucksport.safeport.com [198.74.231.101]) (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 10C5D948 for ; Sun, 4 Sep 2016 17:22:58 +0000 (UTC) (envelope-from doug@safeport.com) Received: from bucksport.safeport.com (bucksport.safeport.com [198.74.231.101]) by bucksport.safeport.com (8.14.5/8.14.5) with ESMTP id u84HMsH1094289; Sun, 4 Sep 2016 13:22:54 -0400 (EDT) (envelope-from doug@safeport.com) Date: Sun, 4 Sep 2016 13:22:54 -0400 (EDT) From: doug@safeport.com To: Polytropon cc: freebsd-questions@freebsd.org Subject: Re: xdm does not work with xfce In-Reply-To: <20160904171306.4a17bb37.freebsd@edvax.de> Message-ID: References: <20160904171306.4a17bb37.freebsd@edvax.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (bucksport.safeport.com [198.74.231.101]); Sun, 04 Sep 2016 13:22:54 -0400 (EDT) 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, 04 Sep 2016 17:22:59 -0000 On Sun, 4 Sep 2016, Polytropon wrote: > On Sun, 4 Sep 2016 03:29:36 -0400 (EDT), doug@safeport.com wrote: >> To get xdm to work I copied /usr/local/etc/X11/xinit/xinitrc to $home/.xinitrc. >> I have a .xsession file contining startxfce4. I commented out the last line in >> /usr/local/lib/X11/xdm/xdm-config. > > The xdm display manager does not use .xinitrc, it only uses .xsession. > Only if you "starx", .xinitrc will be considered. For "maximum compatibility" > you can use a "cascade" like this: > > File .xsession: > > #!/bin/csh > source ~/.cshrc > exec ~/.xinitrc > > File .xinitrc: > > #!/bin/sh > [ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc > numlockx > # ... more "autostart" stuff if needed ... > exec startxfce4 > > Now all your settings can reside in .xinitrc, and when you use xdm, they will > still be executed. The last line must start with "exec". After the program > specified here exits, control should be given back to xdm. > > Note that this example assumes you have the C shell as your dialog shell, > so all their settings (from .cshrc) will be "inherited" in shells started > inside X. > > > >> I have output from xsession-errors and xdm.log. After the second login attempt >> .xsession-error is rewriten to contain: >> >> /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. >> >> xdm works on a 10.1 system with xorg-7.7_1 and xfce-4.12_1. >> >> My questions: Is this a known issue? Should this be posted on the X11 >> mailing list? > > Somehow this error looks familiar to me, it occured once many years ago. > The Xfce desktop cannot be started because xdm still occupies the display. > This situation may rise when you start xdm manually, it does not quit > properly, or several X "occupants" start at the same time. Thank you I will try this. It's maddening actually. I 'fixed' this for my 10.1 system but can not find any notes. Comparing /usr/local/lib/X11 and /usr/local/etc/X11/ finds no differences. My memory is that I assigned a display other than :0 to the login but the logs say differently. As to .xinitrc not doing anything, not so in my install. If I delete the file I get no logins, with it there I get one. This is with starting xdm from /etc/ttys. A lot has changed going from 10.1 and xorg_1 to 10.3 and _2, my .xsession file in the older version: #!/bin/sh /usr/bin/ssh-agent /usr/local/bin/startxfce4 In _2 that gets an error saying ssh-agent is already running. If I start xdm manually things are almost random. 'killall xdm' sometimes gives more logins, sometimes not. Sometimes clearing out dbus and xauth stuff works but more often, not. I spent a lot of time with man X and man X with no grand upgrading of my understanding. My conclusion at this point, there is an error resulting in :0 being left in a "it's being used" state. So in 10.1 I can login and out but can not switch consoles, in 10.3 that switches. I would rather have the later and can always start from userland. As always, thank you for your suggestions, Doug _____ Douglas Denault http://www.safeport.com doug@safeport.com Voice: 301-217-9220 Fax: 301-217-9277