Right-click Ubuntu and choose shortcut menu to add terminal columns.

Source: Internet
Author: User
Method 1: Install a package for Ubuntu, And you can right-click it to add a menu of "open terminal. Sudoapt-getinstallnautilus-open-terminal Method 2: Enter the. gnome2/nautilus-scripts directory in the main directory. Create a new file with any file name (this file name will be displayed in the right-click menu, preferably easy to understand, such as "open terminal" or "open-terminal"). The file content is as follows.

Method 1:

After installing a package for Ubuntu, you can right-click it and add a menu of "open terminal.

Sudo apt-get install nautilus-open-terminal

Method 2:
Go to the. gnome2/nautilus-scripts directory in the main directory. Create a new file with any file name (this file name will be displayed in the right-click menu, preferably easy to understand, such as "open terminal" or "open-terminal"). The file content is as follows.

#! /Bin/bash

#

# This script opens a gnome-terminal in the directory you select.

#

# Distributed under the terms of gnu gpl version 2 or later

#

# Install in ~ /. Gnome2/nautilus-scripts or ~ /Nautilus/scripts

# You need to be running Nautilus 1.0.3 + to use scripts.

# When a directory is selected, go there. Otherwise go to current

# Directory. If more than one directory is selected, show error.

If [-n "$ NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"]; then

Set $ NAUTILUS_SCRIPT_SELECTED_FILE_PATHS

If [$ #-eq 1]; then

Destination = "$1"

# Go to file's directory if it's a file

If [! -D "$ destination"]; then

Destination = "'dirname" $ destination "'"

Fi

Else

Zenity -- error -- title = "Error-Open terminal here "\

-- Text = "You can only select one directory ."

Exit 1

Fi

Else

Destination = "'echo" $ NAUTILUS_SCRIPT_CURRENT_URI "| sed's/^ file :\/\///''"

Fi

# It's only possible to go to local directories

If [-n "'echo" $ destination "| grep' ^ [a-zA-Z0-9] \ +:'' "]; then

Zenity -- error -- title = "Error-Open terminal here "\

-- Text = "Only local directories can be used ."

Exit 1

Fi

Cd "$ destination"

Exec x-terminal-emulator


After adding the file, add executable permissions to the file.

Chmod + x file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.