How to change gnome-terminals startup directory?

3

It seems like gnome-terminal has changed its startup behavior and now new shells opened via CTRL-SHIFT-N have ~ set as their working directory. Before this change the new shell was opened in the current directoy.

How do I revert this change?

fho

Posted 2013-05-17T14:35:54.647

Reputation: 133

Answers

3

Read the official gnome-terminal FAQ
See also this bugreport.

don_crissti

Posted 2013-05-17T14:35:54.647

Reputation: 2 374

Oh ... should have done this first ... – fho – 2013-05-21T09:19:08.230

3

If you use Debian and don't want to wait for the different maintainers to finally decide where "the best position for the script" is, you can do the following:

Edit ~/.bashrc, search for the following lines (might look slightly different):

if [ "$color_prompt" = yes ]; then
  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;m\]\w\[\033[00m\]\$ '
else
  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

and add to the else branch:

  # XXX hack to fix ctrl + shift + N
  . /etc/profile.d/vte.sh

Resulting in:

if [ "$color_prompt" = yes ]; then
  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;m\]\w\[\033[00m\]\$ '
else
  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  # XXX hack to fix ctrl + shift + N
  . /etc/profile.d/vte.sh
fi

David

Posted 2013-05-17T14:35:54.647

Reputation: 31