Howto Restart Gnome Panel
It doesn't happen a lot but it does sometimes when the Gnome Panel freeze. If you are a former windows user you might be used to restart the computer when something in you desktop stuck. This is not the way with Linux. We can fix the problem by restarting the desktop session (restarting the X server) pressing the Ctrl+Alt+BackSpace but this will destroy everything we worked on so far. A more elegant way will be to restart only the Gnome Panel.
Getting access to the Linux command line shell
In order to restart the Gnome Panel we will need to execute the Linux kill command. Once the Gnome Panel process is killed Gnome will restart it automatically so the only thing left for us is to kill the Gnome Panel process. In order to execute the Linux kill command we will need to get access to the Linux shell. This can be done by one of the following:
- Pressing Alt+F2
- Using an opened console window using the Alt+Tab buttons to navigate to it.
- Using a console session by pressing Ctrl+Alt+F1
Killing the Gnome Panel
In each of these options we will need to execute the Linux kill command in order to kill the Gnome Panel process. There are two ways to use the kill command:
- Using the application name will kill all the applications with the same name
- Using the process id (pid) will kill only the process with the specified id.
Getting the Gnome Panel Process Id
First we will need to find the process id of the Gnome Panel. We can do it by listing the running processes on the system and filtering the ones with the word panel.
$ ps -ef | grep panel
shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel
shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel
We can see that there are two processes which were started by the user shimik, the first one is the gnome-panel process with the 19301 process id and the second is the grep command which we used to filter out the processes.
Restarting the Gnome Panel using the kill command
Now that we know the process id of the Gnome Panel we can kill it by using the following command
$ kill -9 19301
Restarting the Gnome Panel using the killall command
In order to use the killall command, we need to know the Gnome Panel process name. Looking back at the process list
$ ps -ef | grep gnome-panel
shimik 19301 6584 0 09:13 ? 00:00:04 gnome-panel
shimik 20367 19254 0 09:35 pts/7 00:00:00 grep panel
We can see that the Gnome Panel process name is gnome-panel.
Now we can use the killall command to kill the Gnome Panel process.
$ killall gnome-panel
After killing the gnome panel process gnome will restart the panels and we can continue our work without loosing the things we have done so far.
Although this explanation is about Gnome Panel restart in fact it describes the ways to restart, any Linux process so you can use it whenever you need to close/terminate a process.
Subscribe to:
Post Comments (Atom)
November 8, 2008 at 10:48 AM
the process for gnome-panel is 19301. The text is wrong.
November 8, 2008 at 12:00 PM
@teto
Thanks, I corrected it.
May 25, 2010 at 3:48 PM
The process id will be different for everyone.
June 28, 2010 at 6:30 PM
The process number for each process varies from computer to computer. So, people will have to kill whatever process number their gnome-panel is.
February 9, 2011 at 5:36 PM
Don't use the -9 switch, that will kill using SIGKILL which doesn't allow the process to clean up after itself. Simply use kill or killall without any arguments but the PID or name of the process.
March 28, 2011 at 1:55 AM
Hi,
I'm using FC 14 with 3 panels (top, bottom, left). The one on the left was marked to auto hide and never showed up again.
The problem was solved by restarting gnome-panels process.
Thanks a lot!
May 11, 2012 at 7:44 PM
You can do this a a normal user from a gnome-terminal using the following command:
pkill gnome-panel
The auto restart of the process causes it to recover.
Post a Comment