zoukankan      html  css  js  c++  java
  • Ubuntu,右键->在终端中打开(apt-install,或者手动增加右键菜单)

    方法一:

    sudo apt-get install nautilus-open-terminal

    然后重启

    方法二:

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

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

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

  • 相关阅读:
    Mac Finder 里新建文本
    SourceTree 无法查看组织仓库
    Android Gradle 指定 Module 打包
    Mac 下安装安卓 apk 文件
    Android 瘦身之道 ---- so文件
    Android Google AdMob 广告接入示例
    Java 垃圾回收(GC) 泛读
    [麻雀虽小]记 简易Markdown阅读器 开发全过程
    Git 版本回滚
    线程与进程的区别及其通信方式
  • 原文地址:https://www.cnblogs.com/findumars/p/8718764.html
Copyright © 2011-2022 走看看