Hello,
there are many "command not found" Q&A out there, but I got stuck here.
Note: this works with gnome-terminal, but not with xfce4-terminal.
Inside an xfce4-terminal from the Desktop ("exo-open --launch TerminalEmulator"), this is the environment:
Code:
user@machine:~$ ll bin
lrwxrwxrwx 1 frq frq 33 Mar 25 14:55 bin -> /home/frq/workspace/core/shtools/
user@machine:~$ cd bin
user@machine:~/bin$ ll void
-rwxr-xr-x 1 frq frq 8 May 10 08:06 void
user@machine:~/bin$ cat void
echo 42
user@machine:~/bin$ void
42
user@machine:~/bin$ echo $PATH
/home/frq/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
As I am trying to run a terminal from a different context, play around with these:
Code:
user@machine:~/bin$ xfce4-terminal -x void ==> FAILS, why?
user@machine:~/bin$ xfce4-terminal -H -x ./void ==> WORKS, but is not what I need...
user@machine:~/bin$ xfce4-terminal -H -x echo $PATH ==> WORKS, but PATH is evaluated before invocation, isn't it?
user@machine:~/bin$ xfce4-terminal -x bash -c "(echo $PATH; read -sn1 -p DONE.)" ==> WORKS
And this drives me mad:
Code:
user@machine:~/bin$ xfce4-terminal -x bash -c "(echo $PATH; void; read -sn1 -p DONE.)"
==> yields ==>
/home/frq/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
bash: void: command not found
DONE.
One part of the solution is, PATH was evaluated in the current context:
Code:
user@machine:~/bin$ xfce4-terminal -x bash -c "(echo \$PATH; void; read -sn1 -p DONE.)"
==> yields ==>
/usr/local/bin:/usr/bin:/bin:/usr/games
bash: void: command not found
DONE.
The PATH comes in ~/.bashrc, but neither the options "--noprofile" nor "--rcfile ~/.bashrc" work!
What else can I try? Or how is the Terminal initialized with or without -x?
Thx in advance!