You are not logged in.
hi guys,
i want to execute a command each time i start xterm in that terminal itself.
i know about bashrc, but what I want to do is make it exclusively launch when xterm is started. when i want to use other terminals, e.g. terminology etc. i do not want that command to be executed.
has anybody an idea if that is possible (or possible with a different term)?
thanks!
Last edited by replax (2014-02-07 19:40:57)
Offline
You can either run xterm using the execute switch...
xterm -e commandOr add the command to your ~/.bashrc with a test to check that the current terminal is xterm, something like...
if [ $TERM = xterm ]; then
command
fiOffline
What command is it exactly?
Offline
You can either run xterm using the execute switch...
xterm -e command
This will only work if the "command" doesn't exit after executing, otherwise xterm will vanish in an instant. So use this to run programs, such as weechat, irrsi, etc.
Or add the command to your ~/.bashrc with a test to check that the current terminal is xterm, something like...
if [ $TERM = xterm ]; then command fi
This one is better suited for a command that behaves as mentioned above.
Offline
Thanks for your suggestions!
@slithery, your second suggestions works well, except for one ceveat i am not sure of.
upon term opening i want to launch "t ls" for listing my todo's
however, e.g. Terminology's $TERM is also xterm
echo $TERM
xterm is that an issue of terminology?
EDIT:
solved it by:
running "env" and checking for vars unique to terminology/xterm, one of them was $TERMINOLOGY=1
checking for that solved my problem, thanks for all the input
!!
Last edited by replax (2014-02-07 19:40:45)
Offline