The Mate desktop is based on Gnome 2.X, which has been around for more than ten years. Since it’s based on such old technology, it’s very reliable and rarely runs into issues. However, “almost” isn’t a 100% success rate, and unfortunately, sometimes issues can come up and stop your workflow. When these problems arise, many Linux users don’t know what to do to fix it. Here’s how to fix a frozen Mate Linux desktop.
Refresh the Mate panel
Most of the time when a crash or freeze happens on the Mate desktop, the panel is at fault. Panel crashes, even among stable well-tested software like Mate can occur, due to numerous factors, such as running out of memory, third-party panel applets, and so on. The best way to fix this problem is to refresh the broken panel.
Refreshing a non-working Mate panel is a little tricker than refreshing modern desktop environments such as Gnome Shell. The reason? Mate is built on an older release of the Gnome desktop, which never had a built-in “refresh” feature. As a result, you’ll need to take things into your own hands using the terminal.
To access a terminal window on your Mate desktop, press Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. From here, run the pidof command on “mate-panel,’ the name of the process that handles the panel on Mate.
Running the pidof command will return a number output. This number output is the process ID for the panel program. From here, you’ll be able to kill the frozen/broken Mate panel with the kill command.
Alternatively, if killing the program with the kill command and pidof doesn’t work for you, try the killall command along with “mate-panel.”
Once you’ve “killed” the panel, Mate should automatically bring up a new, working panel instantaneously, and your problems should be solved. If the system doesn’t bring up a new panel, you can call it in manually with the command below.
Refresh the Mate window manager
Another reason the Mate desktop environment can lock up, freeze or crash is due to the Marco window manager. Usually, these crashes are due to the age of the window manager, or bugs, or various other factors.
Refreshing the Mate window manager (Marco,) much like the Mate Panel needs to be done in the command-line mainly because there isn’t a built-in refresh option for Marco in system settings.
Open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. From there, run the marco –replace command. Be sure to add in the & symbol to instruct the Bash shell to place this command in the background.
marco --replace &
As you run the above command in the terminal on your Mate PC, the Mate window manager should instantly refresh itself and send the running command into the background. Now, run the disown command to disconnect Marco from your running shell.
Once the disown command is run, any problems with the Mate window management system should be resolved!
Make a reset script
Refreshing the Mate desktop environment with the commands above is pretty useful, as it enables you to save yourself quickly. However, if you’re not a fan of remembering multiple commands to fix your Mate session, you’ll be happy to know that this can all be solved with a quick reset script.
The first step in creating a reset script is to make a new, blank file in your home directory (~). Using the touch command, make the blank “mate-reset” file.
With the new “mate-reset” file created, open it up in the Nano text editor for editing purposes.
nano -w mate-reset
Paste the first line of code at the top of the script. This code is known as a “shebang” and will let the Bash shell know what to do with the script file.
Following the first line of code, press the Enter key to make a new line. Then, add the second line of code which will reset the Mate panel.
After the panel reset command, press Enter to make yet another new line. Then, add in the final line of code for the script, which will reset the Mate window manager.
marco --replace &
Save the edits to the script in Nano by pressing Ctrl + O, and close it with Ctrl + X. From there, update the permissions and install “mate-reset” into the “/usr/bin/” directory.
sudo chmod +x mate-reset
sudo mv mate-reset /usr/bin/
Once the Mate reset script is in the “/usr/bin/” directory, you’ll be able to reset your Mate desktop by pressing Alt + F2, and entering the command below.