首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动火狐时不要设置“导航器”的wm_class

启动火狐时不要设置“导航器”的wm_class
EN

Unix & Linux用户
提问于 2023-03-27 21:56:34
回答 1查看 31关注 0票数 1

我启动Firefox的步骤如下:

代码语言:javascript
复制
/usr/bin/firefox --no-remote -P Fastmail --class "FastmailFF"

最终目标是找出一个命令,放入一个.desktop文件,该文件将有自己的图标,并独立存在于普通浏览器中。

上面的内容在当前Firefox图标下进行分组。

当我使用xprop WM_CLASS命令检查窗口时,会得到以下内容:

代码语言:javascript
复制
WM_CLASS(STRING) = "Navigator", "FastmailFF"

以及主要Firefox的以下内容:

代码语言:javascript
复制
WM_CLASS(STRING) = "Navigator", "firefox"

所以我想常见的"Navigator“字符串是导致分组的原因。

是否有办法防止Navigator在启动时被添加?

看起来firefox是通过一个快照安装的:

代码语言:javascript
复制
Version: 1:1snap1-0ubuntu2

我在运行gnome 42.5和wayland

EN

回答 1

Unix & Linux用户

发布于 2023-05-19 09:41:02

对我来说(在Fedora 37上使用Wayland和Gnome 43 ),问题是使用--name FastmailFF而不是--class FastmailFF

以下是完整的firefox-personal.desktop文件:

代码语言:javascript
复制
[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 %u
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/741151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档