我启动Firefox的步骤如下:
/usr/bin/firefox --no-remote -P Fastmail --class "FastmailFF"最终目标是找出一个命令,放入一个.desktop文件,该文件将有自己的图标,并独立存在于普通浏览器中。
上面的内容在当前Firefox图标下进行分组。
当我使用xprop WM_CLASS命令检查窗口时,会得到以下内容:
WM_CLASS(STRING) = "Navigator", "FastmailFF"以及主要Firefox的以下内容:
WM_CLASS(STRING) = "Navigator", "firefox"所以我想常见的"Navigator“字符串是导致分组的原因。
是否有办法防止Navigator在启动时被添加?
看起来firefox是通过一个快照安装的:
Version: 1:1snap1-0ubuntu2我在运行gnome 42.5和wayland
发布于 2023-05-19 09:41:02
对我来说(在Fedora 37上使用Wayland和Gnome 43 ),问题是使用--name FastmailFF而不是--class FastmailFF。
以下是完整的firefox-personal.desktop文件:
[Desktop Entry]
Version=1.0
Name=Firefox (Personal)
GenericName=Web Browser
Comment=Browse the Web
Exec=firefox -P personal -no-remote --name FirefoxPersonal %u
Icon=firefox
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
# NOTE: If this is not set to the same as the argument of the --name option,
# then GNOME Shell won't show the nice Firefox icon and the user facing
# "Firefox (Personal)" text along with it.
StartupWMClass=FirefoxPersonal
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
Actions=new-window;new-private-window;profile-manager-window;
X-Desktop-File-Install-Version=0.26
[Desktop Action new-window]
Name=Open a New Window
Exec=firefox -P personal -no-remote --name FirefoxPersonal --new-window %u
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=firefox -P personal -no-remote --name FirefoxPersonal --private-window %uhttps://unix.stackexchange.com/questions/741151
复制相似问题