When running a GUI app in a Docker container I'm mapping the X11 socket to give the application access to the X server on the host like so:

docker run -v /tmp/.X11-unix:/tmp/.X11-unix my_image

The issue is that by default the WM adds the hostname of the client, which is in my case the container's ID, to the title bar: Example of a dockerised window

This ID adds no value to the user. Is there a way to get rid of the (effbff37ddd9) part?

We're using Openbox as the window manager.

1 Answer 1


By looking at the source code of Openbox I can conclude it isn't possible to hide the client name part because the logic is hardcoded in client.c:

if (strcmp(localhost, s) != 0)
    self->client_machine = s;

And then here:

if (self->client_machine) {
    visible = g_strdup_printf("%s (%s)", data, self->client_machine);
} ...


There is a workaround though. By providing the container with a sensible hostname one can make it at least less annoying and, possibly, more useful for the user:

docker run ... -h my-app ...

The result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .