bash startup files help
by bellsal from LinuxQuestions.org on (#5CY5G)
All,
I need help in changing the bash startup files (/etc/profile, or ~/.bash_profile, or ~/.bash_login, or ~/.profile). Here is my problem. From an MS Windows PC, I am using the CMD to execute a command on a Linux remote server (192.168.0.8). More specifically, I am doing this:
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
As you notice (in red), I am getting "Can't open display" error as if I am making an X11 interface. Now, if I would have asked for an xterm instead of pwd, I would have needed an X11 interface, and I know I would have to export DISPLAY. But, pwd does not need an X11 interface. So, I believe that the bash interface is setup for X11 interface by default.
Question: How can I change the bash startup files to only do a X11 interface when needed (and not for commands that don't need it such as pwd)?
Thanks
bellsal


I need help in changing the bash startup files (/etc/profile, or ~/.bash_profile, or ~/.bash_login, or ~/.profile). Here is my problem. From an MS Windows PC, I am using the CMD to execute a command on a Linux remote server (192.168.0.8). More specifically, I am doing this:
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
As you notice (in red), I am getting "Can't open display" error as if I am making an X11 interface. Now, if I would have asked for an xterm instead of pwd, I would have needed an X11 interface, and I know I would have to export DISPLAY. But, pwd does not need an X11 interface. So, I believe that the bash interface is setup for X11 interface by default.
Question: How can I change the bash startup files to only do a X11 interface when needed (and not for commands that don't need it such as pwd)?
Thanks
bellsal