Getting File Managers to work properly in Window Managers
- 1 Overview
- 2 Adding Extra Features to a File Manager
- 3 Displaying and Accessing Other Partitions
- 4 Displaying, Mounting, and Accessing Removable Media
- 5 Auto-Mounting Removable Media
- 6 Supporting Archiving and Extraction of Compressed Files
- 7 Supporting Thumbnailing
- 8 Supporting Digital Cameras
- 9 Supporting Networking / File and Printer Sharing
- 10 See Also
Installing a File Manager alone on a base system (as provided by the Net-Edition) is comparable to installing a Window Manager such as Openbox or Awesome instead of a desktop environment such as XFCE or Cinnamon. Whereas XFCE will already be pre-configured with a host of pre-installed applications and tools to provide numerous features by default, Openbox only provides a basic foundation to build upon. In the latter instance, the user must determine the configurations, applications, tools, and therefore features that are to be provided.
Exactly the same principal applies to File Managers. Where supplied in full desktop environments, the numerous features provided by - and usually expected of - File Managers have in fact been added by the desktop developers themselves. For example, just like every other aspect of XFCE, its File Manager (Thunar) has also been pre-configured for you. More specifically, this has included adding special configurations and installing additional software packages to:
- Display or access other partitions
- Display, mount, or access removable media such as USB sticks, DVDs, or digital cameras
- Automatically mount removable media when inserted or connected
- Extract zipped or compressed files
- Provide thumbnails of images or pdf files
- Support networking / shared networks with other installed operating systems
A basic file manager in and of itself does not and cannot provide any of these features. It would seem that without realising this, a quite a few (mostly new) users have been caught out, becoming increasingly frustrated and confused when their chosen File Manager is apparently incapable of even the most basic of abilities. This included the author of this article. However, the reality is that where installing in a Window Manager, it is enirely up to the user to determine the nature and extent of the features provided by their chosen File Manager. More specifically, this may largely be determined by selecting what particular software packages to install to enable specific features.
Adding Extra Features to a File Manager
It is worthwhile noting that where installing additional software packages to provide extra features for a File Manager, they will also be automatically sourced by any other installed File Managers, too. This includes File Managers used in other Window Managers or Desktop Environments installed on your system. In essence, the software packages themselves provide general enhancements for all File Managers, rather than specifically for any particular one.
Full Desktop Environments will automatically provide most - if not all - of the software packages listed below to support and enable the features provided by their pre-configured File Managers. This is why other File Managers installed - even where used in another desktop environment or Window Manager - will also automatically possess much the same features. In other words, these extra software packages need only to be installed once to enhance any file manager used in any environment.
Displaying and Accessing Other Partitions
To enable to basic ability to view and access other partitions, two additional software packages are required:
- gamin: A file and directory monitoring system, this enables the detection of changes to your files and folders
- gvfs: A virtual file system, this enables mounting and trash functions. There are actually quite a few gvfs packages available (listed below) which provide other additional features.
Although these may easily be installed by using Pamac, users in the process of building their intended desktop environment may particularly find the following terminal command to do so faster and easier:
sudo pacman -S gamin gvfs
There should not need to be any need to re-boot your system; the change should be immediate upon installation.
Displaying, Mounting, and Accessing Removable Media
Another gvfs software package is required to ensure that removable media such as USB sticks and CDs/DVDs can be accessed. This is gvfs-afc, which provides the file manager with additional support to handle removable media. To install this software package, enter the following command in the terminal:
sudo pacman -S gvfs-afc
Auto-Mounting Removable Media
Another source of confusion is why - despite having the necessary software packages installed - a file manager won't automount removable media when connected, or at least will only automount if and when the file manager itself is already running (i.e. it has an open window). The most direct answer to this conundrum is that - quite simply - a file manager cannot automount anything if it is not running at the time! This is just as a multimedia player such as VLC cannot play a DVD unless it has been launched to do so.
Option 1: Run the File Manager in Daemon Mode
The most obvious solution therefore is to run the File Manager in daemon mode. A daemon itself is simply a process that runs quietly in the background until it is needed. As the File Manager will therefore constantly be running - albeit in the background with no open windows - once removable media has been connected, it will then be able to detect and consequently mount that media automatically.
To do so, it will be necessary to edit the startup file / routine of your installed Window Manager, in order to add the command to start the file manager in daemon mode. The commands to start the most well-known file managers in daemon mode are as follows:
thunar --daemon pacmanfm -d spacefm -d qtfm -d
Where using a different choice of File Manager than those shown above, the switch to run it in daemon mode can usually be determined by entering the following command in the terminal, in order to bring up its instruction manual:
man [name of file manager]
If this does not yield results, then an internet search should suffice. However, there is an alternative option...
Option 2: Use Udiskie
Udiskie is a program that provides an automounting service. Nothing more, and nothing less. This option may be preferable for users who may not wish to tie their system into the use of a particular File Manager. In addition, at least in some instances, running udiskie may require less memory than a File Manager running in daemon mode as well (e.g. it certainly uses less than PCManFM). To install udiskie, either use Pamac, or enter the following command in the terminal:
sudo pacman -S udiskie
As with running a File Manager in daemon mode, it will then be necessary to edit the startup file / routine of your installed Window Manager, in order to add the command udiskie to start it.
An Example of Auto-Starting
While it is beyond the scope of this guide to provide instruction on how to edit the startup files or routines of the plethora of Window Managers available, a example to do so in openbox has been provided for illustrative purposes. In this instance it will necessary to edit the Openbox autostart file. The syntax of the command to do so in the terminal is as follows:
[text editor] ~/.config/openbox/autostart
For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:
Otherwise - if you have installed the full version of Manjaro (i.e. not the NET-Edition) - you may find it easier to use a text editor like Gedit or Leafpad instead. This will create and open the autostart file up as a document, making it easier to read and edit. To use Gedit instead, the command is:
Once open, to run a File Manager in daemon mode simply add one of the following commands, depending on the File Manager being used:
thunar --daemon & pacmanfm -d & spacefm -d & qtfm -d &
Alternatively, to run udiskie for automounting instead, add the following command:
Once you have made the necessary amendments to the file, save the change and close it by:
- nano: Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
- Gedit or Leafpad: Select the 'save' option and then close the window.
Optional: Desktop Notifications
It is easily possible to enable desktop notifications to confirm the successful mounting of media, through the installation of a notification daemon. While a number of such daemons are available, the recommended choice is xfce4-notifyd. Once installed, no further configuration will be required for it to work upon rebooting. To install this package via the terminal rather than Pamac, enter the following command:
sudo pacman -S xfce4-notifyd
Supporting Archiving and Extraction of Compressed Files
In order to enable the ability to extract tarballs (.tar / .tar.gz) in the File Manager, it will be necessary to install an archiver. Although several are available, file-roller is highly recommended. In addition, it will also be necessary to install some additional software packages in order to support the use of zipped files (.zip). The command to install file-roller and support for zipped files is as follows:
sudo pacman -S file-roller p7zip unzip
Once installed, files in the File Manager may consequently be right-clicked to archive or extract them.
Although of course entirely optional, the ability for the File Manager to provide thumbnail images for pictures, PDF files, and movie files can be very useful, particularly as they will not need to be opened first in order to know what they contain. To provide support for the thumbnailing of any kind, a software package called tumbler must be installed. Also automatically providing thumbnails for image files, it may be installed either through Pamac, or by entering the following command in a terminal:
sudo pacman -S tumbler
Once tumbler has been installed:
1.) To provide additional support for PDF file thumbnails, install poppler-glib:
sudo pacman -S poppler-glib
2.) To provide additional support for movie thumbnails, install ffmpegthumbnailer:
sudo pacman -S ffmpegthumbnailer
3.) To provide additional support for font file thumbnails, install freetype2:
sudo pacman -S freetype2
4.) To provide additional support for ODF file thumbnails, install libgsf:
sudo pacman -S libgsf
5.) To provide additional support for RAW file thumbnails, install libopenraw:
sudo pacman -S libopenraw
Supporting Digital Cameras
In order to transfer images / movies from some (but not all) digital cameras, it will be necessary to install the software package gvfs-gphoto2:
sudo pacman -S gvfs-gphoto2
Supporting Networking / File and Printer Sharing
It is possible to enable the file manager to support networking. In addition to enabling support for Bluetooth, file and printer sharing with Microsoft Windows and Apple's OSX - where also installed on your system - is also possible.
1.) To support the use of file transfers via bluetooth, install gvfs-obexftp:
sudo pacman -S gvfs-obexftp
2.) To support the use of file and printer sharing with Microsoft Windows, install gvfs-smb:
sudo pacman -S gvfs-smb
For a detailed explanation how to setup file sharing with Windows correctly, please look here: 
3. To support the use of file and printer sharing with Apple operating systems, install gvfs-afp:
sudo pacman -S gvfs-afp