Gnome minimize all windows

Life plus Linux

All about Machine Learning, Linux, Android, Web and of course Life

Saturday, 29 December 2012

Minimizing all windows to show desktop in gnome 3.5.4

I Just upgraded to gnome 3.5.4 from gnome 3.4 on Ubuntu and now I feel that it is one of the most buggiest gnome versions ever 🙁
Gnome shell extensions are one of the best things ever for me especially when gnome came up with installing extension from their website. But unfortunately for Gnome 3.5.4 almost no extensions in their website support it :'( . And it is extremely hard to install gnome shell extensions from their source.
One of the most annoying thing is that «Hide all normal windows» feature doesn’t seem to work. And bug while changing brightness still not fixed.
So I have decided to manually fix each of the bugs myself for now.
Today I will show you how to enable «Show Desktop» or «Hide all normal windows»

Open Terminal and install xprop and xwit

sudo apt-get install xprop xwit

Download the Gist file which i have created or copy from below and save it as minimize.sh

Then give a name to the shortcut and in place of command give the link to the script which you just downloaded. Make sure that that file is executable. If not change it using file properties or use chmod.

Now assign some key for it preferably Super+D

If you don’t like doing all those there is a docklet called «Show Desktop» for Docky which still works pretty well if you don’t mind using your mouse 😛

How can I minimise all GNOME/Wayland windows from the command line?

Before switching to Wayland I would minimise all GNOME Shell windows with the following command:

. but both wmctrl and xdotool are X11-only applications. What CLI command can I use to minimise all windows in a GNOME Shell / Wayland session?

3 Answers 3

As in my other answer regarding wmctrl , we can use GJS through gdbus in Gnome to do this:

Читайте также:  Резервирование серверов windows server

TL;DR You can still do that

While xdotool uses X11 APIs and therefore will not work on Wayland, wmctrl interacts with the desktop environment itself. Therefore, while its commands requiring X11 APIs will not work, you can still use many wmctrl commands in a Wayland session, -k on included.

Tested on Arch Linux using GNOME Shell 3.30.2 and wmctrl 1.07.

I will describe a workaround that works for me on my playground Manjaro machine with GNOME3/Wayland. Keep in mind that the process may slightly differ on other distributions.

It is not as perfect as I imagined, but it works.

ydotool

In this method, I will use ydotool. From README.md:

ydotool works differently from xdotool. xdotool sends X events directly to X server, while ydotool uses the uinput framework of Linux kernel to emulate an input device.

  1. Install it accordingly to your distribution — AUR, Ubuntu, Debian, etc.
  2. You may need to properly set access rights for /dev/uinput and allow the user to access this device. In this case, add a user to the users group and create udev rules file:

Add yourself to users group:

Create /etc/udev/rules.d/80-uinput.rules file with following content:

You need to start /usr/bin/ydotoold socket listener. For testing purposes start in manually, but you probably want to autostart this on login.

GNOME 3 allows you to set a keyboard shortcut to «Hide all normal windows». Go to the gnome-control-center , Keyboard Shortcuts, Navigation, Hide all normal windows. Set this shortcut, for example, to Super + D .

Now, if everything works as expected, you should be able to minimise all GNOME/Wayland windows with the following command:

wtype

Another method could be to use wtype. It seems to use a different approach and provides keyboard events directly to the compositor. The problem is I was not able to make this work with GNOME’s default compositor mutter. It may be related to the limitations of XWayland but I’m not sure about this. All I get is the error:

Compositor does not support the virtual keyboard protocol

How do I add minimize / maximize buttons to GNOME shell windows?

Just installed Ubuntu 12.04, then I did

and windows have only a close button, how can I enable minimize / maximize? The old gconf-editor doesn’t seem to work cause it has the three buttons in the config.

15 Answers 15

You need gnome tweak tool.

Click the Download button to install with Ubuntu Software Center:

Читайте также:  Как включить virtualization based security windows 10

Or you can install in Terminal:

Then open Advanced Settings to change the minimize and maximize buttons.

Then navigate to:

and set value to:

Note that you might also perform this from console:

In current versions of Gnome, you may need to use this instead:

This is very simple guys, just type the following command in the terminal, it worked for me:

In Ubuntu 17.10 (and Debian 9 Stretch) with gnome 3.26.1 command is:

I had the same problem where my Ubuntu 12.04 windows only showed the close button. I realize that it is possible to right click on the menu bar to get the missing minimize and maximize functionality but I wanted the buttons back.

I was going to install Ubuntu Tweak but found the «Advanced Settings» application. I just went to the «Shell» tab and set «Arrangement of buttons on the titlebar» from «Close Only» to «All». This restored the missing buttons onto my windows.

I hope this alternate solution helps people with the same problem.

I found this page when I was looking for an answer to this question. Thought some people would appreciate this information.

Here is the terminal command for those that are two lazy to open a link. Just wanted to give credit to the original contributor of this information.

For Ubuntu 14.04+, you might need to run the following:

On 12.04 and 14.04, the answer given by @user161127 worked well for me (entering the following in the terminal)

However, on 16.04, I needed to use the path given by @JivanAmara instead:

Install ubuntu tweak.Open ubuntu tweak and go to Tweaks>Window and set «off» in Close button only . But I didn’t like this type of solution though I’m sharing this solution.

To maximise, you can instead double-click on the window frame with the left button. To minimise, single-click the middle button on the window frame.

As an alternative to the buttons, you can still minimize/maximize windows by right-clicking on their titlebar and selecting the appropriate entry from the menu.

Life plus Linux

All about Machine Learning, Linux, Android, Web and of course Life

Saturday, 29 December 2012

Minimizing all windows to show desktop in gnome 3.5.4

I Just upgraded to gnome 3.5.4 from gnome 3.4 on Ubuntu and now I feel that it is one of the most buggiest gnome versions ever 🙁
Gnome shell extensions are one of the best things ever for me especially when gnome came up with installing extension from their website. But unfortunately for Gnome 3.5.4 almost no extensions in their website support it :'( . And it is extremely hard to install gnome shell extensions from their source.
One of the most annoying thing is that «Hide all normal windows» feature doesn’t seem to work. And bug while changing brightness still not fixed.
So I have decided to manually fix each of the bugs myself for now.
Today I will show you how to enable «Show Desktop» or «Hide all normal windows»

Читайте также:  Mac os high sierra wifi

Open Terminal and install xprop and xwit

sudo apt-get install xprop xwit

Download the Gist file which i have created or copy from below and save it as minimize.sh

Then give a name to the shortcut and in place of command give the link to the script which you just downloaded. Make sure that that file is executable. If not change it using file properties or use chmod.

Now assign some key for it preferably Super+D

If you don’t like doing all those there is a docklet called «Show Desktop» for Docky which still works pretty well if you don’t mind using your mouse 😛

Gnome minimize all windows

Minimize to Tray

Minimize any app to tray

Make sure you have xdotool , xwininfo , xprop , libwnck3 installed on your system.

  • You can install it from link below https://extensions.gnome.org/extension/1750/minimize-to-tray/

From the extension settings, you can click add button and select any opened window to put them in to tray

There are three options for each application.

  • Change active status: You can disable the minimization for specific application
  • Minimize window on start: Whenever a new window opens for the application, it will automatically hide and minimize to tray
  • Keyboard shorcut support: This adds global keybindings to application window visibility. It currently supports , , and 0-9 , a-z keys. If there are are more than one window for specific application, it will focus to last used window.

This extension is written in Typescript and uses webpack to compile it into javascript.

Most dependencies have auto completion support thanks to this amazing project by @sammydre

To start development, you need nodejs installed on your system;

Clone the project

Install dependencies and build it

During development you can use yarn watch command to keep generated code up-to-date.

Оцените статью