ANNOUNCEMENT 2012-01-15: The next generation of PCManFM-Mod is called SpaceFM. Except for possible bugfixes, v1.2.4 is the final release of PCManFM-Mod. All further development will be in the SpaceFM project. Read more about SpaceFM
|Description:||A modified version of the legacy PCMan File Manager v0.5.2|
|Tested On:||Aptosid (Debian); Ubuntu; Debian; Slackware; Slackware Current Mini & Rescue (included); Arch Linux; Crunchbang; Fedora; openSUSE; PocketWriterOS/nFluxOS (included); Tiny Core Linux; Parted Magic (included)|
|Current Version:||1.2.4 (What’s New?)|
|Requires:||dbus, desktop-file-utils, gamin | fam, libc6, libcairo2, libdbus-1-3, libfam0, libgdk-pixbuf2.0-0, libglib2.0-0, libgtk2.0-0, libpango1.0-0, libstartup-notification0, libx11-6, shared-mime-info
Optional: hal, gnome-icon-theme, ktsuss, gksu
|Related:||repic permz xtract devmon mountiso|
|License:||GNU GPL v2 * SEE DISCLAIMER *|
- Example: Resize Selected Pics
- Example: permz To Quickly Change File Permissions
- Example: xtract To Quickly Extract Archives
- Example: Multi-Function Chooser And Archiver
Composite Screenshot of PCManFM-Mod
PCManFM-Mod adds user-definable commands, other features, and important bugfixes to the legacy version of the PCManFM file manager v0.5.2. This version 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 rewrite in progress, less Gnome dependencies, and the optional use of HAL rather than gnome-vfs for mounting.
PCManFM v0.5.2 has no user-definable functions. This mod adds five user-definable commands to the right-click and Tools menus (and keys F4, F6-F9). The menu names, icons, and commands are derived from .desktop files. When run, all selected files are passed to the command. In this way, you can easily modify the command names, functions, and icons, and have them run custom applications or scripts. For instructions, see the USAGE NOTES in the README. User command examples are also available below.
This mod also adds many other features and addresses several serious bugs detailed in the README below.
Tip: Since HAL is no longer used in newer distros, most users will want a -nohal package below or to build manually without HAL support per the README. For automounting drives, devmon works well with PCManFM-Mod.
The following packages are provided, which are also available via the PPA repository:
- pcmanfm-mod (i386) – Built with HAL mounting support included
- pcmanfm-mod-nohal (i386) – Built without HAL support
- pcmanfm-mod (amd64) – Built with HAL mounting support included
- pcmanfm-mod-nohal (amd64) – Built without HAL support
NOTE: If you install using a deb file and don’t use the PPA, please be sure to authenticate your download.
Ubuntu 11.04 Natty Narwhal users will generally want to use a ‘nohal’ package. PCManFM-Mod built without HAL support means that HAL is not required, but pcmanfm-mod’s built-in volume management support will be disabled (you won’t be able to mount and unmount volumes within pcmanfm-mod, and volumes will not appear in the location side pane). You can use an automounting solution instead, such as devmon. Some prefer PCManFM-Mod without HAL either because they don’t have HAL installed (newer Ubuntu versions, etc), or because they don’t want the mounting features enabled.
Arch Linux Packages
There are also three automated AUR packages for Arch Linux:
- pcmanfm-mod installs without conflicts with other versions of pcmanfm
- pcmanfm-mod-prov provides pcmanfm but conflicts with other versions of pcmanfm (as far as Pacman is concerned) (for LXDE users who want pcmanfm-mod to manage their desktop).
- pcmanfm-mod-nohal is like the pcmanfm-mod package, but built without HAL support and dependencies. With this package, you don’t need hal installed or running, but pcmanfm-mod’s built-in volume management support will be disabled (you won’t be able to mount and unmount volumes within pcmanfm-mod, and volumes will not appear in the location side pane).
Manual Build Instructions
For other distros, PCManFM-Mod is generally very easy to build manually. Please see the BUILD INSTRUCTIONS in the README file below.
README for PCManFM-Mod v1.2.4 (A modified version of the legacy PCMan File Manager v0.5.2) For updates and instructions visit: http://igurublog.wordpress.com/downloads/mod-pcmanfm/ FINAL RELEASE NOTICE: Except for possible bugfixes, v1.2.4 is the last planned release of pcmanfm-mod. All further development of this fork will take place in the SpaceFM project: http://spacefm.sourceforge.net/ CONTENTS: DESCRIPTION INSTALLATION BUILD INSTRUCTIONS MANUAL UN-INSTALL INSTRUCTIONS BUILD DEBIAN PACKAGING INSTRUCTIONS INCLUDED FILES USAGE NOTES KNOWN ISSUES MODIFICATIONS CHANGELOG FOR PCMANFM-MOD DESCRIPTION: PCManFM-Mod is a minor fork of the legacy version of PCManFM 0.5.2, which uses HAL for mounting (optional) and has minimal Gnome dependencies (compared with the newer PCManFM version 0.9 which uses gnome-vfs). This modified legacy version adds user-definable commands and other features and also includes a number of bugfixes as fully detailed in the MODIFICATIONS section below. PCManFM-Mod installs as /usr/bin/pcmanfm-mod and uses ~/.config/pcmanfm-mod/ as its config folder, thus making it run independently of other versions of pcmanfm. INSTALLATION: For Debian and Ubuntu, deb files and a PPA package repository are available at http://igurublog.wordpress.com/downloads/mod-pcmanfm/ For Arch Linux, AUR packages are available- pcmanfm-mod or pcmanfm-mod-prov For other distros or for custom build options, follow the BUILD INSTRUCTIONS below. BUILD INSTRUCTIONS: 1) Install required build dependencies. On Debian/Ubuntu: apt-get install build-essential debhelper autotools-dev dbus \ desktop-file-utils fam libc6 libcairo2 libdbus-1-3 libfam0 \ libglib2.0-0 libgtk2.0-0 libpango1.0-0 libstartup-notification0 \ libx11-6 shared-mime-info intltool pkg-config libfam-dev \ libgtk2.0-dev libglib2.0-dev fakeroot libstartup-notification0-dev \ libdbus-1-dev \ hal libhal-dev libhal-storage-dev libdbus-glib-1-dev libhal-storage1 \ libhal1, libdbus-glib-1-2 Also Recommended: ktsuss gksu gnome-icon-theme On Arch Linux: pacman -S base base-devel desktop-file-utils gamin gtk2 hal \ shared-mime-info startup-notification intltool gettext Also Recommended: gksu gnome-icon-theme NOTE: gamin can be used instead of fam. Other Linux distributions will have similar named libraries. configure will report anything missing when you run it as shown below. 2) Extract tarball and enter directory. The following commands will build and install as "/usr/bin/pcmanfm-mod": ./configure --prefix=/usr make sudo make install sudo install -c -m 755 pcmanfm-opener /usr/bin sudo update-mime-database /usr/share/mime > /dev/null sudo update-desktop-database -q NOTE: If configure reports missing dependencies, install them and run configure again before proceeding to make. NOTE: If hal support is not needed (pcmanfm-mod won't be able to mount and unmount volumes), add --disable-hal to the configure command above. NOTE: The su program used by pcmanfm-mod will be ktsuss, gksudo, gksu, or kdesu. Optional: To set your preference (in this example to gksudo) add --with-preferable-sudo=gksudo to the configure command above. 3) LXDE USERS ONLY If you want LXDE to use pcmanfm-mod for desktop management, you can remove pcmanfm and: sudo ln -s /usr/bin/pcmanfm-mod /usr/bin/pcmanfm Or see the /etc/xdg/lxsession/ and ~/.config/lxsession/ config files to control pcmanfm(-mod) startup and desktop management. For additional information consult the README-LEGACY and INSTALL files. MANUAL UN-INSTALL INSTRUCTIONS: 1) As root: rm /usr/bin/pcmanfm-mod rm /usr/bin/pcmanfm-opener rm -r /usr/share/pcmanfm-mod rm /usr/share/pixmaps/pcmanfm-mod.png rm /usr/share/pixmaps/pcmanfm-mod-root.png rm /usr/share/mime/packages/libmimetype.xml rm /usr/share/locale/*/LC_MESSAGES/pcmanfm-mod.mo rm /usr/share/applications/pcmanfm-mod*.desktop rm /usr/share/applications/pcmanfm-user*.desktop update-mime-database /usr/share/mime > /dev/null update-desktop-database -q 2) Optional: To remove pcmanfm-mod user configurations: rm -r /home/*/.config/pcmanfm-mod OR rm -r $XDG_CONFIG_HOME/pcmanfm-mod # run for each user DEBIAN PACKAGING INSTRUCTIONS: To build a deb file of pcmanfm-mod: 1) Install build dependencies (see BUILD INSTRUCTIONS above). 2) Extract tarball and enter directory. 3) IF hal support is NOT desired: cp debian/control-nohal debian/control cp debian/rules-nohal debian/rules 4) Build package: dpkg-buildpackage The package files will appear in the parent directory. INCLUDED FILES: README this file README-LEGACY Original README from PCManFM 0.5.2 0.5.2 source and make files modified source files of PCManFM 0.5.2 (search for "//MOD" to see changes) pcmanfm-opener a script to open all files passed to it data/pcmanfm-mod*.desktop desktop files for the PCManFM-Mod program data/pcmanfm-user-f*.desktop desktop files for user commands data/pcmanfm-mod.png program icon data/pcmanfm-mod-root.png program icon when run as root debian/ debian packaging control files USAGE NOTES: *** Custom Commands *** /usr/bin/pcmanfm-opener is an example script to open all files passed to it - by default this is assigned to F4. Functions F6-F9 also run the same command until you customize them. The default pcmanfm-opener script mostly uses xdg-open to open files - modify this script to use your favorite apps. USE BY THE ROOT USER IS DISABLED BY DEFAULT (edit the script to adjust this). To change the name and command for User Command F6, copy the file /usr/share/applications/pcmanfm-user-f6.desktop to ~/.local/share/applications/ Edit this file and add your desired command to "Exec=" (do not use %F or %U, just the command name). This can be a custom script or an application. Edit "Name=" to the command name as you want it to appear on the right-click menu. Use underscore for shortcut keys (for example, "User Co_mmand"). "Icon=" may be added if desired. Other commands are modified with the same method - there is one desktop file for each. Don't change the filenames of these .desktop files or they won't work. *** Config File *** PCManFM-Mod recognizes additional settings in the [General] section of the "main" config file: home_folder=FOLDER Changes your default home folder (for the Go|Home and toolbar commands) no_execute=1 Makes double-clicking on an executable NOT run it no_confirm=1 Causes no confirmation dialog when deleting files (use this with caution as there is no trash can) For example, with all PCManFM-Mod windows and daemons closed, edit the file ~/.config/pcmanfm-mod/main (or main.lxde if using LXDE): [General] ... home_folder=/media no_execute=1 no_confirm=1 *** Hide Files *** To hide a folder's files from view in PCManFM-Mod, create a text file in the folder named '.hidden' List files to be hidden in this file, one per line (file name only, not the path). For example, to hide a file: echo "hidethisexample.txt" >> .hidden This can be done automatically using the File|Hide File menu option. To unhide a file, edit .hidden and remove the entry. After changes are made, select View|Refresh. KNOWN ISSUES: * The Run In Terminal mod command may not work with all terminals (choose your terminal in Edit|Preferences|Advanced). The terminal must accept the -e argument unquoted. These terminals are known to work: roxterm, aterm, konsole, xterm, Eterm, lxterminal*, gnome-terminal*. * Note that when using lxterminal and gnome-terminal, you cannot use single quotation marks (') in the command. MODIFICATIONS: PCManFM-Mod is identical to legacy PCManFM v0.5.2 except for the following changes: * Adds five user-definable commands to the right-click and Tools menus (keys F4, F6-F9). The menu item names, icons, and commands are derived from .desktop files. When run, all selected files are passed to the command. (see NOTES below) * An example opener script is included as the default F4 user command, which opens all selected files. (see NOTES below) * A "Run Command..." (Ctrl-R) has been added to the Tools and right-click menus. This allows the user to run an arbitrary command line, include %F to insert all selected files into the command, and optionally run the command in a terminal to see the output. * Files can now be dragged and dropped into the Directory Tree side pane * A selection history has been added to remember selected files in prior folders * The Copy/Move dialog, widened and cleaned up, now shows file count, transfer size, current and average speeds, time remaining * A "Paste as Link" (Ctrl-Shift-V) command has been added to the Edit and right-click menus to paste links to files on the clipboard * A "Paste as Target" (Alt-Shift-V) command has been added to the Edit and right-click menus to paste the targets of links on the clipboard * A "Copy as Text" (Ctrl-Shift-C) command has been added to the Edit and right-click menus to copy quoted filenames to the clipboard for pasting into a terminal * A "Copy Name" (Alt-Shift-C) command has been added to the Edit and right-click menus to copy filenames to the clipboard (without path) * When a single file is selected, the filename is displayed in the status bar (for long filenames). If a symlink is selected, its target and target's size are displayed in the status bar * Compress and Extract now support tar.xz * Sticky bit is displayed in the Permissions field * IEC binary units now display as KB/MB/GB/TB instead of KiB/MiB/GiB/TiB, and IEC binary units are now the default (may be changed in Preferences) * Support added for Nautilus-style .hidden file to hide files, and added File|Hide File menu option * The Paste items on the content menu are now disabled if the clipboard does not contain a pastable file list * The Paste and Create items now appear on the context menu even if the cursor is over a file * Configuration is stored in $XDG_CONFIG_HOME/pcmanfm-mod/ * The default home folder can be set in the main config file (see USAGE NOTES above) * "no_execute" can be set in the main config file to prevent launching of executables by clicking (see USAGE NOTES above) * "no_confirm" can be set in the main config file to delete files without a confirmation dialog (see USAGE NOTES above) * ktsuss is now a supported su program, and is the default (can be changed) * A different program icon (taken from Tango) is used, and a red folder program icon is used when in super user mode * The Go|Home key is changed from Alt-Home to Escape * The Open Terminal key is changed from F4 to Ctrl-S * Tools|Open Terminal now opens only current folder instead of selected * The default button on the delete dialog is changed to Yes * When enter is pressed in the Rename/Overwrite dialog, rename is assumed * Ctrl-F is assigned to Create New Folder instead of search (pressing any normal key still initiates a search), and Ctrl-Shift-F has been added for Create New File * The F5 Refresh function has been improved * .desktop files display their actual filenames rather than name, except in the user's Desktop folder * File list is given focus when a dir is entered or a new tab added * When a new file/folder is created in Detailed view mode, it is given focus * Middle-clicking on a tab will close it * Copying and pasting a single folder into its own parent now asks for a new name rather than attempting to copy the folder into itself. Pasting a folder into a selected folder no longer works. * Link creation (Paste or drag methods) can now generate overwrite/rename query instead of "File Exists" error * Accepts --desktop-pref, --profile, and --desktop for compatibility with PCManFM 0.9 * Bugfix: A serious bug which caused the target of a link to be overwritten rather than the link itself has been corrected * Bugfix: A bug which caused the target names of copied links to be mangled been corrected * Bugfix: A bug which caused a link's target's file permissions to change when the link was copied has been corrected * Bugfix: Right-clicking on a dangling sym-link now displays menu * Bugfix: Find Files now displays all results * Bugfix: Find Files 'Search in Sub Directories' now obeyed * Bugfix: Invalid cross-device link error fixed * Bugfix: Context menu write permissions are now based on directory write permission instead of one selected file; symlinks not erroneously followed for write permission to symlinks * Bugfix: A bug which prevented opening multiple folders on the pcmanfm command line has been corrected * Bugfix: Fixed error message on create new folder cancel * Bugfix: Default save folder for the Compress function is corrected * Bugfix: Links to broken links may now be created * Bugfix: Fixed POTFILES.in to correct error on make check * Bugfix: Fixed syntax errors in ca.po to prevent make error * Bug Workaround: A bug in GTK 2.20 which prevents double-clicking should not affect pcmanfm-mod 0.9.6 and later See http://bugzilla.gnome.org/show_bug.cgi?id=612802 CHANGELOG FOR PCMANFM-MOD: 1.2.4 (final): fixed find files bug (size greater than 1 not honored) fixed Copy As Text not handling filenames containing apostrophes remove virtual My Documents icon from desktop rename libmimetype.xml to pcmanfm-mod-mime.xml to prevent collisions 1.2.3: fixed POTFILES.in to correct error on make check added debian packaging control files 1.2.2: corrected keyboard nav problem (cursor not set when restoring previous selection) in Icon and Compact List view modes 1.2.1: added selection history (pkt-file-browser) corrected dir tree side pane scroll problem from gtk change (ptk-dir-tree) added File|Hide File to update .hidden (vfs-dir) new tab opens in custom home folder if configured (main-window) added Ctrl-Shift-F key shortcut for create new file status bar now shows selected file name removed config file su_cmd= option introduced in 1.1.2 made ktsuss default su command Tools|Open Terminal now opens only current folder instead of selected 0.5.2 bugfix: copy link changed link target permissions (vfs-file-task) 1.2.0: copy/move progress dialog count, size, speed added .hidden support fixed find files bug not displaying all results fixed find files recursive bug fixed invalid cross-device link error improved View|Refresh function - update model twice adjustments to status bar 1.1.3: workaround for root user roxterm dbus error added --desktop, --profile, and --desktop-pref for compat with 0.9 1.1.2: no_execute will now execute if Execute is selected from the context menu no_confirm added DSO patch for Fedora applied su_cmd added ktsuss now supported progress dialog simplified IEC binary units now show KB/MB/GB/TB; SI show kB/MB/GB/TB IEC binary units now default 1.1.1: copy/move/delete progress dialog widened to 700 added Copy Name (Alt-Shift-C) to Edit and context menus Paste and Create now always shown in context menu Paste items in context menu now insensitive if invalid clipboard 1.1.0: makefiles changed to build and install as "pcmanfm-mod" AUR package updated - installs as pcmanfm-mod, provides pcmanfm uses $XDG_CONFIG_HOME/pcmanfm-mod/ as config folder - imports from pcmanfm if missing Compress and Extract functions now support tar.xz Default save folder of Compress function now working folder (bugfix) program icons (normal and root user) changed refresh function improved middle-click on tab now closes it Create new file/folder in detailed list view now focuses new file (same behavior as icon view) File list given focus after create new file/folder (all views) 1.0.4: corrected compress/extract appearance in context menu 1.0.3: fixed error on drag to link in directory tree 1.0.2: added drag and drop to directory tree added Copy as Text (Ctrl-Shift-C) to Edit and context menus added Paste as Link and Paste as Target to context menu icons for user commands now displayed in context menu changed Run Command %U to %F (%U still works) home_folder used on home activate source tarball now bzip2 1.0.1: added "Edit|Paste as Target" (Alt-Shift-V) to paste targets fixed overwrite of link target context menu write permissions derive from current directory permissions instead of one selected file; no longer derived from resolved symlink target links to broken links may now be created link creation can now generate overwrite/rename query instead of "File Exists" error terminated buffer on link copy to prevent mangled target names AUR PKGBUILD now prefers gamin over fam 1.0.0: permissions now show sticky bit added keyboard shortcut Ctrl-S for Open Terminal unassigned user commands not shown in menus Refresh function now reloads even if busy 0.9.6: removed use of exo_noop_false to workaround GTK 2.20 bug .desktop files in Desktop folder now display app name removed confusing error message from installmod script corrected "// MOD" to "//MOD" in ptk-file-browser.c added version number to About dialog 0.9.5: changed Tools menu "Open Terminal" to "Open _Terminal" added special Run In Terminal for lxterminal and gnome-terminal (these require -e argument quoted) 0.9.4: removed diagnostic error pop-up in bookmark function added "Edit|Paste as Link" (Ctrl-Shift-V) to paste links added link target and target size in status bar added home_folder in main config file for Go|Home added no_execute in main config file to stop execution changed program icon for root user mode to folder-saved-search 0.9.3: removed diagnostic premature return that prevented right-click 'open with' menu from displaying (ptk-file-menu.c) 0.9.2: modified About dialog to indicate it is a modified version .desktop files display their actual filenames instead of name focus in file list after change directory and new tab Go|Home now Escape key instead of Alt-Home right-click on dangling symlink now displays popup menu copy/paste folder prompts for new name; no paste to selected rewrote str_replace used by Run Command without static buffer Run and Run In Terminal now have alt shortcut keys R & T Run In Terminal now terminates with open bash shell restored Open In Terminal to Tools and right-click menus installmod script now won't overwrite existing .desktop files or /usr/bin/pcmanfm-opener 0.9.1: fixed syntax errors in ca.po to prevent make error changed default button on delete dialog to Yes fixed error message on create new folder cancel improved F5 Refresh function added user commands and Run Command to right-click menu reorganized Tools menu fixed multiple instance -t opening of tabs added enter callback signal on rename/overwrite dialog Changed crtl-f to Create New Folder added uninstall instructions to README changed opener script - old script will not work correctly added desktop files for user commands and pcmanfm-mod 0.9.0: added user commands to Tools menu, keys F4, F6-F9 fixed bug when opening multiple folders on command line See also: README-LEGACY
Forum Discussion: Arch Forums: PCManFM Mod – User-Definable Functions
Example: Resize Selected Pics
This example uses repic to resize all selected files (repic must be installed before doing the following).
Copy the file /usr/share/applications/pcmanfm-user-f6.desktop to ~/.local/share/applications/. Then load the copy into your editor and change it so that it runs repic as follows:
[Desktop Entry] Name=Resize Pics Exec=repic --interopt --intersize StartupNotify=false Terminal=false NoDisplay=true
Now when you right-click on a file or files in PCManFM-Mod, the Resize Pics command will appear. Selecting this command will start repic, which will ask you for the desired size to resize to, and other options. In this way you can resize a group of pics to any size, add them to an email, and control the specifics of how repic will handle the images.
Example: permz To Quickly Change File Permissions
permz provides a fast way to manage file permissions in PCManFM-Mod. Just install it and associate it with one of the user commands in the same way repic was done in the example above.
For example, copy the file /usr/share/applications/pcmanfm-user-f7.desktop to ~/.local/share/applications/. Then load the copy into your editor and change it so that it runs permz as follows:
[Desktop Entry] Name=Permissions Exec=permz StartupNotify=false Terminal=false NoDisplay=true
permz can be run as root (if you run PCManFM-Mod as root), as well as a normal user.
Example: xtract To Quickly Extract Archives
xtract provides a fast way to extract archives in PCManFM-Mod. Just install it and associate it with one of the user commands in the same way repic was done in the example above.
For example, copy the file /usr/share/applications/pcmanfm-user-f7.desktop to ~/.local/share/applications/. Then load the copy into your editor and change it so that it runs xtract as follows:
Alternatively, instead of using a user command, you can just make xtract the default application for archives.
Example: Multi-Function Chooser And Archiver
By using a chooser script, you can extend the five user-definable commands which PCManFM-Mod includes to perform an almost unlimited number of functions. This example uses a chooser script to ask the user what is to be done with the selected files. The example chooser script can create tar.gz, tar.xz, and tar.bz2 archives containing all the selected files and folders, can use Xtract to extract archives, calculate the md5sum of selected files, or can simply open all the files with xdg-open. The example chooser script is intended to be customized with any additional functions you want to add.
Next, edit one of your local user command desktop files such as ~/.local/share/applications/pcmanfm-user-f7.desktop (copied from /usr/share/applications/pcmanfm-user-f7.desktop) so that it runs chooser as follows:
[Desktop Entry] Name=Chooser Exec=chooser StartupNotify=false Terminal=false TerminalOptions= Type=Application NoDisplay=true
Finally, if Zenity is not already installed on your system, install this package. For example:
# Arch Linux sudo pacman -S zenity # OR # Ubuntu sudo apt-get install zenity
Now when you right-click on a selected group of files and/or folders in PCManFM and select the Chooser command, chooser will run and ask you what function to perform. If you select to create an archive, you will first be asked for the archive name.