4

I'm not sure if this is default behavior for mate-terminal. When I cd into a directory and then open a new terminal tab, it opens in the same folder.

I'd like this to default to home instead of the previous folder open.

How can I achieve this?

EDIT - I don't think this is a duplicate of How can I start gnome-terminal at a particular directory? the difference is that I'm not starting a new terminal. If I open a fresh terminal it opens to $HOME which is what that question answers and how I expect it to behave. This question deals with new tabs.

digital
  • 167
  • 1
  • 9

2 Answers2

4

Using a custom command for your mate-terminal profile, eg:

sh -c "cd your_folder; exec bash"

Replace your_folder with your preferred folder and bash with your shell if you need another one than bash

enter image description here


The terminal in action

enter image description here

enter image description here

enter image description here


If you made a mistake use dconf-editor to correct your problem:

sudo apt-get install dconf-editor

Start dconf-editor and navigate to org.mate.terminal.profiles and change the values for custom-command and use-custom-command

enter image description here

A.B.
  • 90,397
1

Googlers, if you rather want to open a new terminal tab (to have some convenience, while keeping the old tab open...)

mate-terminal --tab --working-directory=/home/frank/mount/bare

see man mate-terminal

Frank N
  • 1,340