Maximize Window Without Window Manager in X Server

windowwindow-managerx-server

If I want to run GUI software on my Linux machine, I can do it without a window manager, but I can not discover a way to maximize the window. Is there a reliable way to maximize a window in an x server without a window manager?

Best Answer

X servers don't have a notion of “maximized” window. To maximize a window, instruct the application to use a window size that matches the screen size. You can use xdotool for that, though it may be a little difficult to select the window without a window manager — many ways to enumerate and single out windows rely on a window manager.

dimensions=$(xdpyinfo | sed 's/^ *dimension * : *\([0-9]*x[0-9]*\).*/\1/p')
windowid=…
xdotool windowmove "$windowid" 0 0 windowsize "${dimensions%x*}" "${dimensions#*x}"
Related Question