LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Is it safe to remove GUI from desktop to become a server? (https://www.linuxquestions.org/questions/linux-server-73/is-it-safe-to-remove-gui-from-desktop-to-become-a-server-4175716176/)

SteveMann 08-28-2022 09:49 PM

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.

mrmazda 08-28-2022 10:25 PM

Quote:

Originally Posted by SteveMann (Post 6376809)
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. :D

syg00 08-29-2022 12:49 AM

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:

pan64 08-29-2022 01:01 AM

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.

SteveMann 08-29-2022 11:51 AM

I went with MrMazda's solution. All is good now.
Thanks to all who replied.

pan64 08-29-2022 12:47 PM

In that case you might want to mark the thread as solved.

sundialsvcs 08-29-2022 06:02 PM

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 ...)

scasey 08-29-2022 09:56 PM

Isn’t it as simple as configuring the server to boot to runlevel 3?
Code:

systemctl isolate multi-user.target
Or am I missing something?

SteveMann 08-30-2022 11:12 AM

Quote:

Originally Posted by pan64 (Post 6376958)
In that case you might want to mark the thread as solved.

How do I do that? I don't see a "solved" button anywhere.

boughtonp 08-30-2022 11:20 AM

Quote:

Originally Posted by SteveMann (Post 6377159)
How do I do that? I don't see a "solved" button anywhere.

As per the Site FAQ in the menu:
Quote:

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.


All times are GMT -5. The time now is 05:26 PM.