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

  • 相关阅读:
    .ssh/config 文件的解释算法及配置原则
    不fq安装 golang tools
    iOS 组件化的几篇文章
    第一把机械键盘 ikbc C-87
    我推荐的 Java Web 学习路线
    【吐槽向】iOS 中的仿射变换
    Spring 对缓存的抽象
    Spring 事务管理笔记
    Swift 笔记汇总
    Java 类加载器
  • 原文地址:https://www.cnblogs.com/findumars/p/8718764.html
Copyright © 2011-2022 走看看