Open terminal in current directory by shortcut

If none of the more specific forums is the right place to ask

Open terminal in current directory by shortcut

Postby ehehe » 2018-12-01 02:30

In Settings -> Keyboard, I have created a shortcut to open terminal, it is effective, but the directory is the default.

In the right-click menu, there is a option "Open in Terminal", it can open the terminal in the current directory, but do not has a shortcut.Other options have shortcut, such as "New Folder" is "Shift+Ctrl+N", "Paste" is "Ctrl+V", and you know.

How can I create a shortcut for "Open in Terminal" in right-click menu? Or any other ways, I just want to tap any key and then open a terminal in current directory.
ehehe
 
Posts: 1
Joined: 2018-12-01 02:08

Re: Open terminal in current directory by shortcut

Postby shep » 2018-12-02 01:04

Most importantly this will depend on the application/Desktop Envirnoment that is viewing the file. Secondarily, it will depend on the terminal: konsole, gnome-terminal, xfce-terminal, sakura, xterm etc. In the event you have multiple windows open, each in a different directory, you will need to determine the active window in your DE and pass that off to your terminal command. See link below.

https://askubuntu.com/questions/963201/command-for-open-terminal-to-a-specified-path
shep
 
Posts: 229
Joined: 2011-03-15 15:22

Re: Open terminal in current directory by shortcut

Postby Dai_trying » 2018-12-02 08:24

When using terminator (my preference) I can use the --working-directory=DIR option to do this, if you use KDE (and konsole) you could use konsole --workdir DIR and I'm sure most terminals would have a similar option.

Using man <terminal> (replace <terminal> with your choice) you would likely find the correct option and syntax.
Dai_trying
 
Posts: 567
Joined: 2016-01-07 12:25

Re: Open terminal in current directory by shortcut

Postby bw123 » 2018-12-02 15:19

On some fm, like dolphin, you can use the 'menu' key between the right alt and ctrl button to pop up the menu then use A_ctions, O_pen terminal here.
User avatar
bw123
 
Posts: 3580
Joined: 2011-05-09 06:02
Location: TN_USA


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable