Create 'Open Terminal Here' menu for Linux file manager

Share on:

Overview

Create "Open Terminal Here" menu for Linux file manager

Some Linux GUI file managers do not have a right-click menu "Open terminal here", or some have but don't allow specifying a certain terminal.

Because folder also has MIME type ( inode/directory), by associating folder with a terminal through MIME association, we can use the right-click menu in the file manager to select the terminal you want in "Open With". (The premise is that there is "Open With" in the right-click menu of your file manager)

In my previous article Linux Associated File Name Extension with Opening Program I wrote about how to associate. In step 2 of that article, edit YOURTERMINAL-in-this-path.desktopfile

1[Desktop Entry]
2Encoding=UTF-8
3Name=rxvt-unicode in this path
4GenericName=rxvt-unicode in this path
5Exec=urxvt -cd %f
6Icon=utilities-terminal
7Terminal=false
8NoDisplay=true

the Exec=YOURTERMINAL ARGUMENTS %fvaries for different terminals, this example is for the urxvt-unicode terminal.
For xfce4-terminal, it is Exec=xfce4-terminal --working-directory=%f

After a terminal installed, it must come with it .dekstop file, but generally its Exec= contains no part of the path to pass in, so here you have to write one yourself.

Then, in step 3 of that article:

1[Added Associations]
2inode/directory=YOURTERMINAL-in-this-path.desktop;
All articles are original (except for those specially claimed) and copyrighted. Copying without permission is forbidden.

Buy me a coffee

Your donation will be an impetus for me!