方法一:

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

最新文章

  1. NPM 使用淘宝镜像
  2. 自然语言14.1_python实现PorterStemmer算法
  3. 关于android端的json传输
  4. SASS学习笔记2 —— 语法
  5. RecyclerView, ListView 只显示一行内容 问题解决
  6. JAVA学习第四十七课 — IO流(一):文件的读写
  7. javaTemplates-学习笔记二
  8. JavaScript、Python、java、Go算法系列之【快速排序】篇
  9. Python基础2 编码和逻辑运算符
  10. pyquery 学习
  11. 【Luogu3602】Koishi Loves Segments(贪心)
  12. MyBatis架构与源码分析<资料收集>
  13. CentOS下安装Docker-CE
  14. Java快速学习笔记01
  15. el-upload源码跳坑2
  16. 【原创】uwsgi中多进程+多线程原因以及串行化accept() - thunder_lock说明
  17. [k8s]metricbeat的kubernetes模块&kube-metric模块
  18. Struts2小demo遇到的几个问题
  19. 反射机制,jvm,class类型
  20. JVM(二):垃圾回收

热门文章

  1. C# Aspect-Oriented Programming(AOP) 利用多种模式实现动态代理
  2. redirect_uri 参数错误
  3. HDU1203 I NEED A OFFER! 【贪心】
  4. 囧 appspot.com/
  5. RocketMQ集群消费的那些事
  6. Android Unable to execute dex: method ID not in [0, 0xffff]: 65536 问题解决方法
  7. 每日技术总结:fly.js,个位数前补零等
  8. python,寻找班级里面名字最长的人
  9. mycat快速体验(转)
  10. Linux CentOS PhpMyAdmin安装--转载