DEV Community

Eloy Pérez
Eloy Pérez

Posted on • Edited on

2

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay