Can't open display issue from CMD

Marco Atzeri marco.atzeri@gmail.com
Sat Jan 16 04:40:59 GMT 2021


On 16.01.2021 05:22, Luna Bellofiore via Cygwin wrote:
> All,
> 
> I am sending Linux commands from CMD (Windows) through SSH, and I am
> getting "Can't open display".  Below I am capturing my issue, the IP number
> is the remote Linux machine.
> 
> Microsoft Windows [Version 10.0.19042.746]
> (c) 2020 Microsoft Corporation. All rights reserved.
> 
> C:\Users\bellsal>\cygwin\bin\ssh 192.168.0.8 pwd
> /usr/bin/xrdb: Can't open display ''
> /home/bellsal

It seems the remote machine is expecting to run a X interface
by default.
Or you have the startX (or similar) in the personal login scripts


The expect behaviour on a Unix machine (Cygwin or Linux) is:

$ ssh 127.0.0.1 pwd
Marco@127.0.0.1's password:
/home/Marco

> PWD should not require X11 connection, so I don't understand why I am
> getting this issue.  Do I need to set an environment variable?  If I need
> an xterm from my remote Linux, I know I need to export the display, and
> that works fine.  But, I am only sending a simple command from the CMD
> console.
> 
> Thanks in advance.
> 
> Sa;

I suggest you to check the remote scripts.
It does not seem a Cygwin side problem

Marco



More information about the Cygwin mailing list