Use Thunar as default Gnome file manager

|

Thunar is the new file manager of Xfce Desktop, it's very similar to the Gtk file selector and it's extremely fast and use less RAM than Nautilus.

I tried to replace "nautilus" with "thunar" in gconf-editor with no success so I investigated to find a smarter solution. The first idea I got was to replace /usr/bin/nautilus with thunar, but this lightweight fm doesn't draw the desktop so the option "--no-desktop" wasn't recornized.

So here what I did to use Thunar as much as possible(*)

Install Thunar as the default file manager 

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

and this is the new /usr/bin/nautilus

#!/usr/bin/ruby
if ARGV[0].nil? or ARGV[0][0..0]=='/'
system("thunar #{ARGV[0]}")
elsif ARGV[1][0..6]=='file://'
system("thunar #{ARGV[1]}")
else system("nautilus.real #{ARGV.join(" ")}")
end
#system("zenity --info --text=\"#{ARGV.join(" ")}\"") #DEBUG

In this way all common URLs are passed to Thunar, but special ones are forwarded to nautilus.real 

Notes 

  • If Nautilus draws the desktop, that icons will open with the REAL Nautilus (you can disable nautilus in the session)
  • Sorry for the ruby dependency but I'm not a bash hacker (You are free to post a bash version)

(*) Thunar doesn't support gnome-vfs filesystem, like smb:// webdav:// ssh:// computer:///, so you have to use nautilus in that circumstance.

Rispondi

Il contenuto di questo campo è privato e non verrà mostrato pubblicamente.
  • Linee e paragrafi vanno a capo automaticamente.
Maggiori informazioni sulle opzioni di formattazione.