There are two ways (that I know of) to unmap a application's window.

  1. From the application's settings (if the option exists)
  2. Using something like xdotool

Certain application windows need to be unmapped by default (panel for example). And they don't happen to conform to option 1.

Best I can do is to start the application, then immediately hide it with xdotool. Problem is that the window shows up for a very brief moment before going into hiding.

Is there a universal method you know to hide a window by default? It's just a matter of instructing Xorg to do that, but I don't know how.

1 Answer 1


Is there a universal method you know to hide a window by default?

The universal method is called "window manager" (WM). The way it works in X is that the application calls XMapWindow after it creates a window. (And that's the place where the application may check application settings and decide not to do that - which needs explicit code for that in the application.) But this call doesn't directly map the window, it can be intercepted by the WM, and then the WM can decide to move this window to a certain position before mapping, or to not map it, and show an icon instead, or to do something completely different.

In the same way, the WM intercepts unmap calls.

What xdotool does is basically pretend it is the application, and then execute the map or unmap command as the application would.

So no, it is not a matter of "instructing Xorg" - you cannot configure this in the X server.

However, if you have a window manager where you can configure that (possibly together with configuration if the application initially appears as an icon), then that's one way.

A second way is to write your own WM-like program (or modify an existing WM), then you can add all the configuration to process the intercepted calls in whatever manner you want.

  • Isn't all a WM does, send requests to Xorg? I thought that was why Xorg was a server and the WM is the "first client". I assume that's what you meant by writing a window manager - a program that sends requests to xorg. But thanks to you, I came to know that the map and unmap requests pass through the window manager first.
    – nomad
    Commented Jan 30, 2022 at 18:40
  • 1
    It might be worth mentioning some WMs that have that feature. I, for one, can only think of Icewm (see startMinimized).
    – Quasímodo
    Commented Jan 30, 2022 at 18:40
  • @Quasímodo, do you happen to know if openbox has that feature? Also, isn't the minimized mode only for normal windows? I'm trying to unmap a panel which is a dock window type and not a normal one.
    – nomad
    Commented Jan 30, 2022 at 18:45
  • 1
    Yes, all X clients (including the WM) send requests and receive events from the X server. That's "all" a client does. What exactly is the question?
    – dirkt
    Commented Jan 31, 2022 at 5:59

You must log in to answer this question.

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