* xwin-xdg-menu terminal not picking up my environment
@ 2017-05-21 20:06 petercon
2017-05-22 12:50 ` Jon Turney
0 siblings, 1 reply; 2+ messages in thread
From: petercon @ 2017-05-21 20:06 UTC (permalink / raw)
To: cygwin
The xwin-xdg-menu's terminal does not seem to pick up the environment
variables I have set in my home directory when I use it's terminal to run
a non-x program from /bin. i.e. I added Midnight Commander to the
xwin-xdg-menu (using alacarte) seting /bin/mc as the executable and check
the "run in terminal?" box. I prefer to use joe or nano as the editor in
mc and have turned off mc's internal editor which picks up the editor in
the "EDITOR" environment variable which I set in ~/.bashrc (I also tried
setting it in ~/.bash_profile and ~/.profile). Mc comes up with vi (which
is the default in mc if no "EDITOR" environment variable is set). I can
run an XTerm from the xwin-xdg-menu and then launch mc from that and it
honors the "EDITOR" environment variable.
By the way if I shell out (Ctrl-O) from mc and execute "env" the "EDITOR"
variable shows up in the list. Weird. So where does xwin-xdg-menu's
terminal get it's environment from?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xwin-xdg-menu terminal not picking up my environment
2017-05-21 20:06 xwin-xdg-menu terminal not picking up my environment petercon
@ 2017-05-22 12:50 ` Jon Turney
0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2017-05-22 12:50 UTC (permalink / raw)
To: The Cygwin Mailing List; +Cc: petercon
On 21/05/2017 18:18, petercon@sdf.org wrote:
> The xwin-xdg-menu's terminal does not seem to pick up the environment
> variables I have set in my home directory when I use it's terminal to run
> a non-x program from /bin. i.e. I added Midnight Commander to the
> xwin-xdg-menu (using alacarte) seting /bin/mc as the executable and check
> the "run in terminal?" box. I prefer to use joe or nano as the editor in
> mc and have turned off mc's internal editor which picks up the editor in
> the "EDITOR" environment variable which I set in ~/.bashrc (I also tried
> setting it in ~/.bash_profile and ~/.profile). Mc comes up with vi (which
> is the default in mc if no "EDITOR" environment variable is set). I can
> run an XTerm from the xwin-xdg-menu and then launch mc from that and it
> honors the "EDITOR" environment variable.
>
> By the way if I shell out (Ctrl-O) from mc and execute "env" the "EDITOR"
> variable shows up in the list. Weird. So where does xwin-xdg-menu's
> terminal get it's environment from?
xwin-xdg-menu shouldn't be doing anything to the environment, and
especially not based on if it's running a terminal...
If you're starting it from the start menu item, it inherits the
environment from the login shell which that uses to run startxwin, and
the processes it starts inherit that environment in turn.
The behaviour of bash in this area is complex (see the section
"INVOCATION" in the man page), but I suspect that any other
non-interactive shells in the ancestry of the mc process won't have run
startup scripts. So, if you've made a change to bash startup files,
you'd need to restart xwin-xdg-menu to see a change.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-22 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-21 20:06 xwin-xdg-menu terminal not picking up my environment petercon
2017-05-22 12:50 ` Jon Turney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).