File manager functionality: Difference between revisions
m (fix ja link) |
Lahwaacz.bot (talk | contribs) (fixed section fragments (interactive)) |
||
(90 intermediate revisions by 40 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:File managers]] | [[Category:File managers]] | ||
[[ja:ファイルマネージャの機能]] | [[ja:ファイルマネージャの機能]] | ||
[[pt:File manager functionality]] | |||
[[ru:File manager functionality]] | |||
[[zh-hans:File manager functionality]] | |||
{{Related articles start}} | {{Related articles start}} | ||
{{Related| | {{Related|List of applications/Utilities#File managers}} | ||
{{Related|Window manager}} | {{Related|Window manager}} | ||
{{Related|Desktop environment}} | {{Related|Desktop environment}} | ||
{{Related|Udisks}} | {{Related|Udisks}} | ||
{{Related|Extended attributes}} | |||
{{Related articles end}} | {{Related articles end}} | ||
This article outlines the additional software packages necessary to expand the features and functionality of file managers, particularly where using a [[window manager]] such as [[Openbox]]. The ability to access partitions and removable media without a password - if affected - has also been provided. | This article outlines the additional software packages necessary to expand the features and functionality of file managers, particularly where using a [[window manager]] such as [[Openbox]]. The ability to access partitions and removable media without a password - if affected - has also been provided. | ||
== Overview == | == Overview == | ||
{{note|When installed, the software packages listed below will automatically be sourced by all installed - and capable - file managers, and within all desktop environments and/or window managers.}} | {{note|When installed, the software packages listed below will automatically be sourced by all installed - and capable - file managers, and within all desktop environments and/or window managers.}} | ||
Line 28: | Line 32: | ||
{{Expansion|Mention KDE file managers which use KIO instead of GVFS for mounting and other functionality}} | {{Expansion|Mention KDE file managers which use KIO instead of GVFS for mounting and other functionality}} | ||
When using a lightweight environment, the more added file manager features, the more memory usage is needed. See also [[udisks]]. | |||
=== Mounting === | === Mounting === | ||
* {{pkg|gvfs}} | * The Gnome virtual filesystem ({{pkg|gvfs}}) provides mounting and trash functionality. GVFS uses {{pkg|udisks2}} for mounting functionality and is the recommended solution for most file managers. | ||
Folders used by GVFS: | |||
* {{ic|/usr/lib/}} contains {{ic|gvfsd-*}} files, where {{ic|*}} refers to the various supported file system types. | |||
* {{ic|/usr/share/gvfs/mounts/}} contains mount rules for GVFS. To use one's own rules, create {{ic|~/.gvfs/mounts}}. | |||
* {{pkg|gvfs- | Additional packages for installation usually follows the [https://archlinux.org/packages/?q=gvfs- gvfs-* pattern], for example: | ||
* {{pkg|gvfs- | |||
* {{pkg|gvfs- | * {{pkg|gvfs-mtp}}: media players and mobile devices that use [[MTP]] | ||
* {{pkg|gvfs-gphoto2}}: digital cameras and mobile devices that use [[Wikipedia:Picture Transfer Protocol|PTP]] | |||
* {{pkg|gvfs-afc}}: Apple mobile devices | |||
==== File manager daemon ==== | ==== File manager daemon ==== | ||
Most graphical file managers have the ability to automount devices plugged in while the program is running. You can leverage this for a system-wide solution by running the file manager in [[daemon]] mode (i.e. as a background process), if supported. For example, when using [[PCManFM]] in [[Openbox]], the following command would be added to the {{ic|~/.config/openbox/autostart}} file: | |||
pcmanfm -d & | pcmanfm -d & | ||
Line 53: | Line 60: | ||
==== Standalone ==== | ==== Standalone ==== | ||
Another option is to install a separate [[List of applications/Utilities#Mount tools|mount application]]. The advantages of using this are: | |||
* Less memory may be required to run as a background/[[daemon]] process than a file manager | |||
* It is not file-manager-specific, allowing them to be freely added, removed, and switched | |||
* Less memory may be required to run as a background / [[daemon]] process than a file manager | * {{pkg|gvfs}} is not needed to be installed for mounting, lessening memory usage. If it is installed, then its daemon [[D-Bus#Override dbus service|can be masked]], and started only on demand. This is useful for example as a fallback for [[mtp]], where some implementations may not work. | ||
* It is not file manager specific, allowing them to be freely added, removed, and switched | |||
* {{pkg|gvfs}} | |||
=== Networks === | === Networks === | ||
Line 64: | Line 70: | ||
{{note|It will also be necessary to enable [[Bluetooth]] and/or networking with [[Samba|Windows]] to enable the relevant file manager functionality in turn.}} | {{note|It will also be necessary to enable [[Bluetooth]] and/or networking with [[Samba|Windows]] to enable the relevant file manager functionality in turn.}} | ||
* {{ | * {{AUR|obexftp}}: Bluetooth device mounting and file transfers (see [[Bluetooth]]) | ||
* {{pkg|gvfs-smb}}: Windows File and printer sharing for '''Non-KDE''' desktops (see [[Samba]]) | * {{pkg|gvfs-smb}}: Windows File and printer sharing for '''Non-KDE''' desktops (see [[Samba]]) | ||
* {{pkg|kdenetwork-filesharing}}: Windows File and printer sharing for [[KDE]] (see [[Samba#KDE]]) | * {{pkg|kdenetwork-filesharing}}: Windows File and printer sharing for [[KDE]] (see [[Samba#KDE]]) | ||
* {{pkg|sshfs}}: FUSE client based on the [[SSH]] File Transfer Protocol | |||
* {{pkg|sshfs}}: FUSE client based on the SSH File Transfer Protocol | |||
==== Windows access ==== | ==== Windows access ==== | ||
If using {{pkg|gvfs-smb}}, to access Windows/ | If using {{pkg|gvfs-smb}}, to access Windows/[[Cifs]]/Samba file shares first open the file manager, and enter the following into the path name, changing {{ic|''server_name''}} and {{ic|''share_name''}} as appropriate: | ||
smb:// | smb://''server_name''/''share_name'' | ||
==== Apple access ==== | ==== Apple access ==== | ||
AFP support is included in {{pkg|gvfs}}. To access AFP files first open the file manager, and enter the following into the path name, changing {{ic|''server_name''}} and {{ic|''share_name''}} as appropriate: | |||
afp:// | afp://''server_name''/''share_name'' | ||
==== sftp access ==== | |||
SFTP support is also included in {{pkg|gvfs}}. To access folders via sftp, open the file manager, and enter the following into the path name, changing {{ic|''user@server_name''}} and {{ic|''folder_name''}} as appropriate: | |||
sftp://''user@server_name''/''folder_name'' | |||
=== Thumbnail previews === | === Thumbnail previews === | ||
Some file managers may not support thumbnailing, even when the packages listed have been installed. Check the documentation for the relevant file manager. | Some file managers may not support thumbnailing, even when the packages listed have been installed. Check the documentation for the relevant file manager. | ||
You may not see thumbnails for remote storage, including [[MTP]]. Check your file manager's settings, e.g. for [[Thunar]] one has to set "Show thumbnails: always". | |||
==== File managers other than Dolphin and Konqueror ==== | ==== File managers other than Dolphin and Konqueror ==== | ||
These packages apply to most file managers, such as [[PCManFM]], [[SpaceFM]], [[Thunar]] and {{ | These packages apply to most file managers, such as [[PCManFM]], [[SpaceFM]], [[Thunar]] and {{AUR|xfe}}. The exceptions are Dolphin and Konqueror, used in the [[KDE]] desktop environment. | ||
* {{ | * {{Pkg|tumbler}}: Image files. This '''<u>must</u>''' also be installed to expand thumbnailing capabilities to other file types in some cases. | ||
* {{ | * {{Pkg|webp-pixbuf-loader}}: {{ic|.webp}} images | ||
* {{ | * {{Pkg|poppler-glib}}: Adobe {{ic|.pdf}} files | ||
* {{ | * {{Pkg|ffmpegthumbnailer}}: Video files | ||
* {{ | * {{Pkg|freetype2}}: Font files | ||
* {{ | * {{Pkg|libgsf}}: {{ic|.odf}} files | ||
* {{AUR|raw-thumbnailer}}: {{ic|.raw}} files | |||
* {{Pkg|totem}}: Video files and tagged audio files ([[GNOME Files]], and Caja only) | |||
* {{Pkg|evince}} or {{Pkg|atril}}: {{ic|.pdf}} files | |||
* {{Pkg|gnome-epub-thumbnailer}}: {{ic|.epub}} and {{ic|.mobi}} ebook files | |||
* {{AUR|mcomix}}: {{ic|.cbr}} comicbook archives | |||
* {{AUR|folderpreview}}: folder thumbnailer | |||
* {{Pkg|f3d}}: 3D files, including glTF, stl, step, ply, obj, fbx. | |||
==== Dolphin and Konqueror (KDE) ==== | ==== Dolphin and Konqueror (KDE) ==== | ||
See [[Dolphin#File previews]]. | See [[Dolphin#File previews]]. | ||
==== Use PCManFM to get thumbnails for other file types ==== | |||
{{Style|This section is not specific to PCManFM, it should be rewritten/generalized.}} | |||
[[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: | |||
[Thumbnailer Entry] | |||
TryExec=convert | |||
Exec=convert %i[0] -background "#FFFFFF" -flatten -thumbnail %s %o | |||
MimeType=application/pdf;application/x-pdf;image/pdf; | |||
{{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.}} | |||
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. | |||
{{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''.}} | |||
=== Archive files === | === Archive files === | ||
To extract compressed files such as tarballs ({{ic|.tar}} and {{ic|.tar.gz}}) within a file manager, it will first be necessary to install a GUI archiver such as {{pkg|file-roller}}. See [[List of applications#Archiving and compression tools]] for further information. An additional package such as {{pkg|unzip}} must also be installed to support the use of zipped {{ic|.zip}} files. Once an archiver has been installed, files in the file manager may consequently be right-clicked to be archived or extracted. | To extract compressed files such as tarballs ({{ic|.tar}} and {{ic|.tar.gz}}) within a file manager, it will first be necessary to install a GUI archiver such as {{pkg|file-roller}}. See [[List of applications/Utilities#Archiving and compression tools]] for further information. An additional package such as {{pkg|unzip}} must also be installed to support the use of zipped {{ic|.zip}} files. Once an archiver has been installed, files in the file manager may consequently be right-clicked to be archived or extracted. | ||
Archive files are mounted under folder {{ic|1=/run/user/$(id -u)/gvfs/}} with automatically created mount point that contains full path to the file in its name where all {{ic|/}} are replaced with {{ic|%252F}} and {{ic|:}} replaced with {{ic|%253A}} [https://www.owasp.org/index.php/Double_Encoding hex codes]. | |||
Example of path to the mounted archive {{ic|/full/path/to/file/name.zip}} | |||
/run/user/$(id -u)/gvfs/archive:host=file%253A%252F%252F%252F'''full%252Fpath%252Fto%252Ffile%252Fname.zip''' | |||
=== NTFS read/write support === | === NTFS read/write support === | ||
See the [[NTFS]] article. | |||
=== Desktop notifications === | === Desktop notifications === | ||
Some file managers make use of [[desktop notifications]] to confirm various events and statuses like mounting, unmounting and ejection of removable media. | Some file managers make use of [[desktop notifications]] to confirm various events and statuses like mounting, unmounting and ejection of removable media. | ||
=== Enable Trash functionality on different filesystems (external drives) === | |||
{{Accuracy|Should these folders not be created automatically? When is it necessary to create them manually?}} | |||
Make [https://specifications.freedesktop.org/trash-spec/trashspec-latest.html trash directories] {{ic|.Trash-''<uid>''}} for each users on the top level of filesystems: | |||
For example (mount point: /media/sdc1, uid: 1000, gid: 1000): | |||
# mkdir /media/sdc1/.Trash-1000 | |||
and {{ic|chown}} them: | |||
# chown 1000:1000 /media/sdc1/.Trash-1000 | |||
== Troubleshooting == | == Troubleshooting == | ||
Line 122: | Line 177: | ||
The need to enter a password to access other partitions or mounted removable media will likely be due to the default permission settings of {{pkg|udisks2}}. More specifically, permission may be set to the root account only, not the user account. See [[Udisks#Configuration]] for details. | The need to enter a password to access other partitions or mounted removable media will likely be due to the default permission settings of {{pkg|udisks2}}. More specifically, permission may be set to the root account only, not the user account. See [[Udisks#Configuration]] for details. | ||
=== Directories are not opened in the file manager === | |||
You may find that an application that is not a file manager, [[Audacious]] or [[Visual Studio Code]] for example, is set as the default application for opening directories — an application that specifies that it can handle the {{ic|inode/directory}} MIME type in its desktop entry can become the default. You can query the default application for opening directories with the following command: | |||
$ xdg-mime query default inode/directory | |||
To ensure that directories are opened in the file manager, run the following command: | |||
$ xdg-mime default ''my_file_manager''.desktop inode/directory | |||
where {{ic|''my_file_manager''.desktop}} is the desktop entry for your file manager — {{ic|org.gnome.Nautilus.desktop}} for example. | |||
{{Tip|If you want the change to be system-wide, run the command above as root or create/edit the following file: | |||
{{hc|/usr/share/applications/mimeapps.list|2= | |||
[Default Applications] | |||
inode/directory=''my_file_manager''.desktop | |||
}}}} | |||
==== D-Bus ==== | |||
Some other applications instead use the {{ic|org.freedesktop.FileManager1}} D-Bus protocol (e.g. [[Firefox]]). The following shows a list of currently installed services supporting this protocol: | |||
$ grep -R FileManager1 /usr/share/dbus-1/services | |||
To change what file manager is opened, copy the file to {{ic|$XDG_DATA_HOME/dbus-1/services}}. Additionally, before the changes become active, kill the program currently implementing the D-Bus service. |
Latest revision as of 10:32, 16 March 2024
This article outlines the additional software packages necessary to expand the features and functionality of file managers, particularly where using a window manager such as Openbox. The ability to access partitions and removable media without a password - if affected - has also been provided.
Overview
A file manager alone will not provide the features and functionality that users of full desktop environments such as Xfce or KDE will be accustomed to. This is because additional software packages will be required to enable a given file manager to:
- Display and access other partitions
- Display, mount, and access removable media (e.g. USB sticks, optical discs, and digital cameras)
- Enable networking / shared networks with other installed operating systems
- Enable thumbnailing
- Archive and extract compressed files
- Automatically mount removable media
When a file manager has been installed as part of a full desktop environment, most of these packages will usually have been installed automatically. Consequently, where a file manager has been installed for a standalone window manager then - as is the case with the window manager itself - only a basic foundation will be provided. The user must then determine the nature and extent of the features and functionality to be added.
Additional features
When using a lightweight environment, the more added file manager features, the more memory usage is needed. See also udisks.
Mounting
- The Gnome virtual filesystem (gvfs) provides mounting and trash functionality. GVFS uses udisks2 for mounting functionality and is the recommended solution for most file managers.
Folders used by GVFS:
/usr/lib/
containsgvfsd-*
files, where*
refers to the various supported file system types./usr/share/gvfs/mounts/
contains mount rules for GVFS. To use one's own rules, create~/.gvfs/mounts
.
Additional packages for installation usually follows the gvfs-* pattern, for example:
- gvfs-mtp: media players and mobile devices that use MTP
- gvfs-gphoto2: digital cameras and mobile devices that use PTP
- gvfs-afc: Apple mobile devices
File manager daemon
Most graphical file managers have the ability to automount devices plugged in while the program is running. You can leverage this for a system-wide solution by running the file manager in daemon mode (i.e. as a background process), if supported. For example, when using PCManFM in Openbox, the following command would be added to the ~/.config/openbox/autostart
file:
pcmanfm -d &
It will also be necessary to configure the file manager itself in respect to volume management (e.g. what it will do and what applications will be launched when certain file types are detected upon mounting).
Standalone
Another option is to install a separate mount application. The advantages of using this are:
- Less memory may be required to run as a background/daemon process than a file manager
- It is not file-manager-specific, allowing them to be freely added, removed, and switched
- gvfs is not needed to be installed for mounting, lessening memory usage. If it is installed, then its daemon can be masked, and started only on demand. This is useful for example as a fallback for mtp, where some implementations may not work.
Networks
- obexftpAUR: Bluetooth device mounting and file transfers (see Bluetooth)
- gvfs-smb: Windows File and printer sharing for Non-KDE desktops (see Samba)
- kdenetwork-filesharing: Windows File and printer sharing for KDE (see Samba#KDE)
- sshfs: FUSE client based on the SSH File Transfer Protocol
Windows access
If using gvfs-smb, to access Windows/Cifs/Samba file shares first open the file manager, and enter the following into the path name, changing server_name
and share_name
as appropriate:
smb://server_name/share_name
Apple access
AFP support is included in gvfs. To access AFP files first open the file manager, and enter the following into the path name, changing server_name
and share_name
as appropriate:
afp://server_name/share_name
sftp access
SFTP support is also included in gvfs. To access folders via sftp, open the file manager, and enter the following into the path name, changing user@server_name
and folder_name
as appropriate:
sftp://user@server_name/folder_name
Thumbnail previews
Some file managers may not support thumbnailing, even when the packages listed have been installed. Check the documentation for the relevant file manager.
You may not see thumbnails for remote storage, including MTP. Check your file manager's settings, e.g. for Thunar one has to set "Show thumbnails: always".
File managers other than Dolphin and Konqueror
These packages apply to most file managers, such as PCManFM, SpaceFM, Thunar and xfeAUR. The exceptions are Dolphin and Konqueror, used in the KDE desktop environment.
- tumbler: Image files. This must also be installed to expand thumbnailing capabilities to other file types in some cases.
- webp-pixbuf-loader:
.webp
images - poppler-glib: Adobe
.pdf
files - ffmpegthumbnailer: Video files
- freetype2: Font files
- libgsf:
.odf
files - raw-thumbnailerAUR:
.raw
files - totem: Video files and tagged audio files (GNOME Files, and Caja only)
- evince or atril:
.pdf
files - gnome-epub-thumbnailer:
.epub
and.mobi
ebook files - mcomixAUR:
.cbr
comicbook archives - folderpreviewAUR: folder thumbnailer
- f3d: 3D files, including glTF, stl, step, ply, obj, fbx.
Dolphin and Konqueror (KDE)
Use PCManFM to get thumbnails for other file types
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 /usr/share/thumbnailers
. The packages which provide a thumbnailer usually add the corresponding .thumbnail file at /usr/share/thumbnailers
. For example, in order to get thumbnails for OpenDocument files, you may install libgsf from the official repositories. For video files' thumbnails, the package ffmpegthumbnailer is required. For PDF files, you may install evince from the official repositories, which provides evince-thumbnailer
and the corresponding file at /usr/share/thumbnailers
. However, if you prefer not to install evince
, you can also replicate the functionality of evince-thumbnailer
using imagemagick's convert
command. This is accomplished by creating a new file with the .thumbnailer extension (e.g.: imagemagick-pdf.thumbnailer
) at /usr/share/thumbnailers
with the following content:
[Thumbnailer Entry] TryExec=convert Exec=convert %i[0] -background "#FFFFFF" -flatten -thumbnail %s %o MimeType=application/pdf;application/x-pdf;image/pdf;
convert
only generates a thumbnail of the first page. This is a convert
-specific syntax and has nothing to do with the syntax of the thumbnailers' files.Following this example, you can specify custom thumbnailers by creating your own .thumbnail files. Keep in mind that %i
refers to the input file (the file which will have its thumbnail made), %o
to the output file (the thumbnail image) and %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.
Archive files
To extract compressed files such as tarballs (.tar
and .tar.gz
) within a file manager, it will first be necessary to install a GUI archiver such as file-roller. See List of applications/Utilities#Archiving and compression tools for further information. An additional package such as unzip must also be installed to support the use of zipped .zip
files. Once an archiver has been installed, files in the file manager may consequently be right-clicked to be archived or extracted.
Archive files are mounted under folder /run/user/$(id -u)/gvfs/
with automatically created mount point that contains full path to the file in its name where all /
are replaced with %252F
and :
replaced with %253A
hex codes.
Example of path to the mounted archive /full/path/to/file/name.zip
/run/user/$(id -u)/gvfs/archive:host=file%253A%252F%252F%252Ffull%252Fpath%252Fto%252Ffile%252Fname.zip
NTFS read/write support
See the NTFS article.
Desktop notifications
Some file managers make use of desktop notifications to confirm various events and statuses like mounting, unmounting and ejection of removable media.
Enable Trash functionality on different filesystems (external drives)
Make trash directories .Trash-<uid>
for each users on the top level of filesystems:
For example (mount point: /media/sdc1, uid: 1000, gid: 1000):
# mkdir /media/sdc1/.Trash-1000
and chown
them:
# chown 1000:1000 /media/sdc1/.Trash-1000
Troubleshooting
"Not Authorized" when attempting to mount drives
File managers using udisks require a polkit authentication agent. See polkit#Authentication agents.
Password required to access partitions
The need to enter a password to access other partitions or mounted removable media will likely be due to the default permission settings of udisks2. More specifically, permission may be set to the root account only, not the user account. See Udisks#Configuration for details.
Directories are not opened in the file manager
You may find that an application that is not a file manager, Audacious or Visual Studio Code for example, is set as the default application for opening directories — an application that specifies that it can handle the inode/directory
MIME type in its desktop entry can become the default. You can query the default application for opening directories with the following command:
$ xdg-mime query default inode/directory
To ensure that directories are opened in the file manager, run the following command:
$ xdg-mime default my_file_manager.desktop inode/directory
where my_file_manager.desktop
is the desktop entry for your file manager — org.gnome.Nautilus.desktop
for example.
/usr/share/applications/mimeapps.list
[Default Applications] inode/directory=my_file_manager.desktop
D-Bus
Some other applications instead use the org.freedesktop.FileManager1
D-Bus protocol (e.g. Firefox). The following shows a list of currently installed services supporting this protocol:
$ grep -R FileManager1 /usr/share/dbus-1/services
To change what file manager is opened, copy the file to $XDG_DATA_HOME/dbus-1/services
. Additionally, before the changes become active, kill the program currently implementing the D-Bus service.