1

Whenever I've got a running terminal instance and for example go into my file manager and right click "open in terminal" a new terminal instance starts.

How can I change it so that a new tab opens in the already existing terminal instance?

I'm running Ubuntu 18.04.4 LTS with gnome desktop.

1 Answers1

1

This can be easily achieved on thunar and xfce4-terminal File manager.

(It can also be achieved on Nautilus and xfce4-terminal, but you will have to install filemanager-actions. I have explained both)

On Thunar, click on edit->Configure custom actions...

enter image description here

Create new action by clicking on + and fill as given below.

Give the command as:

xfce4-terminal --tab --working-directory=%f 

Set an icon of your choice.

In Appearance Conditions tab, check Directories.

and Save. enter image description here

You should get it on your right click menu:

enter image description here

NOTE: Doing similar steps on Nautilus with filemanager-actions for gnome-terminal creates a new window instead of new tab. But it works fine with xfce4-terminal.

For nautilus:

Install filemanager-actions

sudo apt install filemanager-actions

Open filemanager-actions

Create a new action.

enter image description here

Choose an icon, check all those options.

enter image description here

set path as xfce4-terminal

and parameters --tab --working-directory="%d"

and save.

It should show up on your right click menu like this:

enter image description here


If you want this behavior to be the default, you can achieve it my setting alias for gnome-terminal as gnome-terminal --tab in your /etc/bash.bashrc or ~/.bashrc.

Severus Tux
  • 10,126