Bug 340498 - task manager grouping by program does not work
Summary: task manager grouping by program does not work
Status: RESOLVED WORKSFORME
Alias: None
Product: plasma4
Classification: Unmaintained
Component: widget-taskbar (show other bugs)
Version: 4.11.11
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-30 13:05 UTC by Jason Vas Dias
Modified: 2014-11-03 12:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
desktop file for xterm-for-top (539 bytes, application/x-desktop)
2014-10-30 13:43 UTC, Jason Vas Dias
Details
desktop file for other xterm instances (522 bytes, application/x-desktop)
2014-10-30 13:47 UTC, Jason Vas Dias
Details
Example of xterm '-class' workaround. (170.77 KB, image/png)
2014-11-02 18:16 UTC, Alex Lowe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Vas Dias 2014-10-30 13:05:26 UTC
I've been trying everything I can think of to get a particular instance of '/usr/bin/xterm' NOT to 
group with other instances.  It would be a great productivity aid for me to be able to click on
a particular xterm instance in the task bar without having to search through the list of running
xterms, which can be quite large (> 20 items)  for my typical usage.  I have tried :
 1. Creating a modified xterm.desktop in ~/.local/share/applications ,  NOT called xterm desktop,
     and ensuring it uses a copy of the xterm icon NOT called 'debian-xterm-3' . 
     Tasks created by installing and clicking on this task bar icon still group with xterm.
 2. Creating a copy of the xterm program called  ${my_special_name}-xterm , and
     changing  the modified desktop file to run it instead - still no luck - instances are 
     still grouped along with other xterm instances.
Since in Task Manager settings,  I have 'By Program Name' selected ( the only option )
with Sorting being 'Manually',  and  instances of /usr/bin/${my_special_name}-xterm are being
grouped with instances of 'xterm' , I can only conclude that Task Manager 4.11.11 is failing 
in its attempt to group task manager icons by program name .
Please could someone who knows tell me how Plasma group 'By Program Name' works and
how to get two differenctly named copies of xterm to group differently . Thanks!

Reproducible: Always

Steps to Reproduce:
1. Copy /usr/bin/xterm to /usr/bin/${some_other_name}-xterm
2. Run /usr/bin/${some_other_name}-xterm
3. Instances of /usr/bin/${some_other_name} group in the taskbar with instances of xterm .

Plasma task manager fails to group task manager icons by program name.

Actual Results:  
Instances of /usr/bin/${some_other_name} group in the taskbar with instances of xterm .

Expected Results:  
Instances of /usr/bin/${some_other_name} should have their own group , 
because I have selected 'group by program name' and the programs have different names.
Comment 1 Jason Vas Dias 2014-10-30 13:43:43 UTC
Created attachment 89379 [details]
desktop file for xterm-for-top

Here's an example, trying to create an icon for xterm running the 'top' program that does NOT
group with other instances of xterm . 
I copied the xterm desktop file to 'top.desktop', and copied /usr/bin/xterm to /usr/bin/xterm-for-top 
, and ps shows programs created by clicking on this icon they under totally distinct names:
jvasdias  3658  2968  0 12:07 ?        00:00:00 /usr/bin/xterm -fa Andale Mono -fs 10 -fg white -bg black
jvasdias  8752  2968  0 13:19 ?        00:00:00 /bin/sh -c xterm-for-top -fa 'Andale Mono' -fs 6 -fg white -bg black -T TOP@jvasdias -n TOP@jvasdias -e top </dev/null >/dev/null 2>&1 
Yet they are still put into the same task manager group. 
How can I get instances of /usr/bin/xterm-for-top to be put into a different task manager group?


Still, the icon groups with other xterm icons.1
Comment 2 Jason Vas Dias 2014-10-30 13:47:59 UTC
Created attachment 89380 [details]
desktop file for other xterm instances

The is the desktop file used for all other xterm instances, which runs /usr/bin/xterm .
These are grouped in the same group, which is OK, but I want instances created by
clicking on top.desktop which run /usr/bin/xterm-for-top to go into a different group. 
Is this possible ?
Comment 3 Alex Lowe 2014-11-02 18:16:39 UTC
Created attachment 89403 [details]
Example of xterm '-class' workaround.
Comment 4 Alex Lowe 2014-11-02 18:26:22 UTC
FWIW, xterm specifically has a workaround (see https://bugsfiles.kde.org/attachment.cgi?id=89403)

You can set specific groupings by changing the primary WM_CLASS string. By default, xterm sets this to 'XTerm', but using the -class option, you can set that to an arbitrary string. The example I used in the attachment is to set one window (the only ungrouped one) to have the class 'yterm' instead, which makes the task manager (both in 5.1.0 and 4.11.11) recognise it as a different application, therefore not grouping.
Comment 5 Eike Hein 2014-11-03 12:17:10 UTC
So ... there's no bug here then, in the end? :) The program grouping strategy groups windows on the WM_CLASS' general class string, i.e. two windows advertising themselves to be XTerm end up binned together. This seems expected behavior.

I mean, you're saying "program grouping doesn't work because I have trouble getting it not to group two windows of the same app", which seems a bit strange to me :).