0

I am using Debian stable, cinnamon interface and I would like to create the following custom keyboard shortcut associated with nemo:

When nemo is open in a folder DIR, ALT+T should open a terminal in this folder (that is the command cd DIR is made automatically).

0

There is a few different ways you can accomplish this task. I will be referencing this post that covers creating custom shortcuts for Nemo. This other post is for Ubuntu but it offers a lot of insight on how to create the specific keyboard short cut that you would like.

1. Create Custom Nemo Shortcut

Using dconf you can create a custom keyboard shortcut that will be applied Globally to all users.

/org/cinnamon/desktop/keybindings/custom-keybindings/custom0/name
 'Open Terminal'
/org/cinnamon/desktop/keybindings/custom-keybindings/custom0/command
 'x-terminal-emulator'
/org/cinnamon/desktop/keybindings/custom-keybindings/custom0/binding
 ['<Alt>t']
/org/cinnamon/desktop/keybindings/custom-list
 ['custom0']

This opens a default x-11 terminal emulator, as defined in this post. If you would prefer a graphical solution, again referencing this previous answer, you can simply follow these steps:

If you want a global shortcut, you should use the Cinnamon Keyboard setting under the System settings, go to the second tab and add your custom shortcut.

This may involve having to create a custom Nemo action too, which is outlined here at the Arch Linux Wiki.

2. Edit ~/.config/nemo/accels

If possible, as outlined in this post you can change the current shortcut to opening a terminal in your File Manager. Again, that post refers to Ubuntu and Nautilus, but if Nemo has a similar configuration structure with setting gtk shortcuts via a ~/.config/[file manager]/accels file you can do this process to accomplish your goals:

Stop Nemo by executing nemo -q

Open ~/.config/nemo/accels in a text editor of your choice, e.g. gedit:

gedit ~/.config/nemo/accels

Try to see if you can find the following line:

;(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "")

If the line exists, add your keyboard shortcut in the second double-quoted segment and uncomment the line by removing ;:

(gtk_accel_path "<Actions>/DirViewActions/OpenInTerminal" "<Alt>t")

This would set the shortcut to Alt+t.

For a list of all possible key codes please consult this answer.

If the line doesn't exist just copy and paste the one found in this answer at the end of the file.

This solution may not be possible for Nemo and only work for Nautilus but it can give you more of an idea of where certain applications get keyboard shortcuts.

Conclusion

Use dconf if possible, it appears to be the best solution. Do not forget to check out the Arch Linux Wiki for everything on Nemo and I believe that this answer provides the best solution for you. If there are is any incorrect information or misconceptions, corrections will be greatly appreciated. Best of Luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.