Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Where is located ini directory? Is it really in / -root directory or in your home directory? –  Radu Rădeanu Oct 10 '13 at 15:37
add comment

1 Answer

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.