File manager functionality (简体中文)
本文介绍扩展文件管理器功能的相关软件,特别是使用窗口管理器如Openbox的时候。还提供了在没有密码的情况下访问分区和可移动媒体的能力(如果受到影响)。
概要
单独的文件管理器将不会提供完整的桌面环境如Xfce或KDE的那些用户习惯的特性和功能。这是因为需要额外的软件包才能使给定的文件管理器能够:
- 显示和访问其他分区
- 显示、挂载和访问可移动媒体(例如USB记忆棒,光盘和数码相机)
- 启用或分享与其他已安装的操作系统的网络
- 启用缩略图
- 归档和提取压缩文件
- 自动挂载可移动媒体
当文件管理器作为完整桌面环境的一部分安装时,通常会自动安装大多数的这些软件包。 因此,在为独立的窗口管理器安装文件管理器的情况下——就像窗口管理器本身一样——只提供基本的支持。那么用户必须确认要添加的特性和功能的性质和范围。
附加功能
特别是在使用或打算使用轻量级环境的地方,应当注意更多的文件管理器的特性和功能通常意味着使用更多的内存。参见udisks。
挂载
GVFS使用的文件夹:
-
/usr/lib/gvfs/
包含gvfsd-*
文件, 其中*
表示支持各种文件系统类型。 -
/usr/share/gvfs/mounts/
包含GVFS股灾规则。要使用自己的规则,请创建~/.gvfs/mounts
。
安装附加安装包通常遵循如下gvfs-* pattern模式,例如:
- gvfs-afc: 苹果移动设备
- gvfs-mtp: 媒体播放器和移动设备使用MTP
- gvfs-gphoto2: 数码相机和移动设备使用PTP
文件管理守护程序
第一种是简单地以守护进程daemon模式自动启动或运行已安装的文件管理器(即作为后台进程)。例如,在Openbox中使用PCManFM时,以下命令将添加到 ~/.config/openbox/autostart
文件中:
pcmanfm -d &
还需要在卷管理方面配置文件管理器本身(例如,当安装时检测到某些文件类型时,它将执行什么操作以及将启动哪些应用程序)。
独立
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 may not have to be installed for mounting, lessening memory use.
网络
- obexfsAUR[损坏的链接:package not found]: 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)
- gvfs-afp[损坏的链接:replaced by gvfs]: Apple file and printer sharing
- sshfs: FUSE client based on the SSH File Transfer Protocol
Windows 访问
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 <sever name> and <share name> as appropriate:
smb://<server name>/<share name>
Apple 访问
If using gvfs-afc, to access AFP files first open the file manager, and enter the following into the path name, changing <sever name> and <share name> as appropriate:
afp://<server name>/<share name>
缩略图预览
Some file managers may not support thumbnailing, even when the packages listed have been installed. Check the documentation for the relevant file manager.
Dolphin 和 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
-
poppler-glib: Adobe
.pdf
files - ffmpegthumbnailer: Video files
- freetype2: Font files
-
libgsf:
.odf
files -
raw-thumbnailerAUR:
.raw
files
Dolphin and Konqueror (KDE)
解压文件
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#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.
NTFS 读/写 支持
见 NTFS-3G 文章.
桌面通知
Some file managers make use of desktop notifications to confirm various events and statuses like mounting, unmounting and ejection of removable media.
在不同的文件系统上开启回收站功能 (外部驱动器)
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
故障排除
"Not Authorized" 尝试挂载驱动时
File managers using udisks require a polkit authentication agent. See polkit#Authentication agents.
访问分区所需的密码
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.
目录未在文件管理器中打开
You may find that an application that is not a file manager, Audacious 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