7

I am running Xubuntu 14.04.2 and running the standard window manager with the default window buttons applet through xfce4-panel. I need to hide an application from the taskbar so that it only appears on the Alt-Tab menu and not on the panel.

Any idea as to how this can be done? I know this is possible as the calendar utility Orage has this option in built. It should be possible to tinker around and make this possible for any app.

  • I revisited Devil's Pie and Devilspie2, then figured out why hiding doesn't work as expected in Xfce. Rolled back and updated my answer as below. – clearkimura Apr 12 '16 at 8:59
3

Devil's Pie is supposedly the easiest way to get this done, but it doesn't work as expected in Xubuntu or Xfce to be specific. The same applies to Devilspie2.

Prerequisite

Ensure that 'skip' properties are not handled by the window manager. This is required in Xfce, but may be unnecessary in other desktop environments.

In Xfce, navigate to Settings Manager > Window Manager Tweaks > Cycling tab and look for this option Skip windows that have "skip pager" or "skip taskbar" properties set. Set the option as unchecked (checkbox is empty).

If the option remain as checked (checkbox is selected), the application will be hidden entirely all together, which will give a "false result" as explained in my original answer.

Using Devil's Pie

For example, to hide Xfce4 Dictionary application window from the taskbar.

  1. Open a text editor and type the following.

    (if (is (application_name) "xfce4-dict") (skip_tasklist))
    
  2. Save as $HOME/.devilspie/hide.ds (the filename can be anything, but must have .ds extension).

  3. Run devilspie in Terminal.

In step 1, an alternative is to use (window_name) with "Dictionary", which is the text that appears in titlebar. But some applications will change the text according to the content, so using (application_name) is preferred instead.

Using Devilspie2

The same example is adapted for using Devilspie2.

  1. Open a text editor and type the following.

    if (get_application_name()=="xfce4-dict") then
       set_skip_tasklist(true);
    end
    
  2. Save as $HOME/.config/devilspie2/skip.lua (the filename can be anything, but must have .lua extension).

  3. Run devilspie2 in Terminal.

Which to use

Use either one, whichever user prefers. Devil's Pie and Devilspie2 have similar features however, each scripting is different and incompatible to each other. Devilspie2 looks for LUA scripts and the rules of the original Devil's Pie are not supported.

Both are available in universe repository of any supported releases of Ubuntu, according to this Ubuntu Packages' search result.

Both have -d option for verbose output, which will print debug information. Devilspie2 has several more options i.e. to specify folder to look for scripts beyond $HOME/.config/devilspie2.

Both have been tested working in Xubuntu 14.04 (Xfce 4.10).

Development status

This GNOME Wiki noted that Devil's Pie isn't really maintained. The developer site noted version 0.22 was the last version updated in late 2007. This changelog on Launchpad noted that new maintainer is handling Devil's Pie from version 0.22-2.

5

A way to do it without Devil's Pie (2):

  • Do:

    xprop | grep "CLASS"

    and click on the window you want to remove from taskbar.

  • This will return something like WM_CLASS(STRING) = "name", "name"
  • Make a program startup script or run once, depending on your preference:

    wmctrl -x -r name.name -b add,skip_taskbar

Sources:

  • +1 because I have tested this works in Xubuntu 14.04 (Xfce 4.10). For Xfce, the option for 'skip' properties need to be unchecked similarly, otherwise the application will be hidden in Alt-Tab also. – clearkimura Jul 15 '16 at 19:16
  • The forum has mentioned the hiding setup will be lost when the window is quit, which I have confirmed. If this had a way to make the setup persistent for any registered windows, this may have been the easier solution than the Devil's Pie. – clearkimura Jul 15 '16 at 19:27
3

The fastest and easiest way to remove from taskbar a particular window is to use the special string :SELECT: in wmctrl:

wmctrl -r :SELECT: -b add,skip_taskbar

...now you will only have to click on the window that you want to hide.

If you need to return this window to the taskbar, use

wmctrl -r :SELECT: -b remove,skip_taskbar

Sourses:

  • Muehe answer is helped me
  • wmctrl -h
  • Hi Eneym! Placce a link of the answer and not of the poster (Muehe). – abu_bua Jul 4 '18 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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