zoukankan      html  css  js  c++  java
  • nautilus-open-terminal----在当前目录下打开终端

    nautilus-open-terminal很有用的插件--鼠标右键打开终端

    1.1
    fedora安装
    # yum -y install nautilus-open-terminal安装nautilus-open-terminal,注销下X桌面即可

    ubuntu安装
    #sudo apt-get install nautilus-open-terminal

    1.2在用源码包安装时如果出现这个错误

    checking for NAUTILUS... configure: error: Package requirements (lib nautilus-extension >= 2.17.2 glib-2.0 >= 2.4.0) were not met:

    Package gio-2.0 was not found in the pkg-config search path.Perhaps you should add the directory containing `gio-2.0.pc'to the PKG_CONFIG_PATH environment variablePackage 'gio-2.0', required by 'libnautilus-extension', not foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables NAUTILUS_CFLAGSand NAUTILUS_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.

    说明有相关安装包没有:
    利用build-dep选项安装所有依赖包
    sudo apt-get build-dep nautilus-open-terminal
    (apt-get build-dep 自动下载并安装通过源码创建 时需要的包。 只有apt 0.5以上版本才支持这个功能)
    特别地,建议无论是否报错都装一下这个,要不下面还是会报错。

    1.3其他解决方案

    利用nautilus脚本
    1打开文件夹 
    cd ~/.gnome2/nautilus-scripts/
    在该文件夹下下新建脚本文件,gedit open_nautilus_terminal
    版本一:
    #!/bin/bashcd `dirname $NAUTILUS_SCRIPT_CURRENT_URI`
    exec gnome-terminal
    
    我的系统下用这个没有成功!!!
    版本二:
    更高级的一个脚本
    #!/bin/bash
    base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
    
    if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
    dir=${base}
    else
    while [ ! -z "$1" -a ! -d "${base}/$1" ]; do
    shift
    done
    dir="${base}/$1"
    fi
    
    gnome-terminal --working-directory="${dir}"



    2.更改权限
    chmod +x open_nautilus_terminal

    3.这时就可以在右键菜单-》脚本-》open_nautilus_terminal,点击就可以在nautilus当前位置打开终端了,替换脚本1内容,或右键选中一个文件夹时,点击--》脚本--》open_nautilus_terminal就可以在选中的文件夹位置打开终端



    参考http://blog.csdn.net/a511244213/article/details/44955469
  • 相关阅读:
    ajax专题
    luogu P1346 电车 最短路
    luogu P1462 通往奥格瑞玛的道路 最短路
    luogu P1328 生活大爆炸版石头剪刀布
    luogu P1315 联合权值 枚举
    luogu P1156 垃圾陷阱 背包问题
    luogu P1217 回文质数 枚举
    luogu P3650 滑雪课程设计 枚举
    luogu1209 修理牛棚 贪心
    luogu P1223 排队接水 贪心
  • 原文地址:https://www.cnblogs.com/shixun/p/7137248.html
Copyright © 2011-2022 走看看