Replace nautilus with pcmanfm

I'm sponsoring the upload of pcmanfm and I think it's a very interesting piece of software.

There's a new upload coming, and I'd like it to have some instructions on how to replace nautilus with pcmanfm, and possibly how to go back to nautilus.

Here's the best I found.

Replacing nautilus with pcmanfm

To have pcmanfm start instead of nautilus:

  1. Go to Desktop -> Preferences -> Session manager
  2. Go to the 'Current Session' tab
  3. There's an entry like 40 Restart nautilus --sm-config-prefix /nautilus-SoMeThInG/: remove it
  4. Go to the 'Startup Programs'
  5. Add an entry to run pcmanfm

Alternatively:

  1. Run gnome-session-remove nautilus
  2. Go to Desktop -> Preferences -> Session manager
  3. Go to the 'Startup Programs'
  4. Add an entry to run pcmanfm

To configure pcmanfm to draw the background:

  1. Run pcmanfm
  2. Go to Edit -> Preferences
  3. Go to the Desktop tab
  4. Enable "Show file icons on desktop"
  5. Customise wallpaper as you wish

Alternatively, I wrote a little script that will generate a ~/.pcmanfm/main configuration file from you taking some settings from gconf:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

# Generate a pcmanfm configuration file reading values from gconf

echo "# ~/.pcmanfm/main configuration file generated by $0"
echo

echo '[General]'
echo 'terminal=gnome-terminal'
echo

echo '[Desktop]'
echo 'showDesktop=1'

# Detect wallpaper setting
WALLPAPER=`gconftool-2 --get /desktop/gnome/background/picture_filename`
if ! [ -z "$WALLPAPER" ]
then
    echo 'showWallpaper=1'
    echo "wallpaper=$WALLPAPER"
fi

# Detect color setting (doesn't really work: I could not find significant keys)
#COLOR=`gconftool-2 --get /desktop/gnome/background/primary_color`
#if ! [ -z "$COLOR" ]
#then
#   R=$(( $(printf %d 0x${COLOR:1:2}) * 65536 / 256 ))
#   G=$(( $(printf %d 0x${COLOR:3:2}) * 65536 / 256 ))
#   B=$(( $(printf %d 0x${COLOR:5:2}) * 65536 / 256 ))
#   echo "Bg1=$R,$G,$B"
#fi

Getting nautilus again

  1. Kill pcmanfm
  2. Run nautilus: it will register itself with the session manager

Open questions

Originally, I had nautilus registered in the session manager as something like nautilus --sm-config-prefix /nautilus-SoMeThInG/. After removing it and having it reregister itself, I have it only as nautilus. I have not been able to find out what is the difference.

It would also be cool to have a little program that registers pcmanfm as a 'Restart' entry with priority 40, just like nautilus.