Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I have a .xsession script. I am opening a gnome-terminal in background. I would like to open it maximised. I use Cinnamon as window manager. I do understand usually window manager is responsible for resizing client X applications when maximise button is clicked.

I want to know whether there is any way to achieve this.

~$ cat .xsession
google-chrome > /dev/null 2>&1 &
gnome-terminal &
gnome-session --session cinnamon 
share|improve this question
up vote 3 down vote accepted

The simplest way is to do

gnome-terminal --maximize

For some more powerful options, try DevilsPie.

share|improve this answer
--maximize was not documented in man pages of gnome-terminal. can you explain how this is option processed? Is it based on some screen information from X server? – rag Mar 5 '13 at 22:29
It's listed under gnome-terminal --help-all. – Mikel Mar 5 '13 at 23:17

In this particular case, if there is such an option, obviously, use it.

For other cases, I have found that the below code works.

The loop is there because if it weren't, the fullscreen command would fire off to soon, before there were such a window to put in fullscreen!

wmctrl -l is to list windows; wc -l is to count lines; wmctrl -r is to specify what window to operate on, and, with -b, you tell what to actually do to that window.

my-application &
while (( ! `wmctrl -l | my-application | wc -l` )) {}
wmctrl -r my-application -b toggle,fullscreen
share|improve this answer
this requires wmctrl -r Terminal -b toggle,maximized_vert,maximized_horz. fullscreen causes to lose the title bar of the window. – rag Mar 11 '13 at 8:48
@rag: Right, fullscreen is fullscreen. – Emanuel Berg Mar 12 '13 at 2:05

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.