• 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.在文件夹 ~/.gnome2/nautilus-scripts/ 下新建脚本文件如open_nautilus_terminal名字

    #!/bin/bashcd `dirname $NAUTILUS_SCRIPT_CURRENT_URI`
    exec gnome-terminal

    2.更改权限
    chmod +x open_nautilus_terminal

    3.这时就可以在右键菜单-》脚本-》open_nautilus_terminal,点击就可以在nautilus当前位置打开终端了表情图片

    更高级的一个脚本

    #!/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}"

    替换脚本1内容,这时我们可以在右键选中一个文件夹时,点击--》脚本--》open_nautilus_terminal就可以在选中的文件夹位置打开终端

  • 相关阅读:
    经典数组排序方法------快速排序法
    经典数组排序方法------选择排序法,冒泡排序法
    两个非常好的bootstrap模板,外送大话设计模式!
    商场促销-策略模式(和简单工厂模式很像的哇) C#
    代码无错就是优?简单工厂模式 C#
    大话设计模式(C#)
    马加爵遗书 VS 药家鑫遗书
    GIT 常用命令
    Random快速产生相同随机数的原因及解决方案
    JSON WEB TOKEN,简单谈谈TOKEN的使用及在C#中的实现
  • 原文地址:https://www.cnblogs.com/Ph-one/p/5944728.html
Copyright © 2020-2023  润新知