Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / 给Ubuntu右键快捷菜单添加终端栏目

第一种方法:给Ubuntu安装一个包,即可在右键里面添加一个“打开终端”的菜单。sudo apt-get install nautilus-open-terminal第二种方法:
进入主目录的.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" ]; thenset $NAUTILUS_SCRIPT_SELECTED_FILE_PATHSif [ $# -eq 1 ]; thendestination="$1"# Go to file"s directory if it"s a fileif [ ! -d "$destination" ]; thendestination="`dirname "$destination"`"fielsezenity --error --title="Error - Open terminal here" --text="You can only select one directory."exit 1fielsedestination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed "s/^file:////"`"fi# It"s only possible to go to local directoriesif [ -n "`echo "$destination" | grep "^[a-zA-Z0-9]+:"`" ]; thenzenity --error --title="Error - Open terminal here" --text="Only local directories can be used."exit 1ficd "$destination"exec x-terminal-emulator
添加完后,把此文件加上可执行的权限。chmod +x 文件
  • 1
  • 2
  • 下一页
CentOS 4.7下载地址与截图Anjuta在Ubuntu中的安装相关资讯      Ubuntu教程 
  • Ubuntu教程 - 使用Ubuntu拷贝CD和  (12/18/2013 14:38:16)
  • 让Ubuntu 12.10支持RAR和7Z文件解  (11/15/2012 18:51:50)
  • Windows 7硬盘安装Ubuntu 12.10图  (11/03/2012 19:22:47)
  • 完美安装Ubuntu 12.10最新AMD显卡  (11/27/2012 08:17:47)
  • Win 7硬盘安装Ubuntu 12.10  (11/05/2012 13:30:34)
  • 虚拟机上Ubuntu 11.10升级到12.04  (10/12/2012 20:00:38)
本文评论 查看全部评论 (0)
表情: 姓名: 字数