https://bugs.kde.org/show_bug.cgi?id=525340

            Bug ID: 525340
           Summary: System Monitor truncates names of programs after 15
                    characters sometimes.
    Classification: Applications
           Product: plasma-systemmonitor
      Version First 6.7.4
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

DESCRIPTION
So on nixos there is a weird interaction that occurs between libksysguard's
implementation of handling program names and how nixos spawns certain
processes. I was able to narrow at least one solution down to a check in
readProcCmdline in the file libksysguard/processcore/processes_linux_p.cpp
around line 570 that would prevent the setting of the name from the command
line to a nontruncated name and so I removed the check. I did notice that after
applying this patch that there was a regression in the niceness of the names of
some of my brave browser threads but it seemed to fix the issue other than
that.

specifically if you change this:

QString nameFromCmdLine = process->command().mid(processNameStart, zeroIndex -
processNameStart);
if (nameFromCmdLine.startsWith(process->name())) {
  process->setName(nameFromCmdLine);
}

to this:

QString nameFromCmdLine = process->command().mid(processNameStart, zeroIndex -
processNameStart);
process->setName(nameFromCmdLine);

it seems to have the exact effect I mean, I don't know if this is the best way
to fix this issue but I just wanted to figure out some solution to it since it
has been bugging me for awhile.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to