LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-28-2022, 09:49 PM   #1
SteveMann
Member
 
Registered: Apr 2020
Posts: 31

Rep: Reputation: Disabled
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.
 
Old 08-28-2022, 10:25 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,851
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by SteveMann View Post
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.
 
1 members found this post helpful.
Old 08-29-2022, 12:49 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
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:
 
1 members found this post helpful.
Old 08-29-2022, 01:01 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
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.
 
1 members found this post helpful.
Old 08-29-2022, 11:51 AM   #5
SteveMann
Member
 
Registered: Apr 2020
Posts: 31

Original Poster
Rep: Reputation: Disabled
I went with MrMazda's solution. All is good now.
Thanks to all who replied.
 
Old 08-29-2022, 12:47 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
In that case you might want to mark the thread as solved.
 
Old 08-29-2022, 06:02 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
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.
 
Old 08-29-2022, 09:56 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,736

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
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?
 
Old 08-30-2022, 11:12 AM   #9
SteveMann
Member
 
Registered: Apr 2020
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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.
 
Old 08-30-2022, 11:20 AM   #10
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by SteveMann View Post
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.
 
  


Reply

Tags
ubuntu server



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you think I should use a Qt GUI, a GTK GUI, or no GUI at all? anon02 Programming 5 08-25-2011 06:59 AM
Shouldn't "Slackware64" Become just "Slackware" and 32-bit Become "Slackware32"? foodown Slackware 6 06-23-2009 01:24 PM
program windows that safe session jut like linux desktop gui? hottdogg General 1 04-15-2008 04:04 AM
how slackware become gui? travis1205 Slackware 10 07-16-2007 10:57 AM
/var/logs = 11gigs!!! Safe to remove? breakerfall Linux - General 17 02-18-2004 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration