Add “Show Desktop” shortcut to plank
I am using Plank on Ubuntu 14.04, I want to add "show desktop" shortcut to plank so that whenever I click it I get to see the desktop directly instead of minimizing all the windows. How can I do it?
plank
add a comment |
I am using Plank on Ubuntu 14.04, I want to add "show desktop" shortcut to plank so that whenever I click it I get to see the desktop directly instead of minimizing all the windows. How can I do it?
plank
add a comment |
I am using Plank on Ubuntu 14.04, I want to add "show desktop" shortcut to plank so that whenever I click it I get to see the desktop directly instead of minimizing all the windows. How can I do it?
plank
I am using Plank on Ubuntu 14.04, I want to add "show desktop" shortcut to plank so that whenever I click it I get to see the desktop directly instead of minimizing all the windows. How can I do it?
plank
plank
edited Apr 26 '15 at 6:01
Edward Torvalds
asked Mar 30 '15 at 13:14
Edward TorvaldsEdward Torvalds
5,13274079
5,13274079
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
First of all install the xdotool:
sudo apt-get install xdotool
Create a Desktop Shortcut for the 'Show Desktop' for simulate the press key WIN+D using xdotool:
sudo nano /usr/share/applications/show-desktop.desktop
The contents:
[Desktop Entry]
Type=Application
Exec=xdotool key --delay 100 super+d
Name=Show Desktop
Icon=desktop
Terminal=false
StartupNotify=false
Or skip the boring edit part from above and enter this:
echo -e "[Desktop Entry]nType=ApplicationnExec=xdotool key --delay 100 super+dnName=Show DesktopnIcon=desktopnTerminal=falsenStartupNotify=false" | sudo tee /usr/share/applications/show-desktop.desktop > /dev/null
Create a Dockitem file in Phank:
nano ~/.config/plank/dock1/launchers/show-desktop.dockitem
The contents:
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/show-desktop.desktop
Or skip the boring edit part from above and enter this:
/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'
Make It Permanent
Now create a entry for the command above in
gnome-session-properties
. Because if accidentally make a mistake and remove the "Show Desktop" dockitem (uncheck 'Keep In Dock'), so you need to re-create the dockitem file again every time. To solve this problem, we just force to recreate the dockitem file on every session startup:
echo -e "[Desktop Entry]nType=ApplicationnExec=/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]\nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'nHidden=falsenX-GNOME-Autostart-enabled=truenName=show-desktop-in-phank" | tee ~/.config/autostart/show-desktop-in-phank.desktop > /dev/null
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f603120%2fadd-show-desktop-shortcut-to-plank%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First of all install the xdotool:
sudo apt-get install xdotool
Create a Desktop Shortcut for the 'Show Desktop' for simulate the press key WIN+D using xdotool:
sudo nano /usr/share/applications/show-desktop.desktop
The contents:
[Desktop Entry]
Type=Application
Exec=xdotool key --delay 100 super+d
Name=Show Desktop
Icon=desktop
Terminal=false
StartupNotify=false
Or skip the boring edit part from above and enter this:
echo -e "[Desktop Entry]nType=ApplicationnExec=xdotool key --delay 100 super+dnName=Show DesktopnIcon=desktopnTerminal=falsenStartupNotify=false" | sudo tee /usr/share/applications/show-desktop.desktop > /dev/null
Create a Dockitem file in Phank:
nano ~/.config/plank/dock1/launchers/show-desktop.dockitem
The contents:
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/show-desktop.desktop
Or skip the boring edit part from above and enter this:
/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'
Make It Permanent
Now create a entry for the command above in
gnome-session-properties
. Because if accidentally make a mistake and remove the "Show Desktop" dockitem (uncheck 'Keep In Dock'), so you need to re-create the dockitem file again every time. To solve this problem, we just force to recreate the dockitem file on every session startup:
echo -e "[Desktop Entry]nType=ApplicationnExec=/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]\nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'nHidden=falsenX-GNOME-Autostart-enabled=truenName=show-desktop-in-phank" | tee ~/.config/autostart/show-desktop-in-phank.desktop > /dev/null
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
add a comment |
First of all install the xdotool:
sudo apt-get install xdotool
Create a Desktop Shortcut for the 'Show Desktop' for simulate the press key WIN+D using xdotool:
sudo nano /usr/share/applications/show-desktop.desktop
The contents:
[Desktop Entry]
Type=Application
Exec=xdotool key --delay 100 super+d
Name=Show Desktop
Icon=desktop
Terminal=false
StartupNotify=false
Or skip the boring edit part from above and enter this:
echo -e "[Desktop Entry]nType=ApplicationnExec=xdotool key --delay 100 super+dnName=Show DesktopnIcon=desktopnTerminal=falsenStartupNotify=false" | sudo tee /usr/share/applications/show-desktop.desktop > /dev/null
Create a Dockitem file in Phank:
nano ~/.config/plank/dock1/launchers/show-desktop.dockitem
The contents:
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/show-desktop.desktop
Or skip the boring edit part from above and enter this:
/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'
Make It Permanent
Now create a entry for the command above in
gnome-session-properties
. Because if accidentally make a mistake and remove the "Show Desktop" dockitem (uncheck 'Keep In Dock'), so you need to re-create the dockitem file again every time. To solve this problem, we just force to recreate the dockitem file on every session startup:
echo -e "[Desktop Entry]nType=ApplicationnExec=/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]\nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'nHidden=falsenX-GNOME-Autostart-enabled=truenName=show-desktop-in-phank" | tee ~/.config/autostart/show-desktop-in-phank.desktop > /dev/null
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
add a comment |
First of all install the xdotool:
sudo apt-get install xdotool
Create a Desktop Shortcut for the 'Show Desktop' for simulate the press key WIN+D using xdotool:
sudo nano /usr/share/applications/show-desktop.desktop
The contents:
[Desktop Entry]
Type=Application
Exec=xdotool key --delay 100 super+d
Name=Show Desktop
Icon=desktop
Terminal=false
StartupNotify=false
Or skip the boring edit part from above and enter this:
echo -e "[Desktop Entry]nType=ApplicationnExec=xdotool key --delay 100 super+dnName=Show DesktopnIcon=desktopnTerminal=falsenStartupNotify=false" | sudo tee /usr/share/applications/show-desktop.desktop > /dev/null
Create a Dockitem file in Phank:
nano ~/.config/plank/dock1/launchers/show-desktop.dockitem
The contents:
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/show-desktop.desktop
Or skip the boring edit part from above and enter this:
/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'
Make It Permanent
Now create a entry for the command above in
gnome-session-properties
. Because if accidentally make a mistake and remove the "Show Desktop" dockitem (uncheck 'Keep In Dock'), so you need to re-create the dockitem file again every time. To solve this problem, we just force to recreate the dockitem file on every session startup:
echo -e "[Desktop Entry]nType=ApplicationnExec=/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]\nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'nHidden=falsenX-GNOME-Autostart-enabled=truenName=show-desktop-in-phank" | tee ~/.config/autostart/show-desktop-in-phank.desktop > /dev/null
First of all install the xdotool:
sudo apt-get install xdotool
Create a Desktop Shortcut for the 'Show Desktop' for simulate the press key WIN+D using xdotool:
sudo nano /usr/share/applications/show-desktop.desktop
The contents:
[Desktop Entry]
Type=Application
Exec=xdotool key --delay 100 super+d
Name=Show Desktop
Icon=desktop
Terminal=false
StartupNotify=false
Or skip the boring edit part from above and enter this:
echo -e "[Desktop Entry]nType=ApplicationnExec=xdotool key --delay 100 super+dnName=Show DesktopnIcon=desktopnTerminal=falsenStartupNotify=false" | sudo tee /usr/share/applications/show-desktop.desktop > /dev/null
Create a Dockitem file in Phank:
nano ~/.config/plank/dock1/launchers/show-desktop.dockitem
The contents:
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/show-desktop.desktop
Or skip the boring edit part from above and enter this:
/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'
Make It Permanent
Now create a entry for the command above in
gnome-session-properties
. Because if accidentally make a mistake and remove the "Show Desktop" dockitem (uncheck 'Keep In Dock'), so you need to re-create the dockitem file again every time. To solve this problem, we just force to recreate the dockitem file on every session startup:
echo -e "[Desktop Entry]nType=ApplicationnExec=/bin/bash -c 'echo -e "[PlankItemsDockItemPreferences]\nLauncher=file:///usr/share/applications/show-desktop.desktop" | tee ~/.config/plank/dock1/launchers/show-desktop.dockitem'nHidden=falsenX-GNOME-Autostart-enabled=truenName=show-desktop-in-phank" | tee ~/.config/autostart/show-desktop-in-phank.desktop > /dev/null
edited Apr 28 '15 at 18:24
answered Apr 26 '15 at 4:22
Maxwel LeiteMaxwel Leite
1,56411225
1,56411225
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
add a comment |
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
there are some spelling mistakes and errors in your code please review it, also I did all still its not working :-/
– Edward Torvalds
Apr 26 '15 at 6:28
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
@edwardtorvalds, try this , I remake the whole procedure. Sorry my bad english, your help in this matter will be very appreciated!
– Maxwel Leite
Apr 27 '15 at 23:57
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
Hello, it doesn't behave correctly when I click on it. It either takes me to the unity dash or it hides all the windows. And when it hides all the windows, it doesn't let me unhide all the windows again. It is a bit bizarre.
– vikramreddym
Jun 8 '17 at 0:08
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f603120%2fadd-show-desktop-shortcut-to-plank%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown