Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to remove "Show Desktop" from the Alt+Tab application switcher?

share|improve this question
You are using Unity, correct? – WarriorIng64 Jul 24 '12 at 5:04
1  
Yes, sorry, should have specified. I went to the Unity settings in CompizConfig but didn't find any visible option for that. Just wondering if there is a hidden option or if it's just simply somewhere else. – David Dossot Jul 24 '12 at 6:13
1  
You are correct; I couldn't find it there, either. I'm not sure if there might be another way to go about it, however. – WarriorIng64 Jul 26 '12 at 13:36

4 Answers

up vote 13 down vote accepted
+50

It can be done!

I've uploaded a Unity build for 12.04 that fixes this (no Show Desktop in the Alt-Tab switcher).

  • To install, open a terminal and:
sudo apt-add-repository ppa:izx/askubuntu -y
sudo apt-get update
sudo apt-get install unity
  • You can enable the "Show Desktop Icon" setting in the Unity Plugin in Compiz (using ccsm) to get the icon on the Launcher on the left:

    enter image description here

  • If/when a new Unity update is released, Update Manager will download it automatically. I will try to "fix" the update and put it in the PPA as soon as possible; please add a comment to this answer to alert me if you upgrade and "Show Desktop" re-appears in the Switcher!

How did you do it?

I modified the Unity Source. It consists of two steps:

  1. Comment out line 900 in plugins/unityshell/src/LauncherController.cpp, which by default adds the "Show Desktop" icon to the switcher:
// results.push_back(pimpl->desktop_icon_);
  1. Change line 1638 in plugins/unityshell/src/unityshell.cpp from:

      if (!(results.size() == 1 && results[0]->GetIconType() == AbstractLauncherIcon::IconType::TYPE_DESKTOP))

    to

      if (!results.size() == 0))
    • While the list of Alt-Tab switcher icons was at least 1 before (the show-desktop icon), now it is 0 and we need to modify this to show the switcher only when there is at least one item in the list (i.e. at least one app running).
share|improve this answer
Cool, this looks awesome! I'll try this ASAP and come back to you. Basic question: should anything go wrong, how can I revert to the previous Unity? – David Dossot Aug 1 '12 at 23:53
@DavidDossot By explicitly installing the default version of Unity with sudo apt-get install unity=5.12-0ubuntu1.1 . Thanks, I will edit the answer later today with how to "uninstall" in general. – izx Aug 1 '12 at 23:56
@DavidDossot: Oh, don't forget to reboot! I should mention that... – izx Aug 1 '12 at 23:58
1  
@DavidDossot: thanks for the heads-up, a new build should be ready very soon! – izx Aug 13 '12 at 5:39
1  
The latest build seems to have fixed it. Great work! – Mike McKay Aug 15 '12 at 19:41
show 7 more comments

13.04

For 13.04, to enable or disable the "Show desktop" option in application switcher you can use unity-tweak-tool

Install unity-tweak-tool

pic

12.10

For 12.10, a new setting has been added to CCSM to enable or disable the "Show desktop" option in application switcher.

Run this command in a terminal to install CCSM:

sudo apt-get install compizconfig-settings-manager

Now open CCSM and go to Ubuntu Unity plugin.

Ubuntu Unity plugin

Switch to Switcher tab. Then tick the check box next to Disable Show Desktop in the switcher option.

Disable the show desktop

Tada! No more "Show desktop" in application switcher!.

share|improve this answer

One option could be to revert back to the behavior of Alt+Tab prior to 11.10.

I realize that this is a bit drastic, but it might be better than nothing.

share|improve this answer

So, I'm not sure if this is of any help to you, however while using Unity 2D, sick of not having graphics drivers I dived into gnome fall-back. Then unsatisfied, I left back to the Unity interface. I no longer have the displayed "Show Desktop" in the ALT+TAB application switcher. I believe this to be a side effect of the Gnome interface having it set in the lower left hand corner, and when I switched back, I no longer had it. Seemed to work for me... worth a shot.

share|improve this answer
1  
Thanks for sharing your experience. How risky is this approach? I can't afford putting the stability of my work environment in jeopardy. – David Dossot Jul 27 '12 at 20:22
For me, I had no issues with this otherwise, however I'm also not 100% sure that was it. If you have VM it might be nice to test this theory, I also edited the panels a lot, removing and adding items such as workspace switchers and the trash icon to replace the real feel of gnome that 10.10 had. I wouldn't think too risky, but worth a try. If you're really that worried you could back up everything, but it shouldn't do anything out of the ordinary. I also might have just gotten a lucky bug. I don't know, I'll test this myself as well. See what I can do for you. – Flabricorn Jul 27 '12 at 21:51

Your Answer

 
discard

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.