Ubuntu 添加右键终端
来源:互联网 发布:线切割手动编程 编辑:程序博客网 时间:2024/05/02 00:16
第一种方法:
安装一个包,即可在右键里面添加一个“打开终端”的菜单。
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" ]; 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 添加右键终端
- ubuntu右键添加终端
- Ubuntu 添加右键打开终端
- ubuntu右键添加打开终端
- ubuntu添加终端到右键
- ubuntu右键添加终端选项
- ubuntu 添加右键启动终端
- 【linux】ubuntu右键添加终端
- 在ubuntu右键中添加终端快捷键
- ubuntu在桌面右键中添加终端
- ubuntu在右键添加 终端 命令
- Ubuntu terminal终端添加右键菜单
- ubuntu在右键添加 终端 命令
- ubuntu fedora 添加右键 打开终端
- Ubuntu 怎么在右键添加打开终端
- Ubuntu 怎么在右键添加打开终端
- Ubuntu怎么在右键添加打开终端
- 右键添加打开终端
- 软件随想录
- 杭电 1081 To The Max
- JS advice: Be careful the difference between Undefined and ‘ ’
- asterisk dialplan中MYSQL命令的使用
- 推箱子,增加箱子是否卡死的简单判断,别小看这段代码,可大量剪枝,效率提升可观。
- Ubuntu 添加右键终端
- Eclipse/MyEclipse中SVN代理使用及设置SVN代理方法详解
- KPI 绩效管理
- [C++] 浮点数格式化输出
- SOP是Standard Operation Procedure三个单词中首字母的大写 ,即标准作业程序
- 补充点编译的基本常识
- Oracle开发专题之:分析函数(OVER)
- 数据库客户端访问的匹配
- 浅谈JavaScript编程语言的编码规范