Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  user76204 Feb 19 '13 at 17:29

3 Answers 3

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
share|improve this answer
    
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

Try this:

pcmanfm --desktop-off
pcmanfm /home/ --no-desktop
share|improve this answer
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.