2

I run X on Ubuntu minimal using xinit. I now want to launch spotify in minimized mode as it's remotely controlled and I don't want it to be visible.

I also thought about installing a small window manager, but I have to be able to minimize the window through a script, because there is neither a keyboard nor a mouse available.

2 Answers 2

5

You can use xdotool with windowminimize. Assuming that it is the active window:

xdotool windowminimize "$(xdotool getactivewindow)"

If it isn't the active window, you can use xdotool search Spotify to get the window. If this doesn't work, you can use xprop to find the WM_CLASS of the Spotify window, and use that instead.

0
1

This can be done with:

xdotool windowunmap <window-id> 

Thanks to Chris Brown for pointing me towards using xdotool. Seems like minimizing a window is only possible if there is a window manager running. But unmapping works like a charm.

You must log in to answer this question.

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