Archive:Browser Configuration/Firefox Dialog Integration/zh-cn: Difference between revisions

From KDE UserBase Wiki
(Created page with "* 复制 Firefox 桌面文件:{{Input|1=<nowiki>cp /usr/share/applications/firefox.desktop $HOME/.local/share/applications</nowiki>}} 如果需要对所有用户启用此功...")
 
m (FuzzyBot moved page Browser Configuration/Firefox Dialog Integration/zh-cn to Archive:Browser Configuration/Firefox Dialog Integration/zh-cn without leaving a redirect: Part of translatable page "Browser Configuration/Firefox Dialog Integration")
 
(No difference)

Latest revision as of 08:50, 14 September 2023

Other languages:
从 Firefox 64 开始,Firefox 现在可以显示 Plasma 原生的“打开”和“保存”对话框,从而更好地与 Plasma 桌面的外观集成。

Template:警告 要启用本机对话框:

  • 安装必要的库。 在大多数发行版上,这可以通过安装 xdg-desktop-portal 来完成。 它们可能被分成两个独立的包(xdg-desktop-portalxdg-desktop-portal-kde)。
  • 复制 Firefox 桌面文件:
    cp /usr/share/applications/firefox.desktop $HOME/.local/share/applications
    如果需要对所有用户启用此功能 ,则必须以具有root权限的用户身份修改系统范围的快捷方式
  • Using the kwriteconfig tool in a console window (or a text editor), modify the Exec directives to instruct Firefox to use the Portal functionality.
    kwriteconfig5 --file $HOME/.local/share/applications/firefox.desktop --group "Desktop Entry" --key "Exec" "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox %u"
    kwriteconfig5 --file $HOME/.local/share/applications/firefox.desktop --group "Desktop Action new-window" --key "Exec" "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --new-window %u"
    kwriteconfig5 --file $HOME/.local/share/applications/firefox.desktop --group "Desktop Action new-private-window" --key "Exec" "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --private-window %u"
    

Warning

Changing all "Exec" directives is required as Firefox can be started in multiple modes.