[SOLVED] Is it safe to remove GUI from desktop to become a server?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it safe to remove GUI from desktop to become a server?
I have a mini-pc running Ubuntu 18 server and I added ubuntu desktop and lightdm to give it a GUI. In the process I updated it to Ubuntu Version 20.04.
I have decided that I don't want the GUI on this server.
Is this safe:
sudo apt autoremove ubuntu-desktop
sudo systemctl stop lightdm.service
sudo apt autoremove lightdm
Or is there a better way?
If I have to I will get another SSD and install a fresh instance of Ubuntu server then copy the data from the original SSD. But that's a LOT of work.
Is this safe:
sudo apt autoremove ubuntu-desktop
sudo systemctl stop lightdm.service
sudo apt autoremove lightdm
Yes.
Quote:
Or is there a better way?
sudo apt purge ubuntu-desktop lightdm is how I would proceed. sudo systemctl disable lightdm.service, then rebooting would mask any awareness that any GUI is on the system more simply than outright removal, and keep it available in case in the future you decide it would be useful to have available.
I would never have installed ubuntu-desktop in the first place.
For such a large component I'm willing to lay a side-bet that more things will be on the list generated for removal than you ever imagined. Leave it there and simply disable it as suggested. There is a big chance a later update will re-activate it tho' I'd reckon .... :shrug:
Yes, if you have enough disk space just disable it and do not start GUI any more. You might want to disable bluetooth, audio and other services too, but actually you don't need to remove anything.
From the other hand you may need to create a backup before removing gui. Also you might want to install ubuntu 22.04 server instead.
Actually, it's sometimes very handy to be able to start a GUI session from a remote computer ... which you certainly can do, since Linux windowing systems actually have a client/server architecture. (Normally, both client and server run on the same machine. But the graphic-server portion can run even on a machine that does not even have a graphics card, and a client can be anywhere else.) Therefore, I wouldn't bother to strip the GUI functionality from a computer that is now going to be treated as a server. You're really not going to gain anything by doing it, and server performance won't be impacted by it being there. It just won't be used.
This architecture is clean and efficient. Per contra, the GUI implementation (and thus, the "remote desktop") used by Microsoft is much more expensive and "clunky," relying on the transmission of bitmaps back and forth. (Yes, it works, but not graciously ...)
Last edited by sundialsvcs; 08-31-2022 at 10:20 AM.
How do I mark a thread as solved?
To mark a thread as solved, click "Mark this thread as solved" under the "Thread Tools" menu. Note that you can only mark threads you have started as solved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.