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
.
1
This is the correct answer for KDE 4. For KDE Plasma 5, see this answer instead.
– Deltik – 2015-07-06T05:45:45.523