Ubuntu,右键->在终端中打开(apt-install,或者手动增加右键菜单)
2024-08-28 19:27:58
方法一:
sudo apt-get install nautilus-open-terminal
然后重启
方法二:
Ubuntu中,默认右键菜单中没有“在终端中打开”。要想添加此菜单,可以在主目录中新建如下内容的脚本文件:
- #!/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
https://blog.csdn.net/eker_ch/article/details/20801995
最新文章
- NPM 使用淘宝镜像
- 自然语言14.1_python实现PorterStemmer算法
- 关于android端的json传输
- SASS学习笔记2 —— 语法
- RecyclerView, ListView 只显示一行内容 问题解决
- JAVA学习第四十七课 — IO流(一):文件的读写
- javaTemplates-学习笔记二
- JavaScript、Python、java、Go算法系列之【快速排序】篇
- Python基础2 编码和逻辑运算符
- pyquery 学习
- 【Luogu3602】Koishi Loves Segments(贪心)
- MyBatis架构与源码分析<;资料收集>;
- CentOS下安装Docker-CE
- Java快速学习笔记01
- el-upload源码跳坑2
- 【原创】uwsgi中多进程+多线程原因以及串行化accept() - thunder_lock说明
- [k8s]metricbeat的kubernetes模块&;kube-metric模块
- Struts2小demo遇到的几个问题
- 反射机制,jvm,class类型
- JVM(二):垃圾回收
热门文章
- C# Aspect-Oriented Programming(AOP) 利用多种模式实现动态代理
- redirect_uri 参数错误
- HDU1203 I NEED A OFFER! 【贪心】
- 囧 appspot.com/
- RocketMQ集群消费的那些事
- Android Unable to execute dex: method ID not in [0, 0xffff]: 65536 问题解决方法
- 每日技术总结:fly.js,个位数前补零等
- python,寻找班级里面名字最长的人
- mycat快速体验(转)
- Linux CentOS PhpMyAdmin安装--转载