How to run Dolphin instead of Nautilus?

19,582

There are several caveats in what you tried to do. I already mentioned the danger introduced by your approach:

Next time nautilus is going to be updated, your dolphin gets overwritten (as your link points there). Same goes for gnome-terminal.

So we figured, this was not a good idea :)

But there are some ways to try working around, so "x" gets run when "z" was requested -- but I'm not aware of any as soon not "z", but "/full/path/to/z" gets called. As long as it is just "z":

  • creating an alias for z, like alias z=x (works on a per-user-level -- or globally, depending on where it was defined)
  • creating a "replacement" for z in a location mentioned in the PATH before the location the real z resides in

A little more details on the second approach. Taking your original problem, you want to have dolphin executed whenever nautilus is called upon. You already found nautilus at /usr/bin/nautilus. Now let's (probably correctly) assume your $PATH contains (in this order) /usr/local/bin:/usr/bin -- so you see /usr/local/bin would be searched before /usr/bin. So we simply create a shell script /usr/local/bin/nautilus with the following content:

#!/bin/bash
/usr/bin/dolphin %$@

So what will happen? If you (or some script/program/daemon/...) invokes nautilus, this will execute /usr/local/bin/nautilus (as this is the first "nautilus" found in the PATH), which simply starts /usr/bin/dolphin -- voila! But if the "whatever" uses the full path, this won't work.

So you say: Hey, why didn't Izzy say "just do a ln -s /usr/bin/dolphin /usr/local/bin/nautilus?" Sure you can do that -- and it will work the same. But using a script as shown may come in handy if you need to introduce additional parameters which are not passed with the original call. With above script, dolphin simply gets passed the same parameters the original call used (%$@). But you can play around with things in the script, replace parameters, etc. As for your current problem, the link would be enough (as long as nautilus doesn't get called with the full path).

Share:
19,582

Related videos on Youtube

Forty-Two
Author by

Forty-Two

OCCUPATION: English as Foreign Language (EFL) Teacher in Japan. MULTIMEDIA: Can answer scripting questions related to HTML, CSS, JavaScript, Jquery Can answer design questions related to Photoshop, Illustrator, Inkscape, Gimp, Synfig Can answer 3D questions related to Blender, Maya, Polygon, Nurbs, SubDivision modeling etc. Specialize in web design, graphic design, photography video and print FAMILY: Oldest of two brothers and one sister. Am currently married with no children as of yet :p INTEREST/HOBBY: Some things I really enjoy in random order are: Playing guitar Playing piano Going on dates with my wife Going to 3d theater with my wife Spending time with friends and with wife Studying Christian philosophy and theology and history Teaching people about God Reading Japanese manga Studying Japanese, Korean, Greek and Hebrew Watching japanese Anime Web design, html5 and css3 3D modeling using Open source software such as BLENDER Digital Photography and Graphic Design Old Christian HYMNs redone Family worship Reformed Theology and theological discussion and debate Neighborhood ecclesiology with christian fellowship and corporate worship based on location rather than association Teaching English to Japanese people RELIGIOUS BELIEFS: Soteriology: Doctrines of Grace, Three Forms of Unity, TULIP, 5 Solas Ecclesiology: Neighborhood fellowship, Obedience is worship, The word Ecclesia does not mean church and is usually used by the Jewish writers of the New Testament to refer to the word Qahal in Hebrew which refers to any number of a multitude of people. Spiritually it refers to God's elect multitude who belong to Him and were saved through Jesus' propitiating sacrifice which is often called "the invisible church" What theologians refer to as "the visible church" is often not explained well and should not refer to "a church" but should refer to believers anywhere living obedient lives of faith whether they are alone in a desert or members of a family or l

Updated on September 18, 2022

Comments

  • Forty-Two
    Forty-Two over 1 year

    For various reasons, one being that I like it more, I want to run Dolphin as my default file manager in stock Ubuntu 12.04. I've installed dolphin.

    I've done:

    sudo mv /usr/bin/nautilus /usr/bin/natilus.back && sudo ln -s /usr/bin/dolphin /usr/bin/nautilus
    

    which makes any program calling Nautilus open Dolphin instead. This is all fine and dandy so far but dolphin wants to call konsole as the default terminal but I would like to make it call gnome-terminal as default instead.

    I tried:

    sudo ln -s /usr/bin/gnome-terminal /usr/bin/konsole
    

    making a link of gnome-terminal called konsole, but that did not work. I don't get an error from Dolphin anymore but just nothing happens. The terminal panel is just blank.

    Anyone know how to do this, or if there is a better way to implement dolphin as default FM I'm all ears.


    UPDATE 20120727

    Since then I realized that I had not used a sym link in the first place. Instead, I used a more clever approach

    1. Make a folder in your home directory called bin

      mkdir ~/bin
      
    2. Make a script called Nautilus that executes Dolphin and put it in this folder

      gedit ~/bin/nautilus
      

      Then copy this code into it and save

      #!/bin/bash
      exec dolphin $@
      exit 0
      

    This is the safest way to make Dolphin your default browser, as well as going into the /usr/share/applications folder and changing the 3 nautilus .desktop files to launch Dolphin instead of Nautilus.

    BUT this does not fix the two problems Dolphin has

    1. it wants to launch the konsole terminal instead of gnome-terminal.
    2. it's icons are hideous and qt4-qtconfig can not change them.

    UPDATE 20120810

    To fix the ugly oxygen icons to match your system theme, qt4-qtconfig tool is not sufficient. You will need to install the KDE system settings application

    sudo apt-get install systemsettings 
    

    Launch the application
    From there go to Application Appearance>Icons and change as needed

    My default File Manager in Ubuntu 12.04 GNOME-SHELL is now THE QT DOLPHIN FILE MANAGER. I'M A GENIOUS!!!! This works perfect! THANKS TO YOU ALL!!

    • Admin
      Admin almost 12 years
      For a temporary solution, I simply installed Konsole, but I really hope in the future to use Dolphin with gnome-terminal... Konsole isn't that bad though... I may stick with it but ... that doesn't answer my above question/problem
    • Admin
      Admin almost 12 years
      You are aware of some serious trouble you introduced to your system? Next time nautilus is going to be updated, your dolphin gets overwritten (as your link points there). Same goes for gnome-terminal. It's usually not a good idea to meddle with things like that -- maybe you should consider switching to KDE :)
    • Admin
      Admin almost 12 years
      It's truth that Dolphin>Nautilus, but it is hard to switch to another file manager under ubuntu and have it fully-featured :/
    • Admin
      Admin almost 12 years
      The terminal panel is hardcoded in dolphin source, also it interacts with it through code(i.e. changes directories accordingly) using some predefined methods/functions, which the gnome-terminal may not support, so it doesn't seem to be possible with some configuration without modifying sources.
    • Admin
      Admin almost 12 years
      wow!!! @Izzy thanks for the warning. I didn't think about that at all. I will have to figure out another way then... I guess through .desktop files?
    • Admin
      Admin almost 12 years
      @Samik Thank you , that is good to know. I will just stick with Dolphin and Konsole then, since there is no work around.
    • Admin
      Admin over 11 years
      my favorite system is KDE but it is just too clunky to run on my out of date hardware. Gnome-shell for some reason runs quicker on my hardware. I do prefer KDE though, except I can't find anything that matches Gnome's workspace management....
  • Forty-Two
    Forty-Two almost 12 years
    Izzy, you're awesome as usual. I have upvoted your answer. Thanks for the info. I did learn that the way I had originally set Dolphin as default FM was not how I had thought. I actually made a script in ~/bin called nautilus which executes dolphin. So I updated my question. I think your answer here is still very relevant though and tried to word my question accordingly. Still would like to fix QT apps so they display Faenza themed icons... and still would like to use gnome-terminal but maybe i'm dreaming.
  • David Tod
    David Tod almost 12 years
    Thank you for the compliments -- and glad to read my answer helped you. As your initial question was answered, you might consider asking the other one separately (new question -- which would improve your chances for good answers; you could still link back here for the "initial story"), as it no longer matches the title? In that case you could even evaluate to accept my answer ;)