Trying to remove GNOME from CentOS 7

I have a CentOS 7 VM running using VirtualBox 6.4.

After doing an usual installation for a "usual" user (Internet/Office/Sound and Video/etc applications) I tried to modify it by disabling gdm/installing enabling lightdm, installing Cinnamon.

Openbox is the faster loading after providing user/pass but... I don't want to spend time trying to configure it,  also skipped MATE 'cause already using it on another VM.

I'm trying Cinnamon and until now looks great but I don't want to keep the "Gnome Desktop" and all the packages related and after searching options how to remove it completely without breaking anything else I couldn't.

I found options like: yum groupremove "GNOME Desktop"

And got this message: 
"No group named GNOME Desktop exists
Maybe run: yum groups mark remove (see man yum)
No packages to remove from groups"

I found a link providing an option, to add this line to /etc/yum.conf: group_command=simple
just after the last line of the "main" section.

When I tried to remove the group again, apparently worked until it tried to remove yum and another package, can't remember which one exactly and failed. I restarted the VM just to confirm that everything was working as expected (previously I created a snapshot of the VM ).

Another link came up providing an alternative, to remove specific packages that won't affect anything but also won't remove packages that probably I'm not going to use and are going to be part of upgrades:

yum remove gnome-classic-session gnome-session-xsession

This is going to remove Gnome/Gnome classic from the options to log in, not exactly what I want but still a good alternative (and I added an option to yum by installing the plugin (yum-plugin-remove-with-leaves):

# yum remove gnome-classic-session gnome-session-xsession --remove-leaves
Loaded plugins: fastestmirror, langpacks, remove-with-leaves
Resolving Dependencies
--> Running transaction check
---> Package gnome-classic-session.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-session-xsession.x86_64 0:3.28.1-6.el7 will be erased
--> Finished Dependency Resolution
removing gnome-shell-extension-alternate-tab-3.28.1-5.el7.noarch. It is not required by anything else.
removing gnome-shell-extension-apps-menu-3.28.1-5.el7.noarch. It is not required by anything else.
removing gnome-shell-extension-launch-new-instance-3.28.1-5.el7.noarch. It is not required by anything else.
removing gnome-shell-extension-places-menu-3.28.1-5.el7.noarch. It is not required by anything else.
removing gnome-shell-extension-top-icons-3.28.1-5.el7.noarch. It is not required by anything else.
removing gnome-shell-extension-window-list-3.28.1-5.el7.noarch. It is not required by anything else.
--> Running transaction check
---> Package gnome-shell-extension-alternate-tab.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-shell-extension-apps-menu.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-shell-extension-launch-new-instance.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-shell-extension-places-menu.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-shell-extension-top-icons.noarch 0:3.28.1-5.el7 will be erased
---> Package gnome-shell-extension-window-list.noarch 0:3.28.1-5.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                                            Arch            Version                  Repository         Size
=====================================================================================================================
Removing:
 gnome-classic-session                              noarch          3.28.1-5.el7             @base             201 k
 gnome-session-xsession                             x86_64          3.28.1-6.el7             @updates          7.4 k
 gnome-shell-extension-alternate-tab                noarch          3.28.1-5.el7             @base             9.4 k
 gnome-shell-extension-apps-menu                    noarch          3.28.1-5.el7             @base              31 k
 gnome-shell-extension-launch-new-instance          noarch          3.28.1-5.el7             @base             4.9 k
 gnome-shell-extension-places-menu                  noarch          3.28.1-5.el7             @base              26 k
 gnome-shell-extension-top-icons                    noarch          3.28.1-5.el7             @base              11 k
 gnome-shell-extension-window-list                  noarch          3.28.1-5.el7             @base              55 k

Transaction Summary
=====================================================================================================================
Remove  8 Packages

Installed size: 346 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : gnome-classic-session-3.28.1-5.el7.noarch                                                         1/8 
  Erasing    : gnome-shell-extension-alternate-tab-3.28.1-5.el7.noarch                                           2/8 
  Erasing    : gnome-shell-extension-apps-menu-3.28.1-5.el7.noarch                                               3/8 
  Erasing    : gnome-shell-extension-launch-new-instance-3.28.1-5.el7.noarch                                     4/8 
  Erasing    : gnome-shell-extension-places-menu-3.28.1-5.el7.noarch                                             5/8 
  Erasing    : gnome-shell-extension-top-icons-3.28.1-5.el7.noarch                                               6/8 
  Erasing    : gnome-shell-extension-window-list-3.28.1-5.el7.noarch                                             7/8 
  Erasing    : gnome-session-xsession-3.28.1-6.el7.x86_64                                                        8/8 
  Verifying  : gnome-shell-extension-window-list-3.28.1-5.el7.noarch                                             1/8 
  Verifying  : gnome-shell-extension-alternate-tab-3.28.1-5.el7.noarch                                           2/8 
  Verifying  : gnome-shell-extension-launch-new-instance-3.28.1-5.el7.noarch                                     3/8 
  Verifying  : gnome-shell-extension-places-menu-3.28.1-5.el7.noarch                                             4/8 
  Verifying  : gnome-shell-extension-top-icons-3.28.1-5.el7.noarch                                               5/8 
  Verifying  : gnome-session-xsession-3.28.1-6.el7.x86_64                                                        6/8 
  Verifying  : gnome-classic-session-3.28.1-5.el7.noarch                                                         7/8 
  Verifying  : gnome-shell-extension-apps-menu-3.28.1-5.el7.noarch                                               8/8 

Removed:
  gnome-classic-session.noarch 0:3.28.1-5.el7                                                                        
  gnome-session-xsession.x86_64 0:3.28.1-6.el7                                                                       
  gnome-shell-extension-alternate-tab.noarch 0:3.28.1-5.el7                                                          
  gnome-shell-extension-apps-menu.noarch 0:3.28.1-5.el7                                                              
  gnome-shell-extension-launch-new-instance.noarch 0:3.28.1-5.el7                                                    
  gnome-shell-extension-places-menu.noarch 0:3.28.1-5.el7                                                            
  gnome-shell-extension-top-icons.noarch 0:3.28.1-5.el7                                                              
  gnome-shell-extension-window-list.noarch 0:3.28.1-5.el7                                                            

Complete!


Before all this mess with the VM, I tried doing a minimal installation of CentOS using an old laptop:

1.- Minimal installation of CentOS
2.- yum install epel-release
3.- yum groupinstall "X Window System"
4.- yum install lightdm ; systemctl disable gdm.service ; systemctl enable lightdm.service
5.- yum install cinnamon
6.- yum install firefox
7.- yum install gnome-terminal ; yum install xterm

Reboot, log in and it's good for that old laptop but not enough yet, when I start a gnome-terminal the fonts look horrible but xterm works just fine. I didn't try installing fonts, probably will have to install Gnome packages which from beginning I'm trying to avoid.

If you know how to remove all the Gnome packages without breaking it (specifically for CentOS Linux release 7.6.1810 ) or which steps/packages follow/install to get a decent GUI please let me know. It would be nice to have a light VM. I don't need the office packages but system administration, internet, 

TIA.

Comentarios

poleguy dijo…
Thanks. This worked for me (removing gnome-classic-session and gnome-session not bothering with leaf plugin, etc., followed by systemctl restart gdm) I wanted to get rid of gnome options on login screen to use xfce only, but removing gnome-desktop3 or gnome-session threatened to remove gdm, which seemed like it was a non starter.

I'll post back if I find out how to clean it up better.
Tuareg dijo…
Awesome!

Thank you poleguy.