Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I found that with wmctrl -F -r "SomeWin" -b add,fullscreen I can make a window fullscreen, now i want to run a cron so that it stays open, but also verifies that it's fullscreen.

Is there something that can tell me if it's fullscreen or not? or do i have to compare the window size with the screen size. If so, with wmctrl -G -l I get the window size, but I have nothing to compare it with, wmctrl -d says 0 * DG: 2880x1800 VP: 0,0 WA: 65,24 1375x876 N/A, the resolution is 1440x900, so none of those are it.

share|improve this question
up vote 4 down vote accepted

Something like

xprop -name TitleGoesHere _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN

should do it. Note that the window title used by xprop is the legacy ISO8859/1 title, so Unicode characters won't work; it may also need to be the full title and not just a substring. xprop itself can be used in interactive mode to get the right string; run

xprop WM_NAME

and wait for the cursor to change to a crosshair, then click on the window.

share|improve this answer
perfect, thanks :) – geermc4 Apr 10 '12 at 20:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.