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

  • 相关阅读:
    JavaScript进行表单提交
    《构建之法》读书笔记2
    一个简单的session传值学习
    javascript相关正则收集
    LINQ中join语法大探究(多表关联),也有不少疑问
    c#排序算法详细探究
    js获得文本框中光标的位置
    linq to sql基本的操作(读,添加,删除,更新)
    不用保存直接读取文件内容
    终于搞明白ajax拉
  • 原文地址:https://www.cnblogs.com/findumars/p/8718764.html
Copyright © 2011-2022 走看看