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.
Что-то пошло не так, когда я пытался восстановить резервную копию, и KDE System Guard перестала правильно отображаться.
Это правильное отображение (команда запускается от root:) kdesudo ksysguard
:
Это неправильное отображение (команда:) ksysguard
:
Здесь при неправильном отображении строка меню отсутствует, а вкладка «Таблица процессов» неактивна .
Я уже пытался удалить каталог, ~/.kde/share/apps/ksysguard/
но безрезультатно.
Мой вопрос: как мне восстановить KSysGuard до заводских настроек по умолчанию / нормальной функциональности?
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.
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?
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
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", ) = 0 [pid 5534] 23:32:27 access("/home/deltik/.config/ksysguardrc", W_OK) = 0 [pid 5534] 23:32:27 stat("/home/deltik/.config/ksysguardrc", ) = 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", ) = 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", ) = 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", ) = 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", ) = 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
.