最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

docker - Dockerized GUI applications won't run on my Fedora 41 machine: Failed to connect to the bus & Missing X

programmeradmin2浏览0评论

When I'm running the following command,

docker run --network host -e DISPLAY -it -v $PWD:/cypress -w /cypress --user $(id -u):$(id -g) --entrypoint=cypress cypress/included:13.6.4 open --e2e --browser firefox --project /cypress

I expect it to open the Firefox browser with the Cypress Test Runner running in it.

As you can tell, I'm using the cypress/included:13.6.4 Docker image.

When I run this command, here's the output I get:

Cypress failed to start.

This may be due to a missing library or dependency. 

Please refer to the error below for more details.

----------

[21:0209/103909.533044:ERROR:bus(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[21:0209/103916.838360:ERROR:ozone_platform_x11(240)] Missing X server or $DISPLAY
[21:0209/103916.838415:ERROR:env(255)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.

I've already checked the mentioned URL and installed all the required system deps, and that didn't help.

For me it's a bit unclear which error exactly makes the command fail. But I assumed that the most important part here is the Missing X server or $DISPLAY one.

Given that I run Fedora 41 with KDE Plasma 6 (on Wayland) on my machine, I assumed that the issue might be that there's no X server for my setup (again, Plasma runs on Wayland), so what I did, is I installed Plasma on X, started the respective session and re-ran the command there. The output was the same.

I also tried looking for other solutions (in fact, for all the mentioned error lines), and tried every possible solution mentioned on first 2 pages of Google search results. No luck so far.

What's interesting for me, is that this very same script used to work as expected on my another machine running Ubuntu (also with Plasma 6 on Wayland). And this very same script also works fine for my colleagues which use linux syb-system for Windows and a VM running Ubuntu.

In other words, so far I can tell that it's only Fedora which is struggling with running it.

I then went further and tried other Docker images with GUI applications, and none of them seems to work for me.

Non-GUI apps work fine.


Solutions I've tried so far include:

  • messing around with xhost
  • installing xvbf
  • using X session instead of Wayland
  • trying other images
  • changing the value of the DISPLAY env. var.
  • and many other ones which I don't quite remember already

The biggest question for me is how do I make the mentioned command work as expected. A more general question would be why won't any dockerized GUI apps run on my machine? How do I make them run?

I would be more than happy to provide any missing logs/configs/etc., just let me know which ones exactly.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论