Reset KDE System Monitor (KSysGuard)

3

2

Something went wrong while I was attempting to restore a backup, and KDE System Guard ceased to display properly.

This is the correct display (command running from root: kdesudo ksysguard): [Image of proper display of KSysGuard]

This is the incorrect display (command: ksysguard): [Image of improper display of KSysGuard]

Here in the incorrect display, the menu bar is missing, and the tab "Process Table" is unclickable.

I have already tried to remove the directory ~/.kde/share/apps/ksysguard/ but to no avail.

My question: How do I restore KSysGuard back to factory defaults/normal functionality?

Deltik

Posted 2012-06-21T03:09:59.740

Reputation: 16 807

Answers

3

you can open ~/.kde/share/config/ksysguardrc and set the MenuBar to 'Enabled': MenuBar=Enabled

if this variable is not present, the menu should be visible by default.

globot

Posted 2012-06-21T03:09:59.740

Reputation: 46

1

This is the correct answer for KDE 4. For KDE Plasma 5, see this answer instead.

– Deltik – 2015-07-06T05:45:45.523

2

globot's answer applies to KDE 4, and this question was written for KDE 4, but now that there is KDE Plasma 5, some paths have changed.

If you are having this issue on KDE Plasma 5, you should remove the line that begins with MenuBar= from this file: ~/.config/ksysguardrc

Here is a one-liner command that can restore KSysGuard's menu bar in KDE Plasma 5:

sed -i '/^MenuBar=/d' ~/.config/ksysguardrc

This is the command to run to restore KSysGuard's menu bar in KDE 4:

sed -i '/^MenuBar=/d' ~/.kde/share/config/ksysguardrc

Explanation

I retroactively determined that globot's answer was correct by finding a backup of the configuration file ~/.kde/share/config/ksysguardrc that I had made on 26 July 2012 at 19:14 CDT.

Here were the full contents of that file:

State=AAAA/wAAAAD9AAAAAAAAAyAAAAIyAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgAAAAAA/////wAAAAAAAAAA

[DownloadDialog Settings]
Height 1080=400
Width 1920=700

[MainWindow]
CommandList=
HostList=
MenuBar=Disabled
SelectedSheets[$e]=ProcessTable.sgrd,SystemLoad2.sgrd
SplitterSizeList=472,325
State=AAAA/wAAAAD9AAAAAAAAAyAAAAJEAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgAAAAAA/////wAAAAAAAAAA
ToolBarsMovable=Disabled
currentSheet=1
isMinimized=false

Exactly as expected, MenuBar was set to Disabled, which disabled the menu bar in KSysGuard in KDE 4.

~/.kde/share/config/ksysguardrc isn't used in KDE Plasma 5, so to find the new location of the configuration file, I used strace:

deltik@workstation [~]# sudo strace -vvvffts1000 ksysguard 2>&1 | grep ksysguardrc
[pid  5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc",  <unfinished ...>
[pid  5534] 23:32:27 lstat("/home/deltik/.config/ksysguardrc",  <unfinished ...>
[pid  5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:27 access("/home/deltik/.config/ksysguardrc", W_OK) = 0
[pid  5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:27 stat("/etc/xdg/ksysguardrc", 0x7fffe011c4a0) = -1 ENOENT (No such file or directory)
[pid  5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:27 open("/home/deltik/.config/ksysguardrc", O_RDONLY|O_CLOEXEC) = 9
[pid  5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:27 access("/home/deltik/.config/ksysguardrc", W_OK) = 0
[pid  5534] 23:32:30 open("/home/deltik/.config/ksysguardrc.lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0644) = 14
[pid  5534] 23:32:30 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:30 open("/home/deltik/.config/ksysguardrc", O_RDONLY|O_CLOEXEC) = 17
[pid  5534] 23:32:30 stat("/home/deltik/.config/ksysguardrc", {st_dev=makedev(252, 1), st_ino=1368016, st_mode=S_IFREG|0600, st_nlink=1, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=8, st_size=302, st_atime=2015/07/05-23:26:42, st_mtime=2015/07/05-23:26:22, st_ctime=2015/07/05-23:26:22}) = 0
[pid  5534] 23:32:30 open("/home/deltik/.config/ksysguardrc", O_WRONLY|O_TRUNC) = 17
[pid  5534] 23:32:30 unlink("/home/deltik/.config/ksysguardrc.lock") = 0
^C

The above output shows that ksysguard is trying to read configuration from the file ~/.config/ksysguardrc.

Deltik

Posted 2012-06-21T03:09:59.740

Reputation: 16 807

When started with Ctrl+Escape ksysguard is minimal no menu etc. but when started from menu it's full – intika – 2018-03-20T10:07:01.723

1@intika: [Ctrl]+[Escape] by default starts systemmonitor, not ksysguard. They are two different programs, titled "System Activity" and "System Monitor" respectively, which can be a little confusing. – Deltik – 2018-03-20T14:47:54.693

0

sudo apt-get remove --purge ksysguard to remove all installation files; then reinstall with sudo apt-get install ksysguard. For example dpkg -L ksysguard shows that there's config settings in /usr/share/kde4/config/ksysguard.knsrc too (for me on Kubuntu).

However this error looks a bit more weird to me - it may be that you've somehow managed to make a setting in the window manager that is affecting the display of the ksysguard window - perhaps altered the window type setting?

pbhj

Posted 2012-06-21T03:09:59.740

Reputation: 76