我把Ubuntu22.04安装在一台4GB内存和17“显示器1440x900的旧戴尔沃斯特罗1700笔记本电脑上。一切正常,但有一件小事让我很烦。
我已经安装了最低限度的安装,然后安装了我想要的其他软件包。其中火狐( Firefox )已经被安装为snap版本。
如果我使用Wayland登录,当我第一次尝试启动Firefox时,我只能看到一个黑色的屏幕。如果我退出应用程序,然后再次启动应用程序,那么它就正常工作了。如果我试图通过单击左边的图标来运行firefox,或者通过键入Firefox从终端窗口启动Firefox,就会发生这种情况。
经过一些检查后,我注意到这种情况只发生在韦兰。如果我从Xorg开始,那么这个问题就不会发生。
在这里,有关安装的Firefox版本的信息:
name: firefox
summary: Mozilla Firefox web browser
publisher: Mozilla✓
store-url: https://snapcraft.io/firefox
contact: https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla
license: unset
description: |
Firefox is a powerful, extensible web browser with support for modern web
application technologies.
commands:
- firefox
- firefox.geckodriver
snap-id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
tracking: latest/stable/ubuntu-22.04
refresh-date: 4 days ago, at 06:30 CET
channels:
latest/stable: 110.0-3 2023-02-16 (2356) 252MB -
latest/candidate: 110.0-3 2023-02-14 (2356) 252MB -
latest/beta: 111.0b2-1 2023-02-17 (2370) 192MB -
latest/edge: 112.0a1 2023-02-18 (2373) 197MB -
esr/stable: 102.8.0esr-2 2023-02-16 (2364) 185MB -
esr/candidate: 102.8.0esr-2 2023-02-16 (2364) 185MB -
esr/beta: ↑
esr/edge: ↑
installed: 110.0-3 (2356) 252MB -有什么日志可以让我获得更多关于这种行为的信息吗?
我在互联网上发现,在reddit.com上的一篇文章中,有人报道了同样的问题。有什么建议吗?
你好,艾尔
发布于 2023-03-19 17:29:35
https://bbs.archlinux.org/viewtopic.php?id=258954
我也有同样的问题刚刚用上面的解决办法解决了。
在xwayland上运行firefox,必须通过设置环境变量在Wayland上运行
设置环境变量后,只需注销或重新启动即可。
发布于 2023-05-20 19:15:22
我在Ubuntu23.04上仍然有同样的问题,这有点不可思议,因为我希望Firefox和Wayland成为现在的标准配置。
我阅读了Yuvi的答复中提到的帖子,并得出了以下解决方案:
对于wayland会话,将MOZ_ENABLE_WAYLAND=1添加到您的环境中。这可以通过将以下代码添加到您的~/.profile (用于登录shell)来实现。这修复了点击Gnome中的Firefox图标和~/.bashrc (对于非登录shell)。这修正了从Gnome终端运行firefox的问题。
if [ "$XDG_SESSION_TYPE" == "wayland" ] ; then
export MOZ_ENABLE_WAYLAND=1
fihttps://askubuntu.com/questions/1455684
复制相似问题