Open GoogleCodeExporter opened 9 years ago
Done a bit more checking and this appears to be because the term command does
not set
any environment variables. The one I expect to be set in this case is $HOME so
that
vim can find and open $HOME/.vimrc
This can be demonstrated by comparing
1. In a normal terminal (including a new terminal tab within hotwire) the
output of
$ echo $HOME # shows the home directory
$ env # shows all environment variables set
2. From hotwire,
term echo $HOME
term env
From the terminal I get the expected output. But I get no output from either
command
by using the term command. Interestingly typing env in hotwire does give the
expected output (minus what I have set in my .bashrc)
As a side issue, in hotwire, "sys echo $HOME" gives "$HOME" as the output, "sys
"echo
$HOME"" gives an error, and "sys 'echo $HOME'" causes a crash ... (I'll start a
new
issue for that).
Original comment by dmi...@gmail.com
on 18 Apr 2008 at 1:36
Just to say, scratch the "sys 'echo $HOME'" causes a crash, I can't reproduce
it, but
I will file a bug report if I find a way to reproduce it ...
Original comment by dmi...@gmail.com
on 18 Apr 2008 at 2:53
I think this one may be caused by issue 137.
Original comment by cgwalt...@gmail.com
on 24 Apr 2008 at 1:01
Try this:
term /bin/sh -c 'env; sleep 5'
Do you see any output?
Original comment by cgwalt...@gmail.com
on 24 Apr 2008 at 1:02
Yes - that gives me the same output as env in the hotwire window (ie no bashrc
stuff,
but everything else is there.
I also tried
term /bin/sh -c 'vim hotwire/builtin.py; sleep 5'
term /bin/sh -c 'vim hotwire/builtin.py'
but neither of them gave me syntax highlighting ...
Original comment by dmi...@gmail.com
on 26 Apr 2008 at 3:44
Ok, I think I understand this one now. When you run 'term commandname args...'
we're
not invoking bash as an interactive shell, we're just using it to run another
command. Because it's not interactive, according to the man page, it won't read
~/.bashrc.
So what we really want is a place to set environment variables that are always
read,
regardless. From some investigation, at least on my Fedora system the right
file to
modify is ~/.bash_profile. That file will be evaluated by the desktop login
process.
Can you move your environment customizations from ~/.bashrc to ~/.bash_profile
and
see if that fixes it?
Original comment by cgwalt...@gmail.com
on 4 May 2008 at 3:38
No joy I'm afraid. I put the entirety of .bashrc into .bash_profile , along
with
export HOME=/home/mish
and no change. No syntax highlighting in vim, no output to "term echo $HOME"
...
Just a thought that $HOME was not previously set in my .bashrc (and
.bash_profile did
not exist at all - Ubuntu 8.04). I assume that $HOME (and all the other
variables
you see when typing "env" into the normal hotwire window) are set by the system
in
some way.
sh echo $HOME
does work.
term sh -c 'echo $HOME'
does not work.
So what is different about how bash is invoked by typing sh, and how bash is
invoked
by typing term?
Original comment by dmi...@gmail.com
on 7 May 2008 at 4:20
How about: term sh -c 'echo $HOME; sleep 3' though?
There is some other race condition here where sometimes we don't display the
output
of a command after it's exited. This is issue 137.
Original comment by cgwalt...@gmail.com
on 16 May 2008 at 11:41
term sh -c 'echo $HOME; sleep 3'
does work (and the rest of the env variables are available the same way).
Having some trouble with my vim setup at the moment, so can't test it right
now, but
I'll report back when I can.
Original comment by dmi...@gmail.com
on 17 May 2008 at 5:13
related to this (I think), typing "powertop" in hotwire brings up a terminal
with no
output. The status line above the terminal environment says "Running (pid
-1)".
But no input seems to matter. Ctrl-C and Ctrl-Shift-C do nothing. Enter does
not
close the window. I have to do Alt-F4 (or use the mouse) to close the window.
In a normal terminal, the output is:
mish@whisper:~$ powertop
The program 'powertop' is currently not installed. You can install it by
typing:
sudo apt-get install powertop
bash: powertop: command not found
And if I do "term sh -c 'powertop; sleep 3'" then I get "sh: powertop: not
found".
And pressing enter closes the window, as expected.
If I do "term sh -c 'powertop'" I get a blank window, but pressing enter does
close
the window.
Original comment by dmi...@gmail.com
on 20 Aug 2008 at 1:35
Original issue reported on code.google.com by
dmi...@gmail.com
on 17 Apr 2008 at 3:44