Previously, we published a post on How to install Ubuntu MATE on Raspberry PI 4. This post will give you a step-by-step guide on How to remove X server from ubuntu mate on raspberry pi. Before diving deeper, let’s first get a clear understanding of what is the X server.
What is X Server
The X server is a server program that manages one or more graphical displays. It connects X terminals running on the X Window system, and that can be on a local computer or in a distributed network. It is also responsible for managing one or more input devices such as a mouse and keyboard. The running X services (clients) communicate directly with the Xserver via a Client-Server architecture to display graphical interfaces and take input from the user.
The X Window system, which is used with the X server, mainly helps in managing application windows such as resizing, moving windows, other window elements such as title bars, close buttons, minimize and maximize buttons. In summary, the X server performs the following tasks:
- Input handling
- Window services
- Resource management
- Graphics
- Text and fonts
Is it Safe to Remove the Xserver?
If you do not need to use any digital monitor or an HDMI screen for your Raspberry PI, you might consider removing unnecessary packages to improve performance and save disk space. One package you can get rid of is the X server. On most Debian-based Linux distributions, most X clients don’t have any dependencies on the X server. Therefore, they can be installed and run independently without relying on the X server. Additionally, these X clients can be accessed and displayed remotely over SSH.
Removing Xserver From Ubuntu Mate on Raspberry Pi
To remove the X server, launch the Terminal and execute the command below:
sudo apt remove xserver-xorg
To uninstall X server along with its dependencies, use the command below:
sudo apt remove --auto-remove xserver-xorg
To remove the X server together with the configuration data, use the command below:
Note: Reinstalling the X server package does not restore purged config data.
sudo apt purge xserver-xorg
Conclusion
That’s it! I believe you have successfully removed X server from your system. If you come across any errors, please feel free to mention them in the comments below, and we will be willing to help.