Difference between revisions of "PCManFM"

From ArchWiki
Jump to: navigation, search
(No icons?)
(Auto Mounting external storage devices)
(42 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category: File systems (English)]]
+
[[Category:File managers]]
[[Category: File managers (English)]]
+
[[cs:PCManFM]]
{{i18n|PCManFM}}
+
[[fr:PCManFM]]
 +
[[id:PCManFM]]
 
[[pl:PCManFM]]
 
[[pl:PCManFM]]
[[fr:PCManFM]]
+
[[ru:PCManFM]]
 
+
'''PCManFM''' is "an extremely fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).
'''PCManFM''' is "an extremly fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: [http://pcmanfm.sourceforge.net/ PCManFM on sourceforge]. PCManFM is the default file manager of the [[LXDE]] (Lightweight X11 Desktop Environment).
+
  
 
==Installation==
 
==Installation==
Line 17: Line 17:
 
==Volume handling==
 
==Volume handling==
 
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as [[pmount]]. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.
 
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as [[pmount]]. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.
{{Note|You must have a {{filename|/media}} folder.}}
 
===Mounting with udisks===
 
The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the [[D-Bus]] page for details. Note that you will most likely need to start dbus-launch from your [[xinitrc|.xinitrc]] or the autostart script of your window manager. Instructions on how to do so can be found on the [[D-Bus]] page or the page for your [[window manager]].
 
  
===Mounting with gvfs===
+
===Auto Mounting USB external storage devices===
If you prefer to use the Gnome Virtual FileSystem, the procedure is the same as before but requires additional packages:
+
To auto mount USB external storage devices only simply install gvfs:
  
* [[gvfs]] (and dependencies);
+
# pacman -S gvfs
* (optional) gvfs-smb, gvfs-obexftp, gvfs-afc, etc. in order to support additional features.
+
  
===Mounting as normal user===
+
If they do not auto mount after installing, try rebooting your system and try again.
To be able to mount devices like removeable USB harddisks, flashdrives or DVDs as a normal user, the [[PolicyKit]] toolkit needs to be configured accordingly. The configuration files can be found in the subdirectories of {{Filename|/etc/polkit-1}}. The rest of this section will show you how to configure PolicyKit to allow users belonging to the "storage" group to mount and umount temporary devices.
+
{{ Note | Many users experience trouble mounting with lightweight windows manager and [[SLiM]], adding '''''ck-launch-session dbus-launch''''' after exec in login_cmd option usually help}}
+
{{Note | Currently PolicyKit is configured to allow (un)mounting for users in group ''storage'' by default. Therefore this step is not necessary.}}
+
  
As root create {{filename|/etc/polkit-1/localauthority/50-local.d/55-myconf.pkla}} (or some other filename of your choosing ending with .pkla) containing:
+
===Mounting with udisks===
<pre style='overflow:auto'>
+
The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the [[D-Bus]] page for details.
[Storage Permissions]
+
 
Identity=unix-group:storage
+
===Trash support, browsing network shares, and automounting with gvfs===
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown
+
To resolve the "Operation not supported" error when clicking on Trash Can, you must do the following steps:<br />
ResultAny=yes
+
 
ResultActive=yes
+
1. Install package gvfs<br />
ResultInactive=no
+
2. Start pcmanfm only using the following command: dbus-launch pcmanfm<br />
</pre>
+
PolicyKit will notice the changes in the file and update its behavior without any action from you. Last thing to do is making every user that should have the ability to mount drives a member of the storage group:
+
# usermod -a -G storage USERNAME
+
  
If you want to grant other permissions instead of granting them to members of the storage group, or simply want to know what you were just doing, check out the manpage:
+
To browse network shares:<br />
$ man pklocalauthority
+
1. Install packages gvfs gvfs-smb gvfs-afp<br />
 +
2. Start pcmanfm only using the following command: dbus-launch pcmanfm<br />
 +
3. Type smb://<server name>/<share name> to access Windows / CIFS / Samba file shares<br />
 +
4. Type afp://<server name>/<share name> to access AFP file shares
  
 
==Tips & troubleshooting==
 
==Tips & troubleshooting==
 
===No "Applications"===
 
===No "Applications"===
 
  # pacman -S gnome-menus
 
  # pacman -S gnome-menus
 +
You can try this method: Delete all files in the $HOME/.cache/menus directory, and run PCManFM again.
  
===Trashcan not working?===
+
PCManFM requires the environment variable "XDG_MENU_PREFIX" to be set. The value of the variable should match the beginning of a file present in the "/etc/xdg/menus/" directory. In case you have installed the "gnome-menus" package, you can set the value in your .xinitrc file with the line :
# pacman -S gvfs consolekit
+
$ export XDG_MENU_PREFIX=gnome-
Make sure that you also add "ck-launch-session dbus-launch" (in this order) to the exec statement which launches your window manager/desktop environment in{{filename|.xinitrc}}.
+
See these threads for more informations : [https://bbs.archlinux.org/viewtopic.php?pid=1110903], and especially this post from the Linux Mint Forums [http://forums.linuxmint.com/viewtopic.php?f=175&t=53986#p501920]
  
So for example
+
===No icons?===
 +
If you are using a [[WM]] instead of a [[DE]] and you have no icons for folders and files, specify a gtk icon theme:
  
  exec openbox-session
+
Edit {{ic|~/.gtkrc-2.0}} '''or''' {{ic|/etc/gtk-2.0/gtkrc}} and add the following line:
 +
  gtk-icon-theme-name = "oxygen"
 +
{{Note|All instances of PCManFM have to be restarted for changes to apply!}}
  
would become
+
If you do not have {{pkg|oxygen-icons}} installed, use an different one ('''gnome''', '''hicolor''', and '''locolor''' do not work). To list all installed icon themes:
 +
ls ~/.icons /usr/share/icons/
  
exec ck-launch-session dbus-launch openbox-session
+
If none of them is suitable, install one. To list all installable icon packages:
 
+
  pacman -Ss icon-theme
Be aware, gvfs requires many gnome dependencies.
+
{{Tip|For an alternative GUI solution, install {{pkg|lxappearance}} and apply an icon theme from there.}}
 
+
===Not able to mount USB or other devices?===
+
# pacman -S consolekit
+
Make sure that you also add "ck-launch-session dbus-launch"(in this order) to {{filename|.xinitrc}}.
+
 
+
===No icons?===
+
If you are using a window manager over a desktop environment and notice you have no icons for folders and files, install an icon theme:
+
  # pacman -S tangerine-icon-theme
+
 
+
Then edit {{Filename|~/.gtkrc-2.0}} '''or''' {{Filename|/etc/gtk-2.0/gtkrc}} and add the following line:
+
gtk-icon-theme-name = "Tangerine"
+
  
 
===NTFS Read/Write Support===
 
===NTFS Read/Write Support===
Line 81: Line 68:
  
 
===gnome-open opens "Find" dialog instead of the directory===
 
===gnome-open opens "Find" dialog instead of the directory===
Remove or rename the file {{Filename|/usr/share/applications/pcmanfm-find.desktop}}. If you're running pcmanfm-mod from AUR, remove or rename the file {{Filename|/usr/share/applications/pcmanfm-mod-find.desktop}}.
+
Remove or rename the file {{ic|/usr/share/applications/pcmanfm-find.desktop}}. If you're running pcmanfm-mod from AUR, remove or rename the file {{ic|/usr/share/applications/pcmanfm-mod-find.desktop}}.
  
 
===No "Previous/Next Folder" functionality with mouse buttons===
 
===No "Previous/Next Folder" functionality with mouse buttons===
Line 94: Line 81:
 
  "/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"
 
  "/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"
 
   b:9
 
   b:9
Actual button codes can be obtained with xev[http://www.archlinux.org/packages/extra/i686/xorg-xev/].
+
Actual button codes can be obtained with package {{Pkg|xorg-xev}}
  
 
Add
 
Add
 
  xbindkeys &
 
  xbindkeys &
to your {{filename|~/.xinitrc}} to execute xbindkeys on log-in.
+
to your {{ic|~/.xinitrc}} to execute xbindkeys on log-in.
 +
 
 +
===One click for open folders and files===
 +
Open PCManFM in file explorer mode, and go to:
 +
{{ic|Edit > Preferences}}
 +
and in '''geral > behavior''' select {{ic|Open files with a simple click}}
 +
 
 +
''this option work in the pcmanfm --desktop too''
  
 
===--desktop parameter not working / crashing X-server===
 
===--desktop parameter not working / crashing X-server===
Make sure you have ownership and write permissions on {{filename|~/.config/pcmanfm}}
+
Make sure you have ownership and write permissions on {{ic|~/.config/pcmanfm}}
  
Setting the wallpaper either by using the --desktop-pref parameter or editing {{Filename|~/.config/pcmanfm/default/pcmanfm.config}} solves the problem.
+
Setting the wallpaper either by using the --desktop-pref parameter or editing {{ic|~/.config/pcmanfm/default/pcmanfm.config}} solves the problem.
  
 
===Terminal emulator advanced configuration not saved===
 
===Terminal emulator advanced configuration not saved===
Line 110: Line 104:
 
  # chmod -R 755 ~/.config/libfm
 
  # chmod -R 755 ~/.config/libfm
 
  # chmod 777 ~/.config/libfm/libfm.conf
 
  # chmod 777 ~/.config/libfm/libfm.conf
 +
 +
===Make PCManFM remember your preferred Sort Files settings===
 +
You can use View | Sort Files to change the order in which PCManFM lists the files, but PCManFM won't remember that the next time you start it. To make it remember, go to Edit | Preferences and Close. That will write your current sort_type and sort_by values into ~/.config/pcmanfm/LXDE/pcmanfm.conf.
 +
 +
==="Not authorized" errors when accessing/mounting USB drives===
 +
In various WM (in use with [[PolicyKit#Mounting_USB_drives|PolicyKit]]), You might receive an "Not authorized" errors when trying to access e.g. an USB drive.
 +
 +
If not existing, create (including the directory actions, which ain't existing by default in there) {{ic|/etc/polkit-1/actions/org.freedesktop.udisks2.pkla}} to contain the following:
 +
[Storage Permissions]
 +
Identity=unix-group:storage
 +
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.modify-device
 +
ResultAny=yes
 +
ResultInactive=yes
 +
ResultActive=yes
  
 
==Available Versions==
 
==Available Versions==
Line 115: Line 123:
  
 
===PCManFM2===
 
===PCManFM2===
This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as [http://aur.archlinux.org/packages.php?ID=33601 pcmanfm-git]. More information is available on the [http://forum.lxde.org/viewforum.php?f=22 LXDE Forum].
+
This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as [https://aur.archlinux.org/packages.php?ID=33601 pcmanfm-git]. More information is available on the [http://forum.lxde.org/viewforum.php?f=22 LXDE Forum].
 
+
===PCManFM 0.5.2===
+
The legacy PCManFM (version 0.5.2, which is currently "pcmanfm-gtk220" in the AUR repository) is frozen and is no longer being maintained by the original author.  This version uses HAL for mounting.  More information is available on the [http://pcmanfm.sourceforge.net/intro.html project page].
+
  
 
===PCManFM-Mod===
 
===PCManFM-Mod===
PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system.  This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs.  PCManFM-Mod is available in the [http://aur.archlinux.org/packages.php?ID=34819 AUR as pcmanfm-mod] and as [http://aur.archlinux.org/packages.php?ID=39547 pcmanfm-mod-prov] (latter provides pcmanfm).  More information is available at [http://igurublog.wordpress.com/downloads/mod-pcmanfm/ IgnorantGuru's Blog].
+
PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system.  This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs.  PCManFM-Mod is available in the [https://aur.archlinux.org/packages.php?ID=34819 AUR as pcmanfm-mod] and as [https://aur.archlinux.org/packages.php?ID=39547 pcmanfm-mod-prov] (latter provides pcmanfm).  More information is available at [http://igurublog.wordpress.com/downloads/mod-pcmanfm/ IgnorantGuru's Blog].
 +
 
 +
===PCManFM_with_Search===
 +
Latest PCmanFM version with search dialog in the [[AUR]] as {{aur|pcmanfm_with_search}}.

Revision as of 00:11, 15 March 2013

PCManFM is "an extremely fast, lightweight, yet feature-rich file manager with tabbed browsing". Source: PCManFM on sourceforge. PCManFM is the default file manager of the LXDE (Lightweight X11 Desktop Environment).

Installation

Run the following command to install:

# pacman -S pcmanfm

You will also require gamin (a replacement for FAM, which required a daemon) to pick up events such as file and directories changes:

# pacman -S gamin

Volume handling

PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as pmount. There are various 'up-to-date' versions of PCManFM (see below), and different volume handling strategies can be chosen.

Auto Mounting USB external storage devices

To auto mount USB external storage devices only simply install gvfs:

# pacman -S gvfs

If they do not auto mount after installing, try rebooting your system and try again.

Mounting with udisks

The current release of PCManFM is able to handle volumes through udisks. If you want to use this feature, make sure the D-Bus daemon is installed and running. See the D-Bus page for details.

Trash support, browsing network shares, and automounting with gvfs

To resolve the "Operation not supported" error when clicking on Trash Can, you must do the following steps:

1. Install package gvfs
2. Start pcmanfm only using the following command: dbus-launch pcmanfm

To browse network shares:
1. Install packages gvfs gvfs-smb gvfs-afp
2. Start pcmanfm only using the following command: dbus-launch pcmanfm
3. Type smb://<server name>/<share name> to access Windows / CIFS / Samba file shares
4. Type afp://<server name>/<share name> to access AFP file shares

Tips & troubleshooting

No "Applications"

# pacman -S gnome-menus

You can try this method: Delete all files in the $HOME/.cache/menus directory, and run PCManFM again.

PCManFM requires the environment variable "XDG_MENU_PREFIX" to be set. The value of the variable should match the beginning of a file present in the "/etc/xdg/menus/" directory. In case you have installed the "gnome-menus" package, you can set the value in your .xinitrc file with the line :

$ export XDG_MENU_PREFIX=gnome-

See these threads for more informations : [1], and especially this post from the Linux Mint Forums [2]

No icons?

If you are using a WM instead of a DE and you have no icons for folders and files, specify a gtk icon theme:

Edit ~/.gtkrc-2.0 or /etc/gtk-2.0/gtkrc and add the following line:

gtk-icon-theme-name = "oxygen"
Note: All instances of PCManFM have to be restarted for changes to apply!

If you do not have oxygen-icons installed, use an different one (gnome, hicolor, and locolor do not work). To list all installed icon themes:

ls ~/.icons /usr/share/icons/

If none of them is suitable, install one. To list all installable icon packages:

pacman -Ss icon-theme
Tip: For an alternative GUI solution, install lxappearance and apply an icon theme from there.

NTFS Read/Write Support

Install ntfs-3g (See NTFS-3G):

# pacman -S ntfs-3g

gnome-open opens "Find" dialog instead of the directory

Remove or rename the file /usr/share/applications/pcmanfm-find.desktop. If you're running pcmanfm-mod from AUR, remove or rename the file /usr/share/applications/pcmanfm-mod-find.desktop.

No "Previous/Next Folder" functionality with mouse buttons

A method to fix this is with Xbindkeys:

Install xbindkeys:

# pacman -S xbindkeys

Edit ~/.xbindkeysrc to contain the following:

# Sample .xbindkeysrc for a G9x mouse.
"/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"
 b:8
"/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"
 b:9

Actual button codes can be obtained with package xorg-xev

Add

xbindkeys &

to your ~/.xinitrc to execute xbindkeys on log-in.

One click for open folders and files

Open PCManFM in file explorer mode, and go to: Edit > Preferences and in geral > behavior select Open files with a simple click

this option work in the pcmanfm --desktop too

--desktop parameter not working / crashing X-server

Make sure you have ownership and write permissions on ~/.config/pcmanfm

Setting the wallpaper either by using the --desktop-pref parameter or editing ~/.config/pcmanfm/default/pcmanfm.config solves the problem.

Terminal emulator advanced configuration not saved

Make sure you have rights on libfm configuration file:

# chmod -R 755 ~/.config/libfm
# chmod 777 ~/.config/libfm/libfm.conf

Make PCManFM remember your preferred Sort Files settings

You can use View | Sort Files to change the order in which PCManFM lists the files, but PCManFM won't remember that the next time you start it. To make it remember, go to Edit | Preferences and Close. That will write your current sort_type and sort_by values into ~/.config/pcmanfm/LXDE/pcmanfm.conf.

"Not authorized" errors when accessing/mounting USB drives

In various WM (in use with PolicyKit), You might receive an "Not authorized" errors when trying to access e.g. an USB drive.

If not existing, create (including the directory actions, which ain't existing by default in there) /etc/polkit-1/actions/org.freedesktop.udisks2.pkla to contain the following:

[Storage Permissions]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.modify-device
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Available Versions

There are several versions of PCManFM currently available:

PCManFM2

This is the package in Arch's extra repository as "pcmanfm". The current git test version of it is available in the AUR as pcmanfm-git. More information is available on the LXDE Forum.

PCManFM-Mod

PCManFM-Mod adds user-definable commands, other features, and bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version builds and installs as "pcmanfm-mod" and will run independently of other versions of PCManFM you have installed on your system. This legacy version is still desired by some due to more stability than the newer 0.9.x rewrite in progress, less Gnome dependencies, and the use of HAL rather than gnome-vfs. PCManFM-Mod is available in the AUR as pcmanfm-mod and as pcmanfm-mod-prov (latter provides pcmanfm). More information is available at IgnorantGuru's Blog.

PCManFM_with_Search

Latest PCmanFM version with search dialog in the AUR as pcmanfm_with_searchAUR.