跳转到内容

本站近期可能因网络攻击出现服务故障,导致无法联网阅读。建议用户安装 arch-wiki-docs-zh-cnCNRepo 或者 arch-wiki-docs-zh-twCNRepo 离线文档包备用,或者使用经由 Cloudflare CDN 的替代版本aw.lilydjwg.me

来自 Arch Linux 中文维基

Dolphin 是 KDE 的默认文件管理器。请参阅 Dolphin 模拟器来了解与之重名的游戏机模拟器

安装

安装 dolphin 软件包.

插件

注意:一些插件可能仍需要通过以下步骤启用: 配置 > 配置 Dolphin... > 右键菜单

文件预览

注意:预览一些特殊的文件类型必须在 Previews for specific file-types must be enabled in 配置 > 配置 Dolphin... > 界面 > 预览.
注意:要启用 resvgAUR 代替内置的 SVG 缩略图编辑器,请关闭 SVG 图像。

配置

单击打开文件夹/文件

To configure Single-Click to open items, you need to install and run qt6ct from the terminal, which will then give you the option to enable Single-Click (and change the theme etc.) from the 'Interface' tab.

If you use Kvantum theme engine - use kvantum manager > Configure Active Theme > Miscellaneous > Click behavior.

更改默认终端模拟器

Dolphin and other KDE applications use konsole by default. To change the default terminal emulator, run kcmshell6 componentchooser and select your Terminal Emulator or write the launch command into the selection field in the Other... popup. (The second option will create a new local desktop entry for this command.)

For example, to launch tmux in alacritty inside Dolphin, type alacritty -e tmux after selecting Other....

The setting can also be directly changed by modifying the configuration file ~/.config/kdeglobals. For example, to use alacritty add in the [General] section:

TerminalApplication=alacritty
TerminalService=Alacritty.desktop

Where TerminalApplication takes a command and TerminalService a desktop entry (TerminalService seems to be optional).

注意:this does not influence the terminal within the dolphin window (opened with F4).

本文或本章节的事实准确性存在争议。

原因: This does (only) work in KDE and might not be dolphin related and might not work in many other WMs.(在 Talk:Dolphin 中讨论)


To change the internal Dolphin terminal window go to Keyboard > Shortcuts and choose your preferred terminal and set the Launch shortcut to Ctrl+Alt+T, overriding Konsole's shortcut. Note that terminals opened this way might not follow the background color as specified in the terminal's configuration file, but otherwise should be identical to an instance launched in a window.

KIO slaves

Dolphin 使用 KIO slaves 进行网络访问、垃圾箱和其他功能,这与使用 GVFSGTK 文件管理器不同。可用协议显示在位置栏(可编辑模式)[1]。要快速将它们添加为书签,请在工作区中单击鼠标右键,然后选择“添加到常用位置”。

您可以手动安装 KIO slaves。例如,要在 Dolphin 中浏览您的 Google 云端硬盘,请安装 kio-gdrive

Tips and Tricks

文件标签

Dolphin 为文件标签提供了广泛的支持。您可以通过右键单击文件并选择分配标签来向文件添加标签。您可以在“属性”菜单或“信息”面板查看文件上的标签。

Dolphin uses the user.xdg.tags extended attribute to store tags directly along with each file. Baloo indexes these tags into its own database to allow for faster searching and maintains a list of all known tags.

Activate Baloo to show a list of all indexed tags within the Places panel and make searching for files by their tags possible.

Dolphin 使用 user.xdg.tags extended attribute直接将标签与每个文件一起存储。Baloo 将这些标签索引到自己的数据库中,以便快速搜索,并维护所有已知标签的列表。

隐藏自定义文件/目录

Files/directories can be hidden by creating a .hidden file (in the same directory) that contains the names of the files/directories that should be hidden (one per line).

Creating custom service menus

Custom service menu entries can be added to dolphin with special *.desktop files in one of the following Paths (see [2]):

  • ~/.local/share/kio/servicemenus/
  • /usr/share/kio/servicemenus/
注意:Desktop entries must be executable to show up in dolphin!
gamemode.desktop
[Desktop Entry]
Type=Service
MimeType=application/*;
Actions=runWithGamemode

[Desktop Action runWithGamemode]
Name=Run with Gamemode
Name[de]=Mit Gamemode ausführen
Icon=input-gaming
Exec=gamemoderun %u

This adds a Run with Gamemode menu item on all application mime types.

提示:To create a servicemenu for all file-types, use the application/octet-stream mimetype.

故障排除

设备名称显示为“X GiB Harddrive”

创建一个文件系统标签或分区标签,Dolphin 会在设备列表中显示此标签,而不是大小。请参见块设备持久化命名#by-label.

在外部驱动器上将文件移动到废纸篓需要很长时间

若要将文件移入废纸篓,用户必须具有对废纸篓的独占访问权限。理由是您不希望其他人看到您删除的内容。为此,在外部驱动器上创建了一个文件夹 .Trash-1000/ ,具有权限模式700

如果无法设置正确的访问权限,dolphin 会(与 GNOME 不同)将文件移动到主目录中的垃圾箱中,这需要时间。

要安装 U 盘/外部 HDD,Dolphin 使用 Udisks。FAT32 / EXFAT / NTFS 不支持 UNIX 文件权限,udisk 默认以模式 755 挂载它们。要配置 udisk 以使用模式 700 挂载这些驱动器,请查看文件 /etc/udisks2/mount_options.conf.example 。复制文件(名称应以 .conf 结尾),取消对相关部分的注释,并将三个文件系统添加到带有 xyz_defaults 选项 fmask=177,dmask=077 的行中。

(背景信息:[3], [4])

透明字体

使用 GTK Qt 样式时,选择框中的字体可能会变得透明。原生 Qt 样式(如 Cleanlooks 和 Oxygen)不受影响。

已安装SMB共享上的崩溃

参见 Samba#无法覆盖文件。.

图标不显示

如果 Dolphin 没有显示图标,安装并运行 qt6ct,在图标主题选项卡中选择一个图标主题,然后应用

如果图标仍未在 Dolphin 中显示,请在你的xprofile中将 QT_QPA_PLATFORMTHEME 环境变量设置为 qt6ct 。或者,使用platformtheme标志启动 Dolphin:

$ dolphin --platformtheme qt6ct

此外,当您使用不常见、不完整的图标主题时,请确保安装并继承备份图标主题,例如 hicolorAdwaita

图标太大

如果在 KDE 环境之外的 Dolphin 上图标过大,请用以下方法启动它:

XDG_CURRENT_DESKTOP=KDE KDE_SESSION_VERSION=6 QT_AUTO_SCREEN_SCALE_FACTOR=0 dolphin

不匹配的文件夹视图背景颜色

在 Plasma 以外的其他位置运行 Dolphin 时,文件夹视图窗格中的背景颜色可能与系统 Qt 主题不匹配。这是因为 Dolphin 从 [Colors:View]~/.config/kdeglobals

~/.config/kdeglobals
...
[Colors:View]
BackgroundNormal=#2E2E2E
...

如果您在文件夹视图窗格周围看到蓝色边框(如果您处于拆分视图中,则只会在焦点窗格周围),您可以通过 qt6ct 应用程序应用 fusion-fixes.qss 样式表来摆脱它。这个答案描述了如何让 adwaita 黑暗主题在 Gnome 下为 dolphin 工作。

或者,使用 kvantum 来管理您的 Qt6 主题。有关使用说明,请参阅Kvantum项目主页。

Zsh 配置文件未加载集成终端(Zsh profile not loading in integrated terminal)

本文或本章节的事实准确性存在争议。

原因: 这个issue不仅限于 Zsh;默认情况下,Konsole (以及 Konsolepart) 不会启动登录 shell。 zprofile 应该在启动会话时由显示管理器加载(就像由 SDDM[5][6] 完成的那样),而不是由终端模拟器加载。(在 Talk:Dolphin 中讨论)


如果您的 zsh 配置文件未加载,请尝试编辑您当前的配置文件。右键单击集成终端,然后单击编辑当前配置文件...并将启动命令编辑为 /bin/zsh --login

GTK 应用程序未使用Dolphin

参见统一 Qt 和 GTK 应用程序的外观#一致的文件对话框.

无法安装任何右键菜单插件

当您转到Dolphin菜单配置>配置 Dolphin>右键菜单>下载新服务并尝试安装任何服务时,您会收到以下错误消息:

/usr/bin/servicemenuinstaller: error while loading shared libraries: libpackagekitqt6.so.1: cannot open shared object file: No such file or directory

这可以通过安装 packagekit-qt6 来解决。然后重新启动 Dolphin。

在其他Window manager运行时,Dolphin无法找到应用

你可以通过安装 archlinux-xdg-menu 软件包,并且运行:

$ XDG_MENU_PREFIX=arch- kbuildsycoca6 --noincremental

This updates the KService desktop-file system configuration cache (see kbuildsycoca6(8)), which many KDE-applications rely on for selecting desktop entries. The --noincremental argument is optional. XDG_MENU_PREFIX is needed, because archlinux-xdg-menu creates a XDG Desktop Menu with an arch- prefix (see xdg-menu).

The XDG Desktop Menu files can be found in /etc/xdg/menus/*-applications.menu.

Normally, kbuildsycoca6 does not need to be installed as it is part of the kservice package, which is a dependency of dolphin.

注意:This solution only rebuilds the cache and does not keep it updated.

参见