方法一:

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. 【例题 8-2 UVA-1605】Building for UN

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 两层 然后n*n就够了 第一层类似 aaa.. bbb.. ccc.. ... 第二次则变成 abc.... abc.... abc ...

  2. 洛谷 P2640 神秘磁石

    P2640 神秘磁石 题目背景 在遥远的阿拉德大陆,有一种神秘的磁石,是由魔皇制作出来的, 题目描述 1.若给他一个一维坐标系,那么他的磁力一定要在素数坐标的位置上才能发挥的最大(不管位置坐标的大小, ...

  3. 玩转Bootstrap(基础) -- (6.导航条基础)

    1.导航条样例 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" ...

  4. django 简单会议室预约(1)

    django 是python的一个web框架,为什么要用django,作者之前用过另一个框架flask,虽然flask比较简单很容易让人学,但是flask没有整体感,会让初学着茫然. 这里我们用dja ...

  5. Servlet的异常处理机制

    一 声明式异常处理   在web.xml中对声明对各种异常的处理方法. 通过 <error-page>元素来声明. 此元素的结构如下:                    +------ ...

  6. Android 撕衣服(刮刮乐游戏)

    项目简单介绍: 该项目为撕衣服,相似刮刮乐游戏 具体介绍: 用户启动项目后.载入一张图片,当用户点击图片的时候,点击的一片区域就会消失.从而显示出在这张图片以下的图片 这个小游戏相似与刮奖一样,刮开涂 ...

  7. 删除dataGridview中选中的一行或多行

    一.实现的功能:可以删除一行或者多行数据,并在删除前提醒是否确定进行删除! DialogResult RSS = MessageBox.Show(this,"确定要删除选中行数据码?&quo ...

  8. python获取序列中最大值

    test =[ [1, 2, 3], [4, 5, 6], [7, 8, 9]]   #这个就可以看做是二维数组了,直接创建print(test)print(test[:][1])           ...

  9. CSS笔记 - fgm练习 2-10 - 提示框效果 (清除子元素浮动高度塌陷的影响)

    CSS清除浮动方法参考: https://blog.csdn.net/promiseCao/article/details/52771856 <style> *{ margin: 0; p ...

  10. js里的表格数组某个key去重

    如Elemgnt的table绑定的数据要某个key是唯一的 var myarry = [ {name: 'liuyang',age :13}, {name:'jike',age:15}, {name: ...