Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In gnome-terminal if I choose File->"Open Terminal" or "Open Tab" I get a new window in the same directory as the current window. I would like to create a gnome-terminal profile that starts in a particular directory. I have experimented with the "run a custom command" option in the "Title and Command" section of the profile's properties, but so far all my attempts result in the terminal immediately exiting. Is there a way to do this?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I did some testing, and the following worked for me as a custom command:

sh -c "cd /path/to/dir; exec bash"
share|improve this answer
    
Awesome! Thanks! –  Paul Lynch Aug 28 '12 at 15:51
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.