方法一:

搜索nautilus-open-terminal安装

命令行:sudo apt-get install nautilus-open-terminal        (如果提示为找的什么的就sudo apt-get update&&sudo apt-get upgrade)

重新加载文件管理器

nautilus -q

或注销再登录即要使用

方法二:

进入主目录的.gnome2/nautilus-scripts目录。新建一个文件,文件名任意(这个文件名会显示

在右键菜单里,最好是通俗易懂的,比如“打开终端”或“open-terminal”),文件内容如下。

#!/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

添加完后,把此文件加上可执行的权限。

chmod +x 文件

以上只是总结的别人的方法,方便自己使用。

Ubuntu 怎么在右键添加打开终端的更多相关文章

  1. linux: 右键添加打开终端

    安装一个包,即可在右键里面添加一个“打开终端”的菜单. sudo apt-get install nautilus-open-terminal 注销用户重启,然后再进入就可以右键->在终端打开选 ...

  2. ubuntu,右键添加在终端中打开

    右键中添加"在终端中打开" 在终端输入  sudo apt-get install nautilus-open-terminal 重新启动, 进入操作系统就会发现单击鼠标右键就会出 ...

  3. vmware 安装不成功导致的问题解决以及右键菜单添加打开终端命令

    转自http://blog.csdn.net/puweilan/article/details/8609952 在VMware安装Ubuntu完成后,一直停留在VMware Easy Install, ...

  4. nautilus-open-terminal右键随处打开终端

    Nautilus-Open-Terminal : 可随处打开终端的 Nautilus 插件 nautilus-open-terminal-0.17-4.el6.x86_64 是一个让你随处都可以打开终 ...

  5. Linux学习笔记-Ubuntu添加右键菜单打开终端

    1.进入个人目录(如/home/batsing,下文缩写成 ~ ):设置显示隐藏文件,或使用命令行:2.进入 ~/.gnome2/nautilus-scripts 文件夹,新建一个文件,名为 term ...

  6. debian右键添加在终端中打开

    sudo apt-get install nautilus-open-terminal -y 注销,重启

  7. centos 给鼠标右击添加 “打开终端” 菜单项

    1.以root身份在终端执行如下命令 yum -y install nautilus-open-terminal   2.重启操作系统 shutdown -r now

  8. 为centos桌面增加在右键中打开终端

    万万没有想到这只是安装一个程序的总是,而不是配置的问题.注意要用root身份才能安装软件 1. yum -y install nautilus-open-terminal 2. reboot

  9. 【转】ubuntu右键在当前位置打开终端

    ubuntu右键在当前位置打开终端   ubuntu增加右键命令:   在终端中打开   软件中心:   搜索nautilus-open-terminal安装   命令行:   sudo apt-ge ...

随机推荐

  1. BZOJ1697: [Usaco2007 Feb]Cow Sorting牛排序

    1697: [Usaco2007 Feb]Cow Sorting牛排序 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 387  Solved: 215[S ...

  2. SDL2.0 学习笔记-1 windows下的第一个测试程序

    SDL全称是Simple DirectMedia Layer,是一个开源的.跨平台(win32,linux,mac)的多媒体开发c语言库. 官方网站 http://www.libsdl.org/ 第一 ...

  3. cf581C Developing Skills

    Petya loves computer games. Finally a game that he's been waiting for so long came out! The main cha ...

  4. DLL模块:extern "C"的简单解析

    1.揭密extern "C" extern "C"包含双重含义,从字面上即可得到:首先,被它修饰的目标是 "extern”的:其次,被它修饰的目标是 ...

  5. HDU-5504(逻辑if-else大水题)

    Problem Description You are given a sequence of N integers. You should choose some numbers(at least ...

  6. Jquery css函数用法(判断标签是否拥有某属性)

    判断一个层是否隐藏:$("#id").css("display")=="none"  ;在所有匹配的元素中,设置一个样式属性的值:$(&qu ...

  7. (转) xcodebuild和xcrun自动化编译ipa包 笔记

    转自:http://blog.csdn.net/totogo2010/article/details/8883100 打包过程 xcodebuild负责将工程源文件编译成xxx.app xcrun负责 ...

  8. EditText设置可以编辑和不可编辑状态

    1.首先想到在xml中设置android:editable="false",但是如果想在代码中动态设置可编辑状态,没有找到对应的函数 2.然后尝试使用editText.setFoc ...

  9. onActivityResult不执行 或者 onActivityResult的解决方法

    开发人员都知道,可以通过使用 startActivityForResult() 和 onActivityResult() 方法来传递或接收参数.然而在一次使用中,还没等到被调用的 Activity 返 ...

  10. Android利用setLayoutParams在代码中调整布局(Margin和居中)

    我们平常可以直接在xml里设置margin,如: <ImageView android:layout_margin="5dip" android:src="@dra ...