5

I can't find the answer to this simple question.

What command should I use to open pcmanfm in a specific directory?
As an example, I want to run: pcmanfm /home/truc/musique.
However, this doesn't seem to work and the manpage isn't very helpful.

boris
  • 51
  • Which Ubuntu version and which pcmanfm version are you using? It should open a directory without using any command line switches, but try pcmanfm -d /home/truc/musique. (The -d is for running pcmanfm as a daemon, and doesn't stand for directory, but there are very few command line switches available with pcmanfm. –  Feb 19 '13 at 17:29

3 Answers3

7

Entering pcmanfm /home/$USER/folder should successfully open the folder (it does on 12.04), and so perhaps there is a problem with your installation. You could reinstall pcmanfm, or try specifying the daemon mode when you open a folder:

pcmanfm -d /home/$USER/folder

The -d stands for daemon mode and not directory; you used to be able to use -t for new tab and -n for new window with pcmanfm, but those switches don't seem to work now.

The manpage doesn't list all the options, so to list them all run pcmanfm --help. One further option which might be of interest is the --display= option, but you shouldn't need to specify a display if you only have the one. (Your current display can be found with echo $DISPLAY). So, an example command running pcmanfm in daemon mode and specifying a display would be:

pcmanfm -d /home/mike/Videos --display=:0.0

Here are the other options found with pcmanfm --help, for version 0.9.10 (Precise):

Application Options:
  -p, --profile=<profile name>         Name of configuration profile
  -d, --daemon-mode                    Run PCManFM as a daemon
  --no-desktop                         No function. Just to be compatible with nautilus
  --desktop                            Launch desktop manager
  --desktop-off                        Turn off desktop manager if it‘s running
  --desktop-pref                       Open desktop preference dialogue
  -w, --set-wallpaper=<image file>     Set desktop wallpaper
  --wallpaper-mode=<mode>              Set mode of desktop wallpaper. <mode>=(colour|stretch|fit|centre|tile)
  --show-pref=n                        Open preference dialogue. 'n' is number of the page you want to show (1, 2, 3...).
  --display=DISPLAY                    X display to use
  • I confirmed pcmanfm /home/$USER/folder worked in Lubuntu 13.10. That allowed me to create a shortcut to a folder in my desktop. Right click in desktop, choose create new (shortcut) and write pcmanfm /home/$USER/folder where it asks for a command). – pablofiumara Nov 25 '13 at 22:56
1

Try this:

pcmanfm --desktop-off
pcmanfm /home/ --no-desktop
Python Student
  • 558
  • 6
  • 16
0
pcmanfm /home/nafis/touch/ ## this works for me. 

if you are running from a script, in that case use the absolute path for pcman. In some machines, script does not get the path.

## In one of my script, I see I have Written in this way
/usr/bin/pcmanfm /home/nafis/touch/ 

##In the same script, opening chromium-browser was like this. 
chromium-browser http://askubuntu.com/questions/258254/how-do-i-open-pcmanfm-in-a-specific-directory

Try the absolute path. and the man-page is helpful.