Article 5CY5G bash startup files help

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

bellsallatest?d=yIl2AUoC8zA latest?i=xp0kQR-8DPQ:w5qws9POxEQ:F7zBnMy latest?i=xp0kQR-8DPQ:w5qws9POxEQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=xp0kQR-8DPQ:w5qws9POxEQ:gIN9vFwxp0kQR-8DPQ
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments