this post was submitted on 02 Jul 2023
1 points (100.0% liked)

Ubuntu

171 readers
3 users here now

The Ubuntu community

Matrix space: https://matrix.to/#/#ubuntu-space:xentonix.net

founded 1 year ago
MODERATORS
 

Nautilus is the default file browser in Ubuntu. To assign a shortcut (F12) to the command “Open in Terminal” you can execute the following commands. Tested on Ubuntu 22.02. Should also work on 18.04 and 20.04.

To change the shortcut edit ~/.config/nautilus/scripts-accels

nautilus -q
mkdir -p ~/.local/share/nautilus/scripts
mkdir -p ~/.config/nautilus/
echo '#!/bin/sh' > ~/.local/share/nautilus/scripts/Terminal
echo 'gnome-terminal' >> ~/.local/share/nautilus/scripts/Terminal
chmod u+rx .local/share/nautilus/scripts/Terminal
mkdir -p ~/.config/nautilus/scripts
sed -i 's/F12 Terminal//g' ~/.config/nautilus/scripts-accels
echo 'F12 Terminal' >> ~/.config/nautilus/scripts-accels
echo '; Commented lines must have a space after the semicolon' >> ~/.config/nautilus/scripts-accels
echo '; Examples of other key combinations:' >> ~/.config/nautilus/scripts-accels
echo '; <Control>F12 Terminal' >> ~/.config/nautilus/scripts-accels
echo '; <Alt>F12 Terminal' >> ~/.config/nautilus/scripts-accels
echo '; <Shift>F12 Terminal' >> ~/.config/nautilus/scripts-accels
sed -i '/^$/d' ~/.config/nautilus/scripts-accels

#ubuntu #nautilus #terminal #linux #opensource

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here