[PATCH xinit 1/2] startx: Fix startx picking an already used display number when -nolock is used
Jasper St. Pierre
jstpierre at mecheye.net
Fri Mar 20 10:01:15 PDT 2015
... Why does displayfd imply nolock? That seems strange to me. I consider
the .X0-lock files an API that we shouldn't break.
On Fri, Mar 20, 2015 at 7:02 AM, Hans de Goede <hdegoede at redhat.com> wrote:
> Currently startx relies on /tmp/.X?-lock being present for automatically
> picking a free display number. This does not work if -nolock is used when
> starting the server, or if the server is started with -displayfd as
> -displayfd
> implies -nolock.
>
> This is becoming a problem now that -displayfd is getting used by
> display-managers (e.g. gdm), this fixes this by also checking for
> /tmp/.X11-unix/X?
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> startx.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/startx.cpp b/startx.cpp
> index 8520399..fe49996 100644
> --- a/startx.cpp
> +++ b/startx.cpp
> @@ -120,7 +120,7 @@ enable_xauth=1
> XCOMM Automatically determine an unused $DISPLAY
> d=0
> while true ; do
> - [ -e /tmp/.X$d-lock ] || break
> + [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break
> d=$(($d + 1))
> done
> defaultdisplay=":$d"
> --
> 2.3.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
--
Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150320/a8428b34/attachment-0001.html>
More information about the xorg-devel
mailing list