方法一:

sudo apt-get install nautilus-open-terminal

然后重启

方法二:

Ubuntu中,默认右键菜单中没有“在终端中打开”。要想添加此菜单,可以在主目录中新建如下内容的脚本文件:

  1. #!/bin/bash
  2. # This script opens a gnome-terminal in the directory you select.
  3. # Distributed under the terms of GNU GPL version 2 or later
  4. # Install in ~/.gnome2/nautilus-scripts or ~/Nautilus/scripts
  5. # You need to be running Nautilus 1.0.3+ to use scripts.
  6. # When a directory is selected, go there. Otherwise go to current
  7. # directory. If more than one directory is selected, show error.
  8. if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
  9. set $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
  10. if [ $# -eq 1 ]; then
  11. destination="$1"
  12. # Go to file's directory if it's a file
  13. if [ ! -d "$destination" ]; then
  14. destination="`dirname "$destination"`"
  15. fi
  16. else
  17. zenity --error --title="Error - Open terminal here" \
  18. --text="You can only select one directory."
  19. exit 1
  20. fi
  21. else
  22. destination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed 's/^file:\/\///'`"
  23. fi
  24. # It's only possible to go to local directories
  25. if [ -n "`echo "$destination" | grep '^[a-zA-Z0-9]\+:'`" ]; then
  26. zenity --error --title="Error - Open terminal here" \
  27. --text="Only local directories can be used."
  28. exit 1
  29. fi
  30. cd "$destination"
  31. exec x-terminal-emulator

https://blog.csdn.net/eker_ch/article/details/20801995

Ubuntu,右键->在终端中打开(apt-install,或者手动增加右键菜单)的更多相关文章

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

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

  2. ubuntu/centos printk 终端中不能打印信息及解决办法

    今天用ubuntu来调试信息,printk死活打印不出信息,即使把级别跳到<0>,即KERN_ALERT也不行,后再搜了好长时间网络, 这个地址:http://bbs.chinaunix. ...

  3. Ubuntu14.04 在右键中添加 在终端中打开

    1.在terminal中执行: sudo apt-get install nautilus-open-terminal 此时可能会提示:nable to locate package nautilus ...

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

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

  5. linux 在终端中打开图形化文件管理器

    虽然终端十分强大,但在少数使用终端的时候,会突然需要图形化文件管理器的帮忙. 命令: xdg-open "dir" 例如 xdg-open ./ 用图形化文件管理器打开当前文件夹 ...

  6. shell 在终端中打开另一个终端执行命令

    gnome-terminal -x bash -c "/home/XX/cc.sh; exec bash"

  7. 解决Ubuntu下在firefox中打开Microsoft Outlook Web Access中文乱码

    Edit---Preference--Content--Languages--Choose...---Select a langue to add... 添加中文

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

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

  9. ubuntu - 14.04,如何使用鼠标右键菜单在shell中打开选择项目?

    在shell中执行:“sudo apt-get install nautilus-open-terminal”,随后重新启动系统,在要打开的文件夹上面鼠标右键,会有一个菜单项目“在终端中打开”,点击后 ...

随机推荐

  1. Vue的style与class

    1. style 可以通过 :style="{height:`${heightData.main}px`}" 实现样式的动态绑定, style绑定的是一个对象,多个样式时用“,”隔 ...

  2. Jquery获取select选中的option的文本信息

    注意:以下用的$(this)代表当前选中的select框 第一种: $(this).children("option:selec... ...查看全文

  3. RHEL6安装调试过程中遇到的问题集

    /*** **问题集 2014/6/9 20:55:52** **Autor: Weigong Xu ** ***/ 1. Linux中开启22port: 22port是ssh服务的.你仅仅要启动ss ...

  4. 117.C语言实现桌面输出图片,桌面输出文字,桌面画线

    通过获取窗口句柄,然后获取窗口DC,然后画图 #include <Windows.h> #include <stdio.h> //桌面画线 void drawLine() { ...

  5. Redis的高级应用-安全性和主从复制

    Redis的服务器命令和键值命令(String,Hash,List,Set,Zset)相对简单,只需查看文档即可. 文档地址: http://www.runoob.com/redis/redis-tu ...

  6. sampleviewer add menu item error 'assert'

    可以跟踪到 mfc提供的源代码内部,(注:如果打开了mfc源代码,设置了断点,但是跟不进去,那就需要更新PDB文件,具体网上搜)打开 wincore.cpp文件(D:\Program Files\Mi ...

  7. (转)看懂类图——UML类图基础

    类图 要学懂设计模式,就需要先看得懂类图,类与类之间的关系是学习设计模式的基础,而在软件工程中,类与类之间的关系是通过UML中的类图来体现. 这篇笔记包含的不会是类图的所有东西,包含的只是各个类之间的 ...

  8. datagridview问题

    在winform中,取datagridview某个单元格的值,然后与另外一个值相减,如果相减等于0,结果却为-7.105427357601E-15 Convert.ToDouble(xun_dataG ...

  9. Android 使用JSON格式与服务器交互 中文乱码问题解决

    当前是在开发Android 程序时,客户端与服务器端采用JSON传送数据,发现中文乱码问题.不过这个问题的解决办法应该对所有java语言开发的项目都使用. 解决方法是: 1.客户端发送数据之间加上: ...

  10. python课程:python3的数字与字符串

    一下是基于python2的教程的 python中有 多个数据类型,和,两种字符串类型 他们都是不可变的.