Software & AppsOperating SystemLinux

How To Restart Your Window Manager on Ubuntu

Ubuntu 12

Ubuntu, a popular Linux distribution, offers a robust and customizable user interface through its window manager. However, there may be times when you need to restart the window manager due to system glitches or after making changes to its configuration. This article will guide you through the process of restarting your window manager on Ubuntu.

Understanding the Window Manager

The window manager is a system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. It’s an essential part of your Ubuntu system that ensures smooth operation of your desktop environment.

Restarting the Display Manager

The display manager is the first interface you see when you boot your Ubuntu system. It manages user sessions and the graphical display of your system. Depending on your Ubuntu version, the display manager might be GDM, LightDM, or SDDM.

For Ubuntu 11.04 and earlier:

Use the command sudo service gdm restart. Here, sudo is a command that allows you to run programs with the security privileges of another user (by default, as the superuser). service is a command used to run a System V init script, and gdm is the GNOME Display Manager.

sudo service gdm restart

For Ubuntu 11.10 and newer:

Use the command sudo service lightdm restart. lightdm is the Light Display Manager.

sudo service lightdm restart

For Ubuntu 15.04 and newer:

Use the command sudo service sddm restart. sddm is the Simple Desktop Display Manager.

sudo service sddm restart

Restarting Unity or Compiz

Unity is the default desktop environment for Ubuntu, while Compiz is the window manager used by Unity.

Restart Unity:

You can restart Unity by running nohup setsid unity or nohup unity --restart on the command line. nohup is a command to run a command immune to hangups, setsid creates a new session and sets the process group ID, and unity is the Unity shell interface.

nohup setsid unity

or

nohup unity --restart

Restart Compiz:

If restarting Unity doesn’t work, restart Compiz with nohup compiz --replace. compiz is the Compiz window manager, and --replace is a parameter to replace the current window manager.

nohup compiz --replace

Restarting X

If everything is frozen, you can kill X, which is the base layer of your graphical environment.

Press Ctrl+PrtScr+K to kill X. Be aware that this will close all your running applications, so save your work before attempting this solution.

Restarting the Window Manager Specific to Your Desktop Environment

Different desktop environments use different window managers. For instance, KDE uses KWin.

For KDE:

Use the command kwin --replace &. kwin is the KWin window manager, and --replace is a parameter to replace the current window manager.

kwin --replace &

Conclusion

Restarting your window manager can help resolve many issues related to your Ubuntu desktop environment. Always remember to save your work before restarting the window manager or display manager, as these actions will close all running applications.

For more information and troubleshooting, you can refer to the LightDM wiki article or the Ubuntu forum thread.

What is a window manager?

A window manager is a system software that controls the placement and appearance of windows within a windowing system in a graphical user interface.

Why would I need to restart my window manager on Ubuntu?

You may need to restart your window manager on Ubuntu if you encounter system glitches or after making changes to its configuration.

How do I restart the display manager on Ubuntu?

The command to restart the display manager depends on your Ubuntu version. For Ubuntu 11.04 and earlier, use sudo service gdm restart. For Ubuntu 11.10 and newer, use sudo service lightdm restart. For Ubuntu 15.04 and newer, use sudo service sddm restart.

How do I restart Unity on Ubuntu?

You can restart Unity by running nohup setsid unity or nohup unity --restart on the command line.

How do I restart Compiz on Ubuntu?

If restarting Unity doesn’t work, you can restart Compiz with nohup compiz --replace.

How do I restart X on Ubuntu?

If everything is frozen, you can kill X by pressing Ctrl+PrtScr+K. Please note that this will close all running applications, so make sure to save your work before attempting this solution.

How do I restart the window manager specific to my desktop environment?

Different desktop environments use different window managers. For KDE, you can use the command kwin --replace & to restart the KWin window manager.

Leave a Comment

Your email address will not be published. Required fields are marked *