Let's see if I get this... The windows box runs ssh (in command prompt window? via some windows app like SecureCRT?) to connect to a linux box and run a perl/tk app in linux, and you want the perl/tk window to show up on the windows screen. Is that it?

He could be using any ssh client, most likely ttssh, Putty, or openssh (via cygwin or mingw). Regardless, my understanding was that he wanted the app to realise that X11 won't work and revert to a text interface. (xclock under those circumstances will die, but emacs will happily run as if in a terminal, provided your ssh app's terminal emulation is good and you don't try to resize the window; I think he wanted something like the latter behavior).

At worst he could add a command-line argument --nogui (or whatever), but it ought to be possible to detect and handle the problem, like Emacs does.

There are X servers available for windows, which would allow this to work, but I don't know of any free ones off-hand

The best free one I know about is XFree86. Last I knew (which was months ago) you had to install cygwin to run XFree under Win32, because it hadn't been ported to compile under mingw yet. I don't know whether that's still true.

Some day, someone will write an open-source X server in Perl and throw it up on CPAN...

sub A{while($_[0]){$d=hex chop$_[0];foreach(1..4){$_[1].=($d %2)?1:0;$d>>=1;}}return$_[1];}sub J{$_=shift;while($_){$c=0; while(s/^0//){$c++;}s/^1//;$_[1].=(' ','|','_',"\n",'\\','/' )[$c]}@_}$PH="16f6da116f6db14b4b0906c4f324";print J(A($PH));

In reply to Re: Handle Tk "X connection broken" gracefully? by jonadab
in thread Handle Tk "X connection broken" gracefully? by ndwg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.