Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

This question already has an answer here:

I work all-around in Ubuntu 14.04 with many programs opened, among them the terminal. It would be very useful to me a command to minimize and maximize windows.
I have searched in the web using various languages for my search, but I've found anything about a command like that.
It seems to me impossible that so basic commands do not exist yet.

share|improve this question

marked as duplicate by Serg, Jacob Vlijm, Pilot6, Eric Carvalho, souravc Feb 27 at 14:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
This has been asked and answered before. – Serg Feb 27 at 4:43
up vote 4 down vote accepted

you can do it.

Open your terminal and paste following command

sudo apt-get install xdotool

Then

execute below command in terminal

xdotool key <your_keyboard_hotkey>

To minimize all windows hotkey is Control-Super-D so

  xdotool key CTRL+Super+D

To minimize a window

 xdotool key Alt+Space+n

To maximize

  xdotool key Alt+Space+x

will minimize and one more thing is you can use alias and can give a name to call this command.

Hope it will works

share|improve this answer
    
This only covers showing the desktop, and does not cover the specifics of the question. – RolandiXor Feb 27 at 1:43
    
@RolandiXor my intention was to give some idea on achieving, I have give complete answer now. – Raja Feb 27 at 4:15
    
in future, just give the complete answer at once in a case like this. The original answer came across as though it wasn't really answering the question. – RolandiXor Feb 29 at 16:19
1  
Thanks @Raja for the answer. It worked. I have proven xdotools and wmctrl, as it was suggested in the previous question about this subject (I hadn't seen that one, sorry for this duplicate). Nevertheless those commands only work if you want to manage a single window from the terminal each time; they seem to not work if you want to send an order to many windows. For example, I have opened two windows of Cherrytree (its filenames end with .ctx or .ctb), and I send xdotool search --name ctx windowminimize and only one of two windows get the order. That's similar for wmctrl – SpirajnS Mar 1 at 0:42

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