How can I add “Show desktop” to the GNOME dash or Ubuntu Dock?
up vote
23
down vote
favorite
I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop
file?
(I know that I can use the Ctrl + Super + D keyboard shortcut to show the desktop and that I can install an extension to add a "Show desktop" button to the top bar, but I specifically want a button in the dash.)
gnome gnome-shell gnome-shell-extension ubuntu-dock show-desktop
add a comment |
up vote
23
down vote
favorite
I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop
file?
(I know that I can use the Ctrl + Super + D keyboard shortcut to show the desktop and that I can install an extension to add a "Show desktop" button to the top bar, but I specifically want a button in the dash.)
gnome gnome-shell gnome-shell-extension ubuntu-dock show-desktop
add a comment |
up vote
23
down vote
favorite
up vote
23
down vote
favorite
I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop
file?
(I know that I can use the Ctrl + Super + D keyboard shortcut to show the desktop and that I can install an extension to add a "Show desktop" button to the top bar, but I specifically want a button in the dash.)
gnome gnome-shell gnome-shell-extension ubuntu-dock show-desktop
I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop
file?
(I know that I can use the Ctrl + Super + D keyboard shortcut to show the desktop and that I can install an extension to add a "Show desktop" button to the top bar, but I specifically want a button in the dash.)
gnome gnome-shell gnome-shell-extension ubuntu-dock show-desktop
gnome gnome-shell gnome-shell-extension ubuntu-dock show-desktop
edited Sep 9 at 15:25
pomsky
27.4k1184111
27.4k1184111
asked Apr 11 '17 at 12:12
d3vid
7,3591970137
7,3591970137
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
28
down vote
I found a way to do that:
Open a terminal and install
wmctrl
:
sudo apt-get install wmctrl
Create a shell script named
show-desktop.sh
(I put it in my home folder)
gedit ~/show-desktop.sh
place this code in there:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
and make it executable:
chmod +x ~/show-desktop.sh
Create a file
show-desktop.desktop
in~/.local/share/applications/
folder:
gedit ~/.local/share/applications/show-desktop.desktop
Add this text and save (don't forget change the value on
<your user>
):
[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=user-desktop
Exec=/home/<your user>/show-desktop.sh
Open the dash, search for show desktop and add it to the favorites.
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
|
show 1 more comment
protected by Community♦ Jul 30 at 14:40
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
28
down vote
I found a way to do that:
Open a terminal and install
wmctrl
:
sudo apt-get install wmctrl
Create a shell script named
show-desktop.sh
(I put it in my home folder)
gedit ~/show-desktop.sh
place this code in there:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
and make it executable:
chmod +x ~/show-desktop.sh
Create a file
show-desktop.desktop
in~/.local/share/applications/
folder:
gedit ~/.local/share/applications/show-desktop.desktop
Add this text and save (don't forget change the value on
<your user>
):
[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=user-desktop
Exec=/home/<your user>/show-desktop.sh
Open the dash, search for show desktop and add it to the favorites.
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
|
show 1 more comment
up vote
28
down vote
I found a way to do that:
Open a terminal and install
wmctrl
:
sudo apt-get install wmctrl
Create a shell script named
show-desktop.sh
(I put it in my home folder)
gedit ~/show-desktop.sh
place this code in there:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
and make it executable:
chmod +x ~/show-desktop.sh
Create a file
show-desktop.desktop
in~/.local/share/applications/
folder:
gedit ~/.local/share/applications/show-desktop.desktop
Add this text and save (don't forget change the value on
<your user>
):
[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=user-desktop
Exec=/home/<your user>/show-desktop.sh
Open the dash, search for show desktop and add it to the favorites.
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
|
show 1 more comment
up vote
28
down vote
up vote
28
down vote
I found a way to do that:
Open a terminal and install
wmctrl
:
sudo apt-get install wmctrl
Create a shell script named
show-desktop.sh
(I put it in my home folder)
gedit ~/show-desktop.sh
place this code in there:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
and make it executable:
chmod +x ~/show-desktop.sh
Create a file
show-desktop.desktop
in~/.local/share/applications/
folder:
gedit ~/.local/share/applications/show-desktop.desktop
Add this text and save (don't forget change the value on
<your user>
):
[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=user-desktop
Exec=/home/<your user>/show-desktop.sh
Open the dash, search for show desktop and add it to the favorites.
I found a way to do that:
Open a terminal and install
wmctrl
:
sudo apt-get install wmctrl
Create a shell script named
show-desktop.sh
(I put it in my home folder)
gedit ~/show-desktop.sh
place this code in there:
#!/bin/bash
status="$(wmctrl -m | grep "showing the desktop" | sed -r 's/(.*)(ON|OFF)/2/g')"
if [ $status == "ON" ]; then
wmctrl -k off
else
wmctrl -k on
fi
and make it executable:
chmod +x ~/show-desktop.sh
Create a file
show-desktop.desktop
in~/.local/share/applications/
folder:
gedit ~/.local/share/applications/show-desktop.desktop
Add this text and save (don't forget change the value on
<your user>
):
[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=user-desktop
Exec=/home/<your user>/show-desktop.sh
Open the dash, search for show desktop and add it to the favorites.
edited Nov 20 at 20:10
answered Apr 16 '17 at 15:02
AndAC
63147
63147
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
|
show 1 more comment
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
6
6
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
Tested and working also on Ubuntu 18.04 LTS. This is the best way I've found to do it since they removed the 'Add show desktop icon to the launcher' option from System Settings / Appearance / Behaviour panel. It was such an useful feature. Sometimes I really do not understand Ubuntu developers...
– bytepan
Apr 29 at 9:30
4
4
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
In the file "show-desktop.desktop" (topic 3), I changed "Icon=show-desktop" to "Icon=desktop",because the previous one was not working.
– samuelcersosimo
May 20 at 3:56
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
This is not beginner friendly. How do I create a file in the applications folder? I can't just create it and save it there through the gui because it's protected. Thanks.
– Rabbit
Sep 1 at 12:06
2
2
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
@Rabbit you need to use root privileges. Open a terminal and type: sudo nano /use/share/applications/show-desktop.desktop
– AndAC
Sep 1 at 12:10
1
1
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
@Rabbit I understand. I do think this could be better explained. Maybe someone with a better English could edit my post to make it easier for beginners.
– AndAC
Sep 1 at 12:41
|
show 1 more comment
protected by Community♦ Jul 30 at 14:40
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?