0

Maybe my question was partly answered here but I need full solution.

What I want to do is this:

gnome-terminal --tab -x "cd /ini/experiments/ gedit mytext.txt" --tab -e "cd /ini/myex/ipython"

So I need to execute ipython from myex diretory and open mytext.txt from experiments directory. Since I have several such jobs every time, it is headache to do.

I tried this as well: gnome-terminal --tab --working-directory="/ini/experiments/ gedit mytext.txt" but this does not work, it gets to home directory again.

Many thanks

1 Answers1

0

If those paths to the directories are corrects as you say, then you should use:

gnome-terminal --tab -e "bash -c 'cd /ini/experiments/ && gedit mytext.txt';$SHELL" --tab -e "bash -c 'cd /ini/myex/ipython';$SHELL"

See also:

Radu Rădeanu
  • 169,590