Bug 165374 - It's not possible to resize the "name" column
Summary: It's not possible to resize the "name" column
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Unclassified
Component: Process Controller - krunner part (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
: 185946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-30 01:25 UTC by Marcelo Sales
Modified: 2009-05-20 06:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot with truncated named (354.25 KB, application/octet-stream)
2008-09-29 16:08 UTC, aapgorilla
Details
Ksysguard window with truncated processes names (88.37 KB, image/png)
2008-09-29 19:33 UTC, Marcelo Sales
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Sales 2008-06-30 01:25:05 UTC
Version:            (using KDE 4.0.83)
Installed from:    Fedora RPMs
OS:                Linux

The column which shows the name of the process can not be resized. It should, as the others can.
Comment 1 John Tapsell 2008-06-30 10:28:32 UTC
This isn't really possible to fix.  If I make it resizeable then it
won't automatically resize.

Why do you need to resize it? :)  To make it smaller?  Do you have a
low screen resolution?

John Tapsell

2008/6/30 Marcelo Sales <mmtsales@gmail.com>:
[bugs.kde.org quoted mail]
Comment 2 Marcelo Sales 2008-07-06 19:56:25 UTC
When I took note of this "bug" to report it later, I was using KDE 4.0.3 and I'm under the impression that back then there were process names which names didn't fit in the column width and there were no way to resize it.
However, using KDE 4.0.83, I see that the column width is optimal. You're right, there's no need to resize it the way it is.
Sorry for the bogus report.
Comment 3 Marcelo Sales 2008-07-06 19:58:32 UTC
No need to resize the "name" column in ksysguard.
Comment 4 aapgorilla 2008-09-29 15:59:48 UTC
It doesn't work for my in mandriva 2009.0 either (not with 4.1.1 and now 4.1.2) on 2 different computers...
Comment 5 aapgorilla 2008-09-29 16:05:20 UTC
the names don't fit the column and some names can be extremely long eg: console-kit-dae?????? I don't know what it is called because ksysguard won't let me change the width
Comment 6 aapgorilla 2008-09-29 16:08:20 UTC
Created attachment 27606 [details]
screenshot with truncated named

see screenshot for examples of truncation.
Comment 7 Marcelo Sales 2008-09-29 19:31:02 UTC
You're right. I have just noticed that the same happens here. See snapshot.
Comment 8 Marcelo Sales 2008-09-29 19:33:03 UTC
Created attachment 27610 [details]
Ksysguard window with truncated processes names

See processes gnome-keyring-d... and kerneloops-appl..., which had their names truncated
Comment 9 aapgorilla 2008-09-29 19:41:52 UTC
btw: imho a resizable column is far more sensible than an autofit column, what would happen if an app with an extremely long name was run, there would be no way to resize the column....
Comment 10 jos poortvliet 2008-09-29 21:34:16 UTC
Dolphin has resizable columns which also automatically resize when you change the size of the window... We can have our cake and eat it too.

Sounds to me like that algorithm should have a place in KDElibs ;-)

I also remember Amarok doing this stuff in KDE 3.x, but you couldn't resize so far you got a scrollbar on the bottom, I believe, so that's sub-optimal.
Comment 11 John Tapsell 2008-09-29 23:29:41 UTC
Jos, something like that does sound ideal.

It is quite difficult to come up with a good algorithm for sizing the columns.

I don't know why it is truncating some items.  I do:

d->mUi->treeView->header()->setResizeMode(0, QHeaderView::ResizeToContents);
Comment 12 jos poortvliet 2008-09-30 08:11:54 UTC
Dolphin needs the name column to be as big as possible, so apparently (didn't look at the code) it makes it as big as the window supports, keeping the other columns a sane size. You need the name column just as big as it needs to be, so the command line can be as big as possible - ResizeToContents seems to be the best solution for the name column.

According to the Qt documentation, resizetocontents should do the trick. But apparently, it doesn't - seems like a bug to me. Looking in the bugtracker I did find some bugs which seem related, but I'm not sure - one seems relevant but is fixed in 4.3.1. FFI, what is your Qt version?
Comment 13 aapgorilla 2008-09-30 08:53:37 UTC
qt4-common-3:4.4.3-1mdv2009.0@i586 (ie. the version branded nokia)
Comment 14 aapgorilla 2009-01-14 21:56:38 UTC
still not working properly in 4.2rc1 :(
Comment 15 John Tapsell 2009-01-15 17:42:08 UTC
ffi, could you create a bug report against Qt for this?
Comment 16 aapgorilla 2009-01-15 18:00:07 UTC
I am sorry you mean report to trolltech/nokia?
Comment 17 John Tapsell 2009-01-16 02:31:52 UTC
(In reply to comment #16)
> I am sorry you mean report to trolltech/nokia?

Right

Comment 18 aapgorilla 2009-01-16 20:44:07 UTC
I have no idea what I should report to them, which function you are calling, what it should do etc. Btw I checked ubuntu intrepid and it is affected too, so ubuntu, mandriva and fedora are affected;

Couldn't you, I mean as a temporary solution make the name column resizable like the other columns, so at least we can see the full names of all processes running?
Comment 19 John Tapsell 2009-01-17 16:39:18 UTC
Okay I looked into this a bit more.

The 'problem' is actually in the kernel.  The kernel itself truncates the name to 15 characters long (plus 1 for the zero).

The program name that I show really is the program name as given by the kernel.

Top appears to do the same thing

What gnome-system-monitor and htop appear to do is to use the cmdline instead, stripping off any path name.
I could do something similar, although it means opening yet another file per process (/proc/somepid/cmdline ).
Comment 20 John Tapsell 2009-01-19 07:38:06 UTC
SVN commit 913326 by johnflux:

Since the process name is truncated by the kernel, we need to look at the cmdline to work 
out the full process name.  However sometimes the cmdline contains nothing helpful  (For 
some reason, for example, xorg's command line is just ":0").
So strip off any path on the cmdline, and check if the cmdline begins with the 
string of the process name.  If it does, assume that the cmdline contains the full 
processname, and use the stripped cmdline as the process name.

This does mean that the process name now contains the arguments.

BUG:165374



 M  +7 -0      processes_linux_p.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=913326
Comment 21 John Tapsell 2009-01-19 07:41:05 UTC
SVN commit 913327 by johnflux:

Allow the process name column to be resized, and add an option to show the command line 
arguments to the process name.

BUG:165374


 M  +15 -1     ProcessModel.cc  
 M  +4 -0      ProcessModel.h  
 M  +3 -0      ProcessModel_p.h  
 M  +14 -5     ksysguardprocesslist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=913327
Comment 22 John Tapsell 2009-03-02 11:59:08 UTC
*** Bug 185946 has been marked as a duplicate of this bug. ***
Comment 23 aapgorilla 2009-03-02 17:09:11 UTC
did this fix make it into 4.2x? because I am using 4.2.1 and still can´t resize
Comment 24 aapgorilla 2009-03-02 17:44:08 UTC
could you apply this fix to the 4.2x branch too, please?
Comment 25 John Tapsell 2009-03-02 17:54:55 UTC
Sorry, I have limited time, so I stick to fixing bugs only in the main tree.  I don't mind someone else back porting it though.
Comment 26 Raphael Kubo da Costa 2009-05-20 06:06:54 UTC
SVN commit 970335 by rkcosta:

Backport commit 913326 and the parts of 913327 that
do not do command-line processing (so that we don't
add new strings).

CCBUG: 165374
CCMAIL: johnflux@gmail.com


 M  +7 -0      processcore/processes_linux_p.cpp  
 M  +3 -5      processui/ksysguardprocesslist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=970335