跳至內容

本站近期可能因网络攻击出现服务故障,导致无法联网阅读。建议用户安装 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.

參見