个人工具

“Dolphin4ubuntu”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(以内容'使Dolphin成为Ubuntu默认文件管理器 ==面板-位置== ==桌面文件夹=='创建新页面)
 
面板-位置
第1行: 第1行:
 
使[[Dolphin]]成为Ubuntu默认文件管理器
 
使[[Dolphin]]成为Ubuntu默认文件管理器
 
==面板-位置==
 
==面板-位置==
 +
1.备份
 +
<pre>sudo mv /usr/bin/nautilus /usr/bin/nautilus.real</pre>
 +
2.重建
 +
<pre>sudo gedit /usr/bin/nautilus</pre>
 +
3.修改脚本
 +
<pre>#!/bin/bash
 +
 +
#zenity --info --text="${1}/${@}" #DEBUG
 +
if [ -n "${1}" ]; then
 +
    if [ "${1:0:1}" == "/" ]; then
 +
        dolphin "${1}"
 +
    elif [ "${1}" == "--no-desktop" ]; then
 +
        if [ -n "${2}" ]; then
 +
            if [ "${2:0:7}" == "file://" ] || [ "${2:0:1}" == "/" ]; then
 +
                dolphin "${2}"
 +
            else
 +
                nautilus.real "${2}"
 +
            fi
 +
        else
 +
            dolphin
 +
 +
 +
        fi
 +
    else
 +
        nautilus.real "${@}"
 +
    fi
 +
else
 +
    dolphin
 +
fi
 +
</pre>
 +
4.权限
 +
<pre>sudo chmod 755 /usr/bin/nautilus</pre>
 +
 
==桌面文件夹==
 
==桌面文件夹==

2010年6月23日 (三) 22:00的版本

使Dolphin成为Ubuntu默认文件管理器

面板-位置

1.备份

sudo mv /usr/bin/nautilus /usr/bin/nautilus.real

2.重建

sudo gedit /usr/bin/nautilus

3.修改脚本

#!/bin/bash

#zenity --info --text="${1}/${@}" #DEBUG
if [ -n "${1}" ]; then
    if [ "${1:0:1}" == "/" ]; then
        dolphin "${1}"
    elif [ "${1}" == "--no-desktop" ]; then
        if [ -n "${2}" ]; then
            if [ "${2:0:7}" == "file://" ] || [ "${2:0:1}" == "/" ]; then
                dolphin "${2}"
            else
                nautilus.real "${2}"
            fi
        else
            dolphin


        fi
    else
        nautilus.real "${@}"
    fi
else
    dolphin
fi

4.权限

sudo chmod 755 /usr/bin/nautilus

桌面文件夹