Difference between revisions of "PCManFM"

From ArchWiki
Jump to: navigation, search
m ("Not authorized" errors when accessing/mounting USB drives)
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
 
'''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 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).
  
==Installation==
+
== Installation ==
{{Pkg|pcmanfm}} is available in the [[Official_Repositories|official repositories]].
+
 
 +
{{Pkg|pcmanfm}} is available in the [[official repositories]].
  
 
You will also require [[gamin]] (a replacement for [[FAM]], which required a daemon) to pick up events such as file and directories changes.
 
You will also require [[gamin]] (a replacement for [[FAM]], which required a daemon) to pick up events such as file and directories changes.
  
==Volume handling==
+
=== Notable variants ===
PCManFM is able to mount and unmount devices, both manually and automatically. This feature is offered as an alternative to CLI tools such as {{Pkg|pmount}}.
+
 
 +
* A [[Qt]] implementation called {{AUR|pcmanfm-qt}} exists in [[AUR]].
 +
* There are also development versions: {{AUR|pcmanfm-git}} and {{AUR|pcmanfm-qt-git}}.
 +
 
 +
== 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 {{Pkg|udevil}} and {{AUR|pmount}}.
 +
 
 +
=== Auto mounting USB external storage devices ===
  
===Auto Mounting USB external storage devices===
 
 
To auto mount USB external storage devices only simply install {{Pkg|gvfs}}.
 
To auto mount USB external storage devices only simply install {{Pkg|gvfs}}.
  
 
If they do not auto mount after installing, try rebooting your system and try again.
 
If they do not auto mount after installing, try rebooting your system and try again.
  
===Mounting with udisks===
+
=== 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.
 
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.
  
 
=== NTFS read/write support ===
 
=== NTFS read/write support ===
 +
 
Install {{Pkg|ntfs-3g}} (See [[NTFS-3G]]).
 
Install {{Pkg|ntfs-3g}} (See [[NTFS-3G]]).
  
===Trash support, browsing network shares, and automounting with gvfs===
+
=== 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:<br />
+
  
1. Install package gvfs<br />
+
To resolve the "Operation not supported" error when clicking on Trash Can, you must do the following steps:
2. Start pcmanfm only using the following command: dbus-launch pcmanfm<br />
+
  
To browse network shares:<br />
+
# Install package {{Pkg|gvfs}}.
1. Install packages gvfs gvfs-smb gvfs-afp<br />
+
# Start PCManFM only using the following command: dbus-launch pcmanfm.
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 />
+
To browse network shares:
4. Type afp://<server name>/<share name> to access AFP file shares
+
# Install these packages: '''gvfs''' {{Pkg|gvfs-smb}} {{Pkg|gvfs-afp}}.
 +
# Start PCManFM only using the following command: {{ic|$ dbus-launch pcmanfm}}.
 +
# Type {{ic|smb://''server name''/''share name''}} to access Windows/CIFS/Samba file shares.
 +
# Type {{ic|afp://''server name''/''share name''}} to access AFP file shares.
  
 
== Tips ==
 
== Tips ==
  
 
=== One click for open folders and files ===
 
=== One click for open folders and files ===
 +
 
Open PCManFM in file explorer mode, and go to ''Edit > Preferences''
 
Open PCManFM in file explorer mode, and go to ''Edit > Preferences''
 
and in ''General > Behavior'' and select ''Open files with a simple click''.
 
and in ''General > Behavior'' and select ''Open files with a simple click''.
Line 48: Line 60:
  
 
== Troubleshooting ==
 
== Troubleshooting ==
 +
 
=== No "Applications" ===
 
=== No "Applications" ===
 +
 
First install {{Pkg|gnome-menus}}.
 
First install {{Pkg|gnome-menus}}.
You can try this method: Delete all files in the $HOME/.cache/menus directory, and run PCManFM again.
+
You can try this method: Delete all files in the {{ic|$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 :
+
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 {{ic|/etc/xdg/menus/}} directory. In case you have installed the '''gnome-menus''' package, you can set the value in your {{ic|.xinitrc}} file with the line :
  $ export XDG_MENU_PREFIX=gnome-
+
  export XDG_MENU_PREFIX=gnome-
 
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]
 
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]
  
=== No icons? ===
+
=== 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 {{ic|~/.gtkrc-2.0}} '''or''' {{ic|/etc/gtk-2.0/gtkrc}} and add the following line:
+
If you are using a [[WM]] instead of a [[DE]] and you have no icons for folders and files, specify a gtk+ icon theme.
 +
 
 +
If you have e.g. {{Pkg|oxygen-icons}} installed, edit {{ic|~/.gtkrc-2.0}} '''or''' {{ic|/etc/gtk-2.0/gtkrc}} and add the following line:
 
  gtk-icon-theme-name = "oxygen"
 
  gtk-icon-theme-name = "oxygen"
 
{{Note|All instances of PCManFM have to be restarted for changes to apply!}}
 
{{Note|All instances of PCManFM have to be restarted for changes to apply!}}
  
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:
+
Else, use an different one ('''gnome''', '''hicolor''', and '''locolor''' do not work). To list all installed icon themes:
  ls ~/.icons /usr/share/icons/
+
  $ ls ~/.icons/ /usr/share/icons/
  
 
If none of them is suitable, install one. To list all installable icon packages:
 
If none of them is suitable, install one. To list all installable icon packages:
Line 71: Line 86:
  
 
=== gnome-open opens "Find" dialog instead of the directory===
 
=== gnome-open opens "Find" dialog instead of the directory===
 +
 
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}}.
 
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 ===
 +
 
A method to fix this is with [[Xbindkeys]].
 
A method to fix this is with [[Xbindkeys]].
  
Install {{Pkg|xbindkeys}}.
+
Install {{Pkg|xbindkeys}} and edit {{ic|~/.xbindkeysrc}} to contain the following:
Edit ~/.xbindkeysrc to contain the following:
+
 
  # Sample .xbindkeysrc for a G9x mouse.
 
  # Sample .xbindkeysrc for a G9x mouse.
 
  "/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"
 
  "/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"
Line 90: Line 106:
  
 
=== One click for open folders and files ===
 
=== One click for open folders and files ===
Open PCManFM in file explorer mode, go to ''Edit > Preferences'' and in ''general > behavior'' select ''Open files with a simple click''.
+
 
 +
Open PCManFM in file explorer mode, go to ''Edit > Preferences > General > Behavior'' select ''Open files with a simple click''.
 
{{Note|This option works with {{ic|pcmanfm --desktop}} too.}}
 
{{Note|This option works with {{ic|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 {{ic|~/.config/pcmanfm}}.
 
Make sure you have ownership and write permissions on {{ic|~/.config/pcmanfm}}.
  
Line 99: Line 117:
  
 
=== Terminal emulator advanced configuration not saved ===
 
=== Terminal emulator advanced configuration not saved ===
 +
 
Make sure you have rights on libfm configuration file:
 
Make sure you have rights on libfm configuration file:
  
Line 105: Line 124:
  
 
=== Make PCManFM remember your preferred Sort Files settings ===
 
=== 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 {{ic|~/.config/pcmanfm/LXDE/pcmanfm.conf}}.
 
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 {{ic|~/.config/pcmanfm/LXDE/pcmanfm.conf}}.
  
 
=== "Not authorized" errors when accessing/mounting USB drives ===
 
=== "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:  
+
In various Window Managers (when using with [[PolicyKit#Mounting_USB_drives|PolicyKit]]), you might receive a "not authorized" error when trying to access a USB drive.
 +
 
 +
Edit or create {{ic|/etc/polkit-1/actions/org.freedesktop.udisks2.pkla}} to contain the following:
 
  [Storage Permissions]
 
  [Storage Permissions]
 
  Identity=unix-group:storage
 
  Identity=unix-group:storage
Line 117: Line 138:
 
  ResultInactive=yes
 
  ResultInactive=yes
 
  ResultActive=yes
 
  ResultActive=yes
 +
 +
{{Note|The directory {{ic|/etc/polkit-1/actions/}} does not exist by default.}}

Revision as of 17:08, 14 June 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

pcmanfm is available in the official repositories.

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

Notable variants

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 udevil and pmountAUR.

Auto mounting USB external storage devices

To auto mount USB external storage devices only simply install 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.

NTFS read/write support

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

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 these 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

One click for open folders and files

Open PCManFM in file explorer mode, and go to Edit > Preferences and in General > Behavior and select Open files with a simple click.

Note: This option work in the pcmanfm --desktop too

Troubleshooting

No "Applications"

First install 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.

If you have e.g. oxygen-icons installed, 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!

Else, 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.

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 and 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, go to Edit > Preferences > General > Behavior select Open files with a simple click.

Note: This option works with 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 Window Managers (when using with PolicyKit), you might receive a "not authorized" error when trying to access a USB drive.

Edit or create /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
Note: The directory /etc/polkit-1/actions/ does not exist by default.