Running Browser in CoreOS (GUI)

1,212 views
Skip to first unread message

Vel Ats

unread,
Apr 6, 2018, 9:00:35 AM4/6/18
to CoreOS User
Hey

i know that coreos is not meant to run any graphical stuff but is it possible in any way to run chrome or firefox with a graphical user interface?
Since docker needs an x-server and coreos has no packagemanager to install an x-server i dont know what to do.

Thanks

Seán C. McCord

unread,
Apr 6, 2018, 10:15:26 AM4/6/18
to Vel Ats, CoreOS User
It is possible, but if you are confused as to how to get an X server _installed_ (much less running) on CoreOS, I urge you to reconsider your choices.  In particular, examine why you want to run a GUI on a server OS.  What is it that draws you to CoreOS/ContainerLinux?  You appear to not already be aware of the container-oriented nature of it, which makes the choice less sure.

Common prototypical reasons (and alternative thought) for being drawn to Container Linux _other_ than for its server role:

- Automatic updates:  these are often available from desktop OSs with add-on software and/or add-on services
- Highly-compartmentalized (container-oriented):  consider Qubes OS[1], virtual machines, or even containers _on_ a desktop OS
- Small footprint: consider a more customizable OS, such as Gentoo or Arch, such that you can install just the pieces you want
- Builds/installs from a spec (declarative install):  consider NixOS[2]

Assuming none of this has thus far dissuaded you:

Like any other piece of software in CoreOS, you would "install" an X server by creating and pulling a container image.  You are perfectly free to include whatever random software you want to include within your container, and you can even use package managers to do it.  Just take a look at almost any Dockerfile out there, up to and including the Docker-official images.

_Running_ the X server is the harder part.   X generally requires (at a minimum) root access and device access, and an untold set of other requirements not generally available within a container.  

Jessie Frazelle[3] has done a lot of work in the area of running GUI applications inside containers in the past, so you should definitely take a look at her materials, but know that this is definitely _not_ a goal of any of these components.




--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Seán C McCord
CyCore Systems, Inc

Seán C. McCord

unread,
Apr 6, 2018, 10:19:48 AM4/6/18
to Vel Ats, CoreOS User
I meant to add, too, that it is perfectly fine to run GUI _applications_ on CoreOS as X clients to a remote X server.  So you can, for instance, run an X server on a barebones raspberry Pi and then run your GUI from CoreOS in a container, connecting to the raspberry Pi's X server.

Vel Ats

unread,
Apr 7, 2018, 8:09:28 AM4/7/18
to CoreOS User
The goal is to have multiple displays (each running with a small pc and CoreOS) that display some SOAP-Content (via GUI) and doing some data deplayment and updating and sensor logging stuff. I think CoreOS and Docker are a great choice to achieve this.

I already saw the work that Jessie Frazelle did but i did not really find the solution to my problem.
Maybe i could describe the problem in an other way:
if i run my docker container, i am passing the display variable as an argument. but the container fails to launch because the display was not found, and setting the DISPLAY-variable to =:0 didnt work either.
is it correct that this is because coreOS does not have any graphical drivers or "x-server" ??

i am really new to this topic. i am a computer science student, currently in my practical semester, working for a small company that wants to switch from windows to linux on some devices with the purpose i described above.

Seán C. McCord

unread,
Apr 7, 2018, 11:35:50 AM4/7/18
to Vel Ats, CoreOS User
Yes, it is true that CoreOS Container Linux does not come with display drivers or X server, and it _certainly_ does not automatically start such a thing running.  It doesn't even come with many CLI tools.  It is very much intended that all applications be run in containers.

So it sounds like you are building something akin to a kiosk.  I really don't think Container Linux is the best choice for you here.  It is lightweight in the sense that the installed footprint is small, but that is not a sufficient reason to choose it, especially since the main goal for you is essentially a directly-driven GUI.  There are many distributions which have a small installation footprint and are good for embedded/kiosk applications.

As I said before, however, you _can_ run most anything in a container, and that includes an X server.  It _will_ require various non-default permissions and non-default client configurations, however, and that is going to require some effort to get running.

Vel Ats

unread,
Apr 9, 2018, 3:50:35 AM4/9/18
to CoreOS User
can you tell what permissions and which client-configuration is needed? i would like to try to get it running before i decide to use an other OS.

Seán C. McCord

unread,
Apr 9, 2018, 8:32:27 AM4/9/18
to Vel Ats, CoreOS User
I cannot, but there are a couple places to look (from a Google search):

These two are doing similar things to what you have described, so far as I can tell.  The key maxim in the CoreOS Container Linux world is that everything runs in a container, and this will include X windows itself.  

Take special note of the X socket, since all local X clients will need access to it.  You will also have to navigate the xauth tokens or disable permission control on the X server.  You'll probably have to let X run in pure software compatibility VGA mode, but if you want to mess with getting graphics drivers and DRI, you _can_ use custom kernel module with Container Linux[1].




Vel Ats

unread,
Apr 9, 2018, 9:00:41 AM4/9/18
to CoreOS User
Thanks a LOT for your explanation. i hope i can get it running :)
Reply all
Reply to author
Forward
0 new messages