Gnome面板不可见

有时,当我登录到我的PC时,我的部分或全部Gnome面板都无法显示,所以我留下了一个空白屏幕,无法注销/关闭或运行任何程序。 为什么没有面板出现? 我怎样才能让他们回来? 我有时可以创建一个新面板并添加一个新的启动器来重启,但这是一个冗长的解决方案。 我正在使用10.04 LTS版本。

好吧,我有重置gnome面板的脚本。 我不确定这个脚本是否适用于笔记本版本,我在桌面版中使用它,它非常有用。

将此脚本保存到PanelRestore.sh到桌面,例如chmod +x PanelRestore.sh ,然后通过终端./PanelRestore.sh运行它,弹出一个新窗口,只需单击恢复默认设置,你就可以去了

 #!/bin/sh # # GNOME Panel Save / Restore # Writen by PhrankDaChicken # # http://ubuntu.online02.com # # # Updated to add restore defaults by jimjimovich # http://www.starryhope.com # # DIR=$(pwd) TITLE="PanelRestore" Main () { CHOICE=$(zenity --list --title "$TITLE" --hide-column 1 --text "What do you want to do?" --column "" --column "" \ "0" "Save Panel Settings" \ "1" "Restore Panel Settings" \ "2" "Restore Default Panel Settings") if [ $CHOICE = 0 ]; then Panel_Save fi if [ $CHOICE = 1 ]; then Panel_Restore fi if [ $CHOICE = 2 ]; then Panel_Defaults fi } Panel_Restore () { FILE=$(zenity --title "$TITLE: Open File" --file-selection --file-filter "*.xml" ) if [ -n "$FILE" ]; then gconftool-2 --load "$FILE" killall gnome-panel fi Main } Panel_Save () { FILE=$(zenity --title "$TITLE: Save File" --file-selection --save --confirm-overwrite --filename "Gnome_Panel.xml" --file-filter "*.xml" ) if [ -n "$FILE" ]; then EXT=$(echo "$FILE" | grep "xml") if [ "$EXT" = "" ]; then FILE="$FILE.xml" fi gconftool-2 --dump /apps/panel > $FILE zenity --info --title "$TITLE: File Saved" --text "File saved as: \n $FILE" fi Main } Panel_Defaults () { zenity --question --text="Are you sure you want to restore the default top and bottom panels?" gconftool-2 --recursive-unset /apps/panel rm -rf ~/.gconf/apps/panel pkill gnome-panel exit } Main # END OF Script 

尝试运行此命令

GNOME面板

检查您的面板是否已恢复。

  1. 按ALT + F2并在运行对话框中键入gnome-terminal

在终端中输入

gconftool-2 — – shutdown (短划线之间没有空格,短划线和单词’shutdown’之间没有空格)

  1. rm -rf ~/.gconf/apps/panel

  2. pkill gnome-panel

您可以通过键入来重新启动面板

 killall gnome-panel