public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* remote xterm's can't open display after upgrade
@ 2014-12-11 18:31 Don Webster
  2014-12-11 19:14 ` Jon TURNEY
  2014-12-12 19:55 ` JimE
  0 siblings, 2 replies; 6+ messages in thread
From: Don Webster @ 2014-12-11 18:31 UTC (permalink / raw)
  To: cygwin-xfree

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

I needed to upgrade gs to gs 9.15, so I ran setup yesterday. It wanted to update a whole bunch of stuff, including X. OK, fine, I hadn't updated cygwin in quite a while, and I had other stuff to do. 

After the upgrade, I can't display remote xterms. OK, my old X shortcut didn't work, but I found "XWin Server" and pinned it to my task bar. I launch that and I have the X server running, and a local xterm pops up. I ssh into my linux server, and run my xterm, and get "can't open display". I did these steps. 

- turned off my Windows Firewall (I am on a safe, local network). 
- launched XWin Server. 

In the xterm that popped up: 
dcw@dcwdt02 ~ 
$ xhost + 
access control disabled, clients can connect from any host 

dcw@dcwdt02 ~ 
$ ssh centos6 
Last login: Wed Dec 10 16:31:16 2014 from dcwdt02 
centos6% setenv DISPLAY 10.11.22.33:0.0    # I use tcsh 
centos6% xterm 
xterm Xt error: Can't open display: 10.11.22.33:0.0 
centos6% 

Is there something obvious? 

Note: when run xterm with the firewall off, the error is immediate. when I do it when the firewall is on, there is a delay before I get the error. 

This was all working on Monday with my older version of cygwin-x, which I think was a 2011 vintage. (I don't upgrade stuff very often for this very reason.) 

Attached is my log. 

Any help is appreciated. In general, I love cygwin and cygwin-x; it is awesome for a 25-year unix jock like me. 

don..

[-- Attachment #2: XWin.0.log --]
[-- Type: application/octet-stream, Size: 3678 bytes --]

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.16.2.0
OS: CYGWIN_NT-6.1-WOW64 dcwdt02 1.7.33-2(0.280/5/3) 2014-11-13 15:45 i686
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (WoW64)
Package: version 1.16.2-1 built 2014-11-11

XWin was started with the following command line:

/usr/bin/XWin :0 -multiwindow -nolisten tcp -auth 
 /home/dcw/.serverauth.6904 

ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 1280 h 1024
winInitializeScreenDefaults - native DPI x 96 y 96
[  4143.152] (II) xorg.conf is not supported
[  4143.152] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[  4143.152] LoadPreferences: /home/dcw/.XWinrc not found
[  4143.152] LoadPreferences: Loading /etc/X11/system.XWinrc
[  4143.152] LoadPreferences: Done parsing the configuration file...
[  4143.183] winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
[  4143.199] winDetectSupportedEngines - Returning, supported engines 00000015
[  4143.199] winSetEngine - Multi Window or Rootless => ShadowGDI
[  4143.199] winScreenInit - Using Windows display depth of 32 bits per pixel
[  4143.199] winAllocateFBShadowGDI - Creating DIB with width: 2560 height: 1024 depth: 32
[  4143.199] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[  4143.199] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[  4143.199] MIT-SHM extension disabled due to lack of kernel support
[  4143.214] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[  4143.214] glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll'
[  4143.339] GL_VERSION:     3.3.0
[  4143.339] GL_VENDOR:      NVIDIA Corporation
[  4143.355] GL_RENDERER:    GeForce 210/PCIe/SSE2
[  4143.355] (II) AIGLX: enabled GLX_SGI_make_current_read
[  4143.355] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[  4143.355] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[  4143.355] (II) AIGLX: enabled GLX_SGIX_pbuffer
[  4143.355] (II) AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample
[  4143.355] (II) 450 pixel formats reported by wglGetPixelFormatAttribivARB
[  4143.355] (II) AIGLX: Set GLX version to 1.4
[  4143.355] (II) 297 fbConfigs
[  4143.355] (II) ignored pixel formats: 0 not OpenGL, 54 RBGA float, 63 RGBA unsigned float, 0 unknown pixel type, 36 unaccelerated
[  4143.355] (II) GLX: Initialized Win32 native WGL GL provider for screen 0
[  4143.480] winPointerWarpCursor - Discarding first warp: 1280 512
[  4143.480] (--) 3 mouse buttons found
[  4143.480] (--) Setting autorepeat to delay=500, rate=31
[  4143.480] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[  4143.480] (--) Found matching XKB configuration "English (USA)"
[  4143.480] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[  4143.480] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[  4143.480] winInitMultiWindowWM - DISPLAY=:0.0
[  4143.480] winMultiWindowXMsgProc - DISPLAY=:0.0
[  4143.526] winProcEstablishConnection - winInitClipboard returned.
[  4143.526] winClipboardThreadProc - DISPLAY=:0.0
[  4143.526] OS maintains clipboard viewer chain: yes
[  4143.526] winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
[  4143.526] winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
[  4143.526] winClipboardProc - XOpenDisplay () returned and successfully opened the display.
[  4143.854] winMultiWindowXMsgProcErrorHandler - ERROR: BadMatch (invalid parameter attributes)

[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: remote xterm's can't open display after upgrade
  2014-12-11 18:31 remote xterm's can't open display after upgrade Don Webster
@ 2014-12-11 19:14 ` Jon TURNEY
  2014-12-11 21:16   ` Don Webster
  2014-12-12 22:03   ` J. Offerman
  2014-12-12 19:55 ` JimE
  1 sibling, 2 replies; 6+ messages in thread
From: Jon TURNEY @ 2014-12-11 19:14 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: paxguy

On 11/12/2014 18:31, Don Webster wrote:
> I needed to upgrade gs to gs 9.15, so I ran setup yesterday. It
> wanted to update a whole bunch of stuff, including X. OK, fine, I
> hadn't updated cygwin in quite a while, and I had other stuff to do.
>
> After the upgrade, I can't display remote xterms. OK, my old X
> shortcut didn't work, but I found "XWin Server" and pinned it to my
> task bar. I launch that and I have the X server running, and a local
> xterm pops up. I ssh into my linux server, and run my xterm, and get
> "can't open display". I did these steps.
>
> - turned off my Windows Firewall (I am on a safe, local network). -
> launched XWin Server.
>
> In the xterm that popped up:
> dcw@dcwdt02 ~
> $ xhost +
> access control disabled, clients can connect from any host
>
> dcw@dcwdt02 ~
> $ ssh centos6
> Last login: Wed Dec 10 16:31:16 2014 from dcwdt02
> centos6% setenv DISPLAY 10.11.22.33:0.0    # I use tcsh
> centos6% xterm
> xterm Xt error: Can't open display: 10.11.22.33:0.0
> centos6%
>
> Is there something obvious?

https://cygwin.com/ml/cygwin-xfree/2014-11/msg00029.html

The relevant part is "startx and startxwin now pass '-nolisten tcp' to 
the server by default, which increases security in the X server by not 
opening a port to TCP connections. The '-listen' flag can be passed as a 
server argument to override this."

Your choices are to add the '-listen' flag to the startxwin invocation, 
or (better) to use 'ssh -Y' and not explicitly set DISPLAY (See 
http://x.cygwin.com/docs/ug/using-remote-apps.html#using-remote-apps-ssh)

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: remote xterm's can't open display after upgrade
  2014-12-11 19:14 ` Jon TURNEY
@ 2014-12-11 21:16   ` Don Webster
  2014-12-12 22:03   ` J. Offerman
  1 sibling, 0 replies; 6+ messages in thread
From: Don Webster @ 2014-12-11 21:16 UTC (permalink / raw)
  To: cygwin-xfree

Jon,

That worked! Thank you! Your awesomeness is awesome.

I just edited /usr/bin/startxwin to have:
#listenarg="-nolisten tcp"listenarg=""

I think you were suggesting a more elegant solution, that I didn't grasp.

I don't know if this is worthy of adding to the Upgrade section of the FAQ, because I did look there (and several other places) before posting in this forum.

Thanks again. You're the best.

don..



----- Original Message -----
From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-xfree@cygwin.com
Cc: paxguy@yahoo.com
Sent: Thursday, December 11, 2014 2:14 PM
Subject: Re: remote xterm's can't open display after upgrade

On 11/12/2014 18:31, Don Webster wrote:

> I needed to upgrade gs to gs 9.15, so I ran setup yesterday. It
> wanted to update a whole bunch of stuff, including X. OK, fine, I
> hadn't updated cygwin in quite a while, and I had other stuff to do.
>
> After the upgrade, I can't display remote xterms. OK, my old X
> shortcut didn't work, but I found "XWin Server" and pinned it to my
> task bar. I launch that and I have the X server running, and a local
> xterm pops up. I ssh into my linux server, and run my xterm, and get
> "can't open display". I did these steps.
>
> - turned off my Windows Firewall (I am on a safe, local network). -
> launched XWin Server.
>
> In the xterm that popped up:
> dcw@dcwdt02 ~
> $ xhost +
> access control disabled, clients can connect from any host
>
> dcw@dcwdt02 ~
> $ ssh centos6
> Last login: Wed Dec 10 16:31:16 2014 from dcwdt02
> centos6% setenv DISPLAY 10.11.22.33:0.0    # I use tcsh
> centos6% xterm
> xterm Xt error: Can't open display: 10.11.22.33:0.0
> centos6%
>
> Is there something obvious?

https://cygwin.com/ml/cygwin-xfree/2014-11/msg00029.html

The relevant part is "startx and startxwin now pass '-nolisten tcp' to 
the server by default, which increases security in the X server by not 
opening a port to TCP connections. The '-listen' flag can be passed as a 
server argument to override this."

Your choices are to add the '-listen' flag to the startxwin invocation, 
or (better) to use 'ssh -Y' and not explicitly set DISPLAY (See 
http://x.cygwin.com/docs/ug/using-remote-apps.html#using-remote-apps-ssh)

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: remote xterm's can't open display after upgrade
  2014-12-11 18:31 remote xterm's can't open display after upgrade Don Webster
  2014-12-11 19:14 ` Jon TURNEY
@ 2014-12-12 19:55 ` JimE
  2014-12-14 22:43   ` Linda Walsh
  1 sibling, 1 reply; 6+ messages in thread
From: JimE @ 2014-12-12 19:55 UTC (permalink / raw)
  To: cygwin-xfree



Don Webster <paxguy <at> yahoo.com> writes:


> 
> After the upgrade, I can't display remote xterms. OK, my old X shortcut 
didn't work, but I found "XWin
> Server" and pinned it to my task bar. I launch that and I have the X 
server running, and a local xterm pops up. I
> ssh into my linux server, and run my xterm, and get "can't open display". 

...

> This was all working on Monday with my older version of cygwin-x, which I 
think was a 2011 vintage. (I don't
> upgrade stuff very often for this very reason.) 
> 
> Attached is my log. 
> 
> Any help is appreciated. In general, I love cygwin and cygwin-x; it is 
aw

Hi Don,
   I'm in the same boat.  I just upgraded cygwin and now I can't get remote xterms to 
display on the local machine.

   The previous version of startxwin.exe started a  server on
 DISPLAY=IPAddress:0.0 and I could display remote Xte rms because
 I'd set the remote DISPLAY variable to the same value, and they 
could get to the PAddress.   The new version of startxwin.exe uses 
DISPLAY=:0.0, and remote xterms won't display/can't find my machine.
  I tried setting the remote machine's DISPLAY=IPAddress:0 and to 
DISPLAY=machinename:0, but I get "Error: Can't open display: IPAddress:0" 
or "Error: Can't open display: machinename:0"
   On the local machine I tried "xhost + remotemachine" and "xhost +", still 
no luck.


   Still looking for an answer...


JimE





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: remote xterm's can't open display after upgrade
  2014-12-11 19:14 ` Jon TURNEY
  2014-12-11 21:16   ` Don Webster
@ 2014-12-12 22:03   ` J. Offerman
  1 sibling, 0 replies; 6+ messages in thread
From: J. Offerman @ 2014-12-12 22:03 UTC (permalink / raw)
  To: cygwin-xfree

Instead of bothering with the nolisten option and running

$ ssh centos6

Just do this:

$ ssh -Y centos6

without touching the xserver option. That's what Jon meant. I also
stumbled upon this awhile back and pulled my hair(from whereever I
still got them).


On Thu, Dec 11, 2014 at 11:14 AM, Jon TURNEY
<jon.turney@dronecode.org.uk> wrote:
> On 11/12/2014 18:31, Don Webster wrote:
>>
>> I needed to upgrade gs to gs 9.15, so I ran setup yesterday. It
>> wanted to update a whole bunch of stuff, including X. OK, fine, I
>> hadn't updated cygwin in quite a while, and I had other stuff to do.
>>
>> After the upgrade, I can't display remote xterms. OK, my old X
>> shortcut didn't work, but I found "XWin Server" and pinned it to my
>> task bar. I launch that and I have the X server running, and a local
>> xterm pops up. I ssh into my linux server, and run my xterm, and get
>> "can't open display". I did these steps.
>>
>> - turned off my Windows Firewall (I am on a safe, local network). -
>> launched XWin Server.
>>
>> In the xterm that popped up:
>> dcw@dcwdt02 ~
>> $ xhost +
>> access control disabled, clients can connect from any host
>>
>> dcw@dcwdt02 ~
>> $ ssh centos6
>> Last login: Wed Dec 10 16:31:16 2014 from dcwdt02
>> centos6% setenv DISPLAY 10.11.22.33:0.0    # I use tcsh
>> centos6% xterm
>> xterm Xt error: Can't open display: 10.11.22.33:0.0
>> centos6%
>>
>> Is there something obvious?
>
>
> https://cygwin.com/ml/cygwin-xfree/2014-11/msg00029.html
>
> The relevant part is "startx and startxwin now pass '-nolisten tcp' to the
> server by default, which increases security in the X server by not opening a
> port to TCP connections. The '-listen' flag can be passed as a server
> argument to override this."
>
> Your choices are to add the '-listen' flag to the startxwin invocation, or
> (better) to use 'ssh -Y' and not explicitly set DISPLAY (See
> http://x.cygwin.com/docs/ug/using-remote-apps.html#using-remote-apps-ssh)
>
> --
> Jon TURNEY
> Volunteer Cygwin/X X Server maintainer
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://x.cygwin.com/docs/
> FAQ:                   http://x.cygwin.com/docs/faq/
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: remote xterm's can't open display after upgrade
  2014-12-12 19:55 ` JimE
@ 2014-12-14 22:43   ` Linda Walsh
  0 siblings, 0 replies; 6+ messages in thread
From: Linda Walsh @ 2014-12-14 22:43 UTC (permalink / raw)
  To: cygwin-xfree

JimE wrote:

> 
> Hi Don,
>    I'm in the same boat.  I just upgraded cygwin and now I can't get remote xterms to 
> display on the local machine.
----
	Question -- Is your local machine on a closed net?

	I.e. My windows machine is on a local subnet (example: 192.168.x.y) 
that isn't
(usually) exposed to the internet.

1st thing to note, is that my win X server starts automatically
when I log into windows (well it usually does unless some "upgrade"[sic]
makes something incompat), BUT, less likely to have problems, as
I start the X-server via my *own* script in my homedir's "bin" dir.

I.e. the shortcut on my QuickLaunch Bar (yeah, running W7 and still
using that...)... has

Target:  C:\bin\bash.exe -c '"%USERPROFILE%/bin/startxwin.sh"'
Startin: %HOMEDRIVE%%HOMEPATH%
---

my startxwin.sh is mostly free of non-cygwin deps, except
for a tray-message util, "notify" which lets me put up messages
if the server is already running and such.

----
I'll leave in the comments (mostly NOTES to self or
OLD code...)... but if you know shell script, shouldn't be
hard to modify to your use case.

Some things (like a "mount -c /") at the beginning
of the script have been added over the years to
increase robustness.

This script hasn't been "cleaned" for looking good
or best coding style, but given how often I need to
maintain or change it, I haven't been motivated.

It has disabled code that tried to start dbus, but
it didn't work reliably, so it's commented out.

Parts were rewritten to try to minimize use of non-shell,
external commands (minimize deps, efficiency).

Note 1: If you want to use this in an unsecure network,
then you need to start this through an "ssh" command to
the remote machine and not reset the DISPLAY...

Note 2: one thing this script does that the cygwin
script does not do -- it tries to read your display's
"DPI" and set the corresponding option in the X-display.



---------------------extra config file: (optional) 
~/.mind/Xserver-dflt-overrrides----
+ac
---------------------bash script: startxwin.sh





#!/bin/bash
# (c) LA Walsh 2004-2014, licenced under GPLv2 and/or to nice people
#export DISPLAY=:0
#export XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
#export XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
#export XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
#export XNLSPATH=/usr/X11R6/lib/X11/locale
#unexport XAPPLRESDIR XCMSDB XKEYSYMDB XNLSPATH

# see cygwin Xwin for more option examples
# relevant ops:
# -multiwindow = use windows manage; not w/(-rootless|-fullscreen)
# -clipboard = use built-in version (integrated w/windows)
# -unixkill = Enable Ctrl-Alt-BS as X-server shutdown cmnd
# -nowinkill = Disable Alt+F4 as a server shutdown key combination.
# -trayicon = (default) windows tray icon enabled

mount -c /
export PATH=/bin:$(/bin/cygpath "$USERPROFILE")/bin:$PATH #ensure our 
bin is 1st
shopt -s expand_aliases extglob
alias notify=$(type -P notifu)
alias int=declare\ -i
alias sub=function
alias xset=$(type -P xset);
alias array=declare\ -a
alias my=declare

export DISPLAY="${DISPLAY:-":0"}"

sub xup {
   local stat
   read -t .1 stat <<<$(xset q >&/dev/null; echo $?)   &&
         return $stat
   ((-1))
}
sub Xwin_pids {
   ( cd /proc  &&
       for p in +([0-9])/ ;do
         p2=${p%/}
         prg=$(<${p2}/exename)
         if [[ $prg =~ .*XWin ]]; then
           printf "%d:%s\n" "$p2" "$prg"
         fi
       done
   )
}

#sub Xwin_pid { echo $(/bin/ps -s|/bin/awk -- '/\?.*XWin/{print $1}') ; }

sub Xwin_pid {
   array Xprgs
   readarray Xprgs< <(Xwin_pids)
   if ((!${#Xprgs[@]}));then
     echo 0
     return 1
   fi
   my x=${Xprgs[0]}
   my pid=${x%%:**} prg=${x##*:}
   array out=( "$pid" "$prg")
   printf "%s " "${out[@]}"
   printf "\n"
   return 0
}

sub Xwin_running {
   int pd; my pg
   read pd pg < <(Xwin_pid)
   return $(((!pd)))
}
export -f Xwin_pids Xwin_pid


#sub Xwin_pid { echo $(/bin/ps -s|/bin/awk -- '/\?.*XWin/{print $1}') ; }
#export -f Xwin_pid
#sub Xwin_running { [[ $(Xwin_pid) ]] ; }
#export TERM=15 KILL=9

sub tidy_old_Xwin {
   local -a sigs=(TERM TERM KILL)  # try 2 TERMs then KILL upto maxsigs
   int pd; my pg
   int maxsigs=3 lastsig=${#sigs[*]}
   while ((1)); do
     read pd pg < <(Xwin_pid)
     ((pd)) || break
     #int i=--maxsigs>lastsig ? lastsig:maxsigs
     kill -${sigs[--maxsigs>lastsig ? lastsig:maxsigs]} $pd
     ((maxsigs)) || break
     sleep 1
   done
   rm -fr /tmp/.X11-unix
}


sub get_dpi {
   dpi=$(regtool -d get '/HKLM/Software/Microsoft/Windows 
NT/CurrentVersion/FontDPI/LogPixels')
   # check for insane values
   ((dpi<50||dpi>>400)) && dpi=96
   echo "$dpi"
}

sub get_fontpath {
   local 
fontpath="/usr/share/TTF,built-ins,/usr/share/fonts/misc,/usr/share/fonts/100dpi"
   echo -n "$fontpath"
}

sub start_XWin {
   local 
fontpath="/usr/share/fonts/TTF,built-ins,/usr/share/fonts/misc,/usr/share/fonts/100dpi"
   int dpi=$(get_dpi)
   cmd="/bin/run /bin/XWin  ${dpi:+-dpi $dpi}
     -nomultimonitors -clipboard  -ac -unixkill -nowinkill -wgl
     -bs -fp "$fontpath" -multiwindow"
   echo cmd="$cmd"
   $cmd
}

declare -a default_switches=(-dpi -clipboard -unixkill -nowinkill -bs 
-ac -fp -multiwindow -wgl)

readarray -t args< <(
a="$default_switches[@]"; IFS=$'\n'; echo "${a[*]#?}"|sort -k1.2 )

sub read_users_mind { #(reads file in lieu of HW support for actual)
   if [[ -O ~/.mind && -O ~/.mind/Xserver-dflt-overrides ]]; then
     readarray -t overrides < <( -x
     <~/.mind/Xserver-dflt-overrides perl -wnE '
     chomp; s/\s*(?:#.*)?$//; s/^\s*// s/\s\s+/\s/ ; $_ || next;
     print $_."\n" ')
   fi
   typeset -a switches
}

sub  start_dbus {
   /bin/run /bin/dbus-launch --exit_with_session ~/.Xsession
}


sub _in {
   local x=${1:?};shift
   for ((;$#>0;)); do [[ $x == $1 ]] && return 0;shift; done
   return 1
}


int tries=3

if Xwin_running && xup; then
   notify /t info /m "Xserver already running and ready" /d 5000
else
   echo Cannot contact X Server
   tidy_old_Xwin
while ((1)); do

     start_XWin $(read_users_mind)
     sleep 1

     for ((i=0;i<5;++i)); do
       xup && break 2
       sleep 1
     done

     if ((--tries<=0)); then
       m="\aEXITING: Timeout Waiting for Xserver Startup!!"
       echo "$m"
       notify /t error /m "$m"
       exit 1;
     fi
   done
   #start_dbus || { m="\aError Starting Dbus"; echo "$m"; notify /t error 
/m "$m"; }
fi

# vim: ts=2:sw=2

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-14 22:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11 18:31 remote xterm's can't open display after upgrade Don Webster
2014-12-11 19:14 ` Jon TURNEY
2014-12-11 21:16   ` Don Webster
2014-12-12 22:03   ` J. Offerman
2014-12-12 19:55 ` JimE
2014-12-14 22:43   ` Linda Walsh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).