DEV Community

Eloy Pérez
Eloy Pérez

Posted on • Edited on

Linux application stuck in fullscreen

From time to time a running application gets stuck in fullscreen mode. This has happened to me even in software that does not support fullscreen mode, like Spotify. Usually when that happens I used to kill the process and restart it, but there is a way of fixing it without being forced to restart the application.

We can use wmctrl for that.

wmctrl is a command that can be used to interact with an X Window manager that is compatible with the EWMH/NetWM specification. wmctrl can query the window manager for information, and it can request that certain window management actions be taken.

Important: wmctrl wont't work with Wayland applications.

First we need to list all applications with wmctrl -l to get the name of the one stuck.

$> wmctrl -l
0x00c00003  1 fedora Spotify
Enter fullscreen mode Exit fullscreen mode

Now we have to modify the fullscreen property of the application, for that we'll use wmctrl -b

$> wmctrl -r Spotify -b toggle,fullscreen
Enter fullscreen mode Exit fullscreen mode

We've used -r to specify the application we are going to modify and -b to tell wmctrl the action (toggle) and the property (fullscreen) to be modified.

With that the application should be back to windowed mode.

Top comments (0)