https://wiki.archlinux.org/api.php?action=feedcontributions&user=Nlern&feedformat=atomArchWiki - User contributions [en]2024-03-28T12:09:03ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=PCManFM&diff=453658PCManFM2016-10-12T07:08:03Z<p>Nlern: /* Thumbnail support */ Changed ''.thumbnail'' to ''.thumbnailer'' as the filename should have ''.thumbnailer'' extension</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:PCManFM]]<br />
[[cs:PCManFM]]<br />
[[fr:PCManFM]]<br />
[[it:PCManFM]]<br />
[[ja:PCManFM]]<br />
[[pl:PCManFM]]<br />
[[ru:PCManFM]]<br />
{{Related articles start}}<br />
{{Related|LXDE}}<br />
{{Related|Openbox}}<br />
{{Related|File manager functionality}}<br />
{{Related|SpaceFM}}<br />
{{Related|Thunar}}<br />
{{Related|GNOME Files}}<br />
{{Related|Nemo}}<br />
{{Related articles end}}<br />
<br />
From the project [http://wiki.lxde.org/en/PCManFM home page]:<br />
: ''PCMan File Manager (PCManFM) is a file manager application developed by Hong Jen Yee from Taiwan which is meant to be a replacement for Nautilus, Konqueror and Thunar. Released under the GNU General Public License, PCManFM is free software. PCManFM is the standard file manager in [[LXDE]], which is also developed by the same author in conjunction with other developers.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|pcmanfm}} package, or {{Pkg|pcmanfm-gtk3}} for the GTK3 version, or {{AUR|pcmanfm-git}} for the development version. {{Pkg|gvfs}} is recommended for trash support, mounting with [[udisks]] and remote filesystems.<br />
<br />
[[Qt]] variants are available through {{Pkg|pcmanfm-qt}} and {{AUR|pcmanfm-qt-git}}.<br />
<br />
== Desktop management ==<br />
The command to allow PCManFM to set wallpapers and enable the use of desktop icons is:<br />
<br />
pcmanfm --desktop<br />
<br />
The native desktop menu of the window manager will be replaced with that provided by PCManFM. However, it can easily be restored from the PCManFM menu itself by selecting {{ic|Desktop preferences}} and then enabling the {{ic|Right click shows WM menu}} option in the {{ic|Desktop}} tab.<br />
<br />
=== Desktop preferences ===<br />
If using the native desktop menu provided by a window manager, enter the following command to set or amend desktop preferences at any time:<br />
<br />
$ pcmanfm --desktop-pref<br />
<br />
It is worthwhile to consider adding this command to a keybind and/or the native desktop menu for easy access.<br />
<br />
=== Creating new icons ===<br />
User content such as text files, documents, images and so forth can be dragged and dropped directly onto the desktop. To create shortcuts for applications it will be necessary to copy their {{ic|.desktop}} files to the {{ic|~/Desktop}} directory itself. Do not drag and drop the files there as they will be moved completely. The syntax of the command to do so is: <br />
<br />
cp /usr/share/applications/<name of application>.desktop ~/Desktop<br />
<br />
For example - where installed - to create a desktop shortcut for {{pkg|lxterminal}}, the following command would be used: <br />
<br />
cp /usr/share/applications/lxterminal.desktop ~/Desktop<br />
<br />
For those who used the [[XDG user directories]] program to create their {{ic|$HOME}} directories no further configuration will be required.<br />
<br />
== Daemon mode ==<br />
<br />
To run PCManFM in the background (to for example automatically mount removable media), use:<br />
<br />
pcmanfm -d<br />
<br />
Should automount fail, see [[udisks]].<br />
<br />
== Autostarting ==<br />
How PCManFM may be autostarted as a [[daemon]] process or to manage the desktop for a standalone [[window manager]] will depend on the window manager itself. For example, to enable management of the desktop for [[Openbox]], the following command would be added to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
pcmanfm --desktop &<br />
<br />
Review the relevant wiki article and/or official home page for a particular installed or intended window manager. Should a window manager not provide an autostart file, PCManFM may be alternatively autostarted by editing one or both of the following files:<br />
<br />
* [[xinitrc]]: When using the [[SLiM]] [[display manager]] or [[Startx]] command<br />
* [[xprofile]]: When using a display manager such as [[LXDM]] or [[LightDM]]<br />
<br />
== Additional features and functionality ==<br />
Less experienced users should be aware that a file manager alone - especially when installed in a standalone [[Window manager]] such as [[Openbox]] - will not provide the features and functionality users of full desktop environments such as [[Xfce]] and [[KDE]] will be accustomed to. Review the [[file manager functionality]] article for further information.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Thumbnail support ===<br />
<br />
{{Merge|File manager functionality#Thumbnail Previews|This section is not specific to PCManFM.}}<br />
<br />
PCManFM supports image thumbnails out of the box. However, in order to view thumbnails of other file types, PCManFM uses the information provided in the files located at {{ic|/usr/share/thumbnailers}}. The packages which provide a thumbnailer usually add the corresponding ''.thumbnail'' file at {{ic|/usr/share/thumbnailers}}. For example, in order to get thumbnails for OpenDocument files, you may install {{Pkg|libgsf}} from the official repositories. For video files' thumbnails, the package {{Pkg|ffmpegthumbnailer}} is required. For PDF files, you may install {{Pkg|evince}} from the official repositories, which provides {{ic|evince-thumbnailer}} and the corresponding file at {{ic|/usr/share/thumbnailers}}. However, if you prefer not to install {{ic|evince}}, you can also replicate the functionality of {{ic|evince-thumbnailer}} using {{Pkg|imagemagick}}'s {{ic|convert}} command. This is accomplished by creating a new file with the ''.thumbnailer'' extension (e.g.: {{ic|imagemagick-pdf.thumbnailer}}) at {{ic|/usr/share/thumbnailers}} with the following content:<br />
<br />
[Thumbnailer Entry]<br />
TryExec=convert<br />
Exec=convert %i[0] -thumbnail %s %o<br />
MimeType=application/pdf;application/x-pdf;image/pdf;<br />
<br />
{{Note|The ''[0]'' next to the input file is specified so that {{ic|convert}} only generates a thumbnail of the first page. This is a {{ic|convert}}-specific syntax and has nothing to do with the syntax of the thumbnailers' files.}}<br />
<br />
Following this example, you can specify custom thumbnailers by creating your own ''.thumbnail'' files. Keep in mind that {{ic|%i}} refers to the input file (the file which will have its thumbnail made), {{ic|%o}} to the output file (the thumbnail image) and {{ic|%s}} to the size of the thumbnail. These parameters will be automatically substituted with the corresponding data and passed to the thumbnailer program by PCManFM.<br />
<br />
{{Tip|If you only get thumbnails of certain files and not of all the files of the same type try increasing the maximum file size of the files that get a thumbnail at ''Edit > Preferences > Display''.}}<br />
<br />
=== One click for open folders and files ===<br />
<br />
Open PCManFM in file explorer mode, go to ''Edit > Preferences > General > Behavior'', and select ''Open files with a simple click''. This option works with desktop icons too.<br />
<br />
=== Open or Extract Archives with PCManFM ===<br />
<br />
Install {{Pkg|file-roller}}, {{Pkg|xarchiver}} or {{Pkg|engrampa}} from the official repositories.<br />
<br />
Open PCManFM in file explorer mode, go to ''Edit > Preferences > Advanced'', select ''Archiver Integration'' and select your installed archiver.<br />
<br />
=== More options under ''Create New...'' ===<br />
<br />
By default the ''Create New...'' sub-menu contains ''Folder'' and ''Empty File''. It is possible to include additional entries for your personal needs. To do so create them in {{ic|~/Templates/}} and restart PCManFM.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Open With dialog window empty ===<br />
<br />
If you do not see any applications to choose from in the open with dialog, then you can try removing {{Pkg|gnome-menus}} and instead install {{Pkg|lxmenu-data}}. Furthermore, export the following variables:<br />
<br />
export XDG_MENU_PREFIX=lxde-<br />
export XDG_CURRENT_DESKTOP=LXDE<br />
<br />
=== No "Applications" ===<br />
<br />
You can try this method: Delete all files in the {{ic|$HOME/.cache/menus}} directory, and run PCManFM again.<br />
<br />
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. E.g. you can set the value in your {{ic|.xinitrc}} file with the line:<br />
export XDG_MENU_PREFIX="lxde-"<br />
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]<br />
<br />
=== No icons ===<br />
<br />
If you are using a [[window manager]] instead of a [[desktop environment]] and you have no icons for folders and files, specify a GTK+ icon theme.<br />
<br />
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:<br />
gtk-icon-theme-name = "oxygen"<br />
{{Note|All instances of PCManFM have to be restarted for changes to apply!}}<br />
<br />
Else, use an different one (''gnome'', ''hicolor'', and ''locolor'' do not work). To list all installed icon themes:<br />
$ ls ~/.icons/ /usr/share/icons/<br />
<br />
If none of them is suitable, install one. To list all installable icon packages:<br />
$ pacman -Ss icon-theme<br />
{{Tip|For an alternative GUI solution, install {{Pkg|lxappearance}} and apply an icon theme from there.}}<br />
<br />
=== No "Previous/Next Folder" functionality with mouse buttons ===<br />
<br />
A method to fix this is with [[Xbindkeys]].<br />
<br />
Install {{Pkg|xbindkeys}}, {{Pkg|xvkbd}} and edit {{ic|~/.xbindkeysrc}} to contain the following:<br />
{{bc|<nowiki><br />
# Sample .xbindkeysrc for a G9x mouse.<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Left]'"<br />
b:8<br />
"/usr/bin/xvkbd -text '\[Alt_L]\[Right]'"<br />
b:9<br />
</nowiki>}}<br />
Actual button codes can be obtained with package {{Pkg|xorg-xev}}.<br />
<br />
Add:<br />
xbindkeys &<br />
to your {{ic|~/.xinitrc}} to execute xbindkeys on log-in.<br />
<br />
=== --desktop parameter not working or crashing X-server ===<br />
<br />
Make sure you have ownership and write permissions on {{ic|~/.config/pcmanfm}}.<br />
<br />
Setting the wallpaper either by using the {{ic|--desktop-pref}} parameter or editing {{ic|~/.config/pcmanfm/default/pcmanfm.config}} solves the problem.<br />
<br />
=== Terminal emulator advanced configuration not saved ===<br />
<br />
Make sure you have rights on libfm configuration file:<br />
<br />
$ chmod -R 755 ~/.config/libfm<br />
$ chmod 777 ~/.config/libfm/libfm.conf<br />
<br />
=== Make PCManFM remember your preferred Sort Files settings ===<br />
<br />
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}}.<br />
<br />
=== "Not authorized" error when attempting to mount drive ===<br />
See the [[Polkit#Mounting_storage_without_password|mounting without a password]]{{Broken section link}} section of the [[Polkit]] article.<br />
<br />
=== Operation not supported ===<br />
<br />
See the General troubleshooting article on [[General_troubleshooting#Session_permissions|Session permissions]].</div>Nlern