Re: Can't open display issue from CMD

2021-01-17 Thread Sal Bellofiore via Cygwin
OK I figured out the issue.  Inside .bashrc (in the Linux remote
machine), I was executing xrdb every time I was logging in, but I only
meant it to execute it when requesting xterm.  So, I included the following
lines in .bashrc, and everything works.

Thank you berndbausch!  You were spot on!  I didn't realize that xrdb was
the cause of my issue, and I solved the problem as you suggested.

if [[ -n $DISPLAY ]]
then
 /usr/bin/xrdb -load ~/.Xdefaults
fi


On Sat, Jan 16, 2021 at 4:23 PM Hans-Bernhard Bröker 
wrote:

> Am 16.01.2021 um 05:40 schrieb Marco Atzeri via Cygwin:
>
> >
> > It seems the remote machine is expecting to run a X interface
> > by default.
>
> Or could it be that the local machine has ssh X11 forwarding turned on
> (for this remote machine)?  Turning it off explicitly (-x flag) would
> turn it off, so if that changes the outcome, you know what happened.
>
> Running ssh in -v (verbose) may also help with telling what's going on.
>
> --
> Problem reports:  https://cygwin.com/problems.html
> FAQ:  https://cygwin.com/faq/
> Documentation:https://cygwin.com/docs.html
> Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Can't open display issue from CMD

2021-01-16 Thread Hans-Bernhard Bröker

Am 16.01.2021 um 05:40 schrieb Marco Atzeri via Cygwin:



It seems the remote machine is expecting to run a X interface
by default.


Or could it be that the local machine has ssh X11 forwarding turned on 
(for this remote machine)?  Turning it off explicitly (-x flag) would 
turn it off, so if that changes the outcome, you know what happened.


Running ssh in -v (verbose) may also help with telling what's going on.

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


Re: Can't open display issue from CMD

2021-01-16 Thread Marco Atzeri via Cygwin

please reply to the mailing list

On 16.01.2021 06:36, Sal Bellofiore wrote:

Hi Marco,

Thanks for the prompt response.  The reason why I don't get asked for a 
password is because I have setup the RSA public key, and that works fine.


When you say to check the remote scripts, what scripts are you referring 
to?  I am not running any remote (Linux) scripts, I am only sending 
commands like pwd, ls -la, etc.


Thanks

Sal


as also Achim reported the login scripts on the Linux server.

https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html#Bash-Startup-Files

When you open a remote shell, it runs its login script:

"When Bash is invoked as an interactive login shell, or as a 
non-interactive shell with the --login option, it first reads and 
executes commands from the file /etc/profile, if that file exists. After 
reading that file, it looks for ~/.bash_profile, ~/.bash_login, and 
~/.profile, in that order, and reads and executes commands from the 
first one that exists and is readable"


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


Re: Can't open display issue from CMD

2021-01-15 Thread ASSI
Luna Bellofiore via Cygwin writes:
> C:\Users\bellsal>\cygwin\bin\ssh 192.168.0.8 pwd
> /usr/bin/xrdb: Can't open display ''
   
> /home/bellsal
>
> PWD should not require X11 connection, so I don't understand why I am
> getting this issue.

You need to sanitize your login scripts on the Linux machine to only run
X11 commands when it actually is available, for instance by
conditionalizing on the presence of the DISPLAY environment variable.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Can't open display issue from CMD

2021-01-15 Thread Marco Atzeri via Cygwin

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

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


Can't open display issue from CMD

2021-01-15 Thread Luna Bellofiore via Cygwin
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

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;


cygcheck.out
Description: Binary data
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple