2

I'm trying to run tclsh with tk and I get a display error:

no display name and no $DISPLAY environment variable

Then I try the following:

export DISPLAY=:0.0

And of course it says it couldn't connect to display ":0.0".

The Cygwin/X server has been installed strictly according to http://x.cygwin.com/. But it is documented nowhere how to start this Cygwin/X server. So I assume Cygwin/X server is started when Cygwin is started.

What do I need to do to make this work?

Mat
  • 51,578
  • 10
  • 158
  • 140
Rainer Lampatzer
  • 21
  • 1
  • 1
  • 3
  • The [documentation for the Cygwin/X server](http://web.archive.org/web/20150930035806/http://x.cygwin.com:80/docs/ug/using.html#using-starting) (in the site you linked) mentions, for example, `startxwin` from inside cygwin or a Start Menu shortcut. I don't use Cygwin myself so I can't confirm this, though. `xwin.exe` from Cactus' answer might be what the Start Menu shortcut points to. – njsg May 21 '18 at 00:35

3 Answers3

1

There should be an xwin.exe in the X installation that will start a local server.

Cactus
  • 805
  • 3
  • 9
  • 18
1

Another way is installing Xming on your Windows box.

After starting Xming, you should

export DISPLAY=:0

(or

export DISPLAY=:0.0

if your want to use remote programs to use your local Xming) After that you can use graphical user interfaces from your cygwin.

This also enables you to use the Xming with e.g. Putty X-Forward.

Michael
  • 39
  • 4
0

I had this problem when I was doing an ssh into my Fedora LINUX server. You need to have X11 running on the server. To fix the problem, I typed the following command on the server side:

$ sudo Xorg -configure

Then I used ssh to log into the server from my PC:

$ ssh -Y [email protected]

where xx.xx.xx.xx is the ip address of the server. The -Y allows X11 forwarding.

bu5hman
  • 4,663
  • 2
  • 14
  • 29