3

I've installed Ubuntu 19.04 Desktop. I don't actually need/want the desktop environment, but I don't have a keyboard so am only able to install it with a mouse, and onscreen keyboard, which I obviously can't do on the server edition (..?).

There is no functioning Ethernet connectivity on it either, so it has to connect to my network via WiFi, so I can't set it up via SSH, as I'll have to tell it my WiFi password, which will have to be done with the on screen keyboard.

Anyway... So, when viewing htop, I notice that gnome-shell is using about 70%-100% of my CPU all the time after reboot, so I kill it, and all is well.

Am I able to uninstall gnome-shell and have Ubuntu still function properly for my CLI purposes? Or is it integral to the OS? Is it only related to the GUI aspect of my desktop installation, or does it play a role in everything (my docker services, server apps, etc.)?

Jack_Hu
  • 354
  • 1
  • 3
  • 14

2 Answers2

5

Am I able to uninstall gnome-shell and have Ubuntu still function properly for my CLI purposes?

Yes. I can offer an alternative: disable the desktop.

Or is it integral to the OS? Is it only related to the GUI aspect of my desktop installation, or does it play a role in everything (my docker services, server apps, etc.)?

Nope. Though you will also remove all the graphical related tools to your services.


The difference between a server and desktop is only a systemd setting and this will make your system show a login:

sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target

You can then still start the desktop (command is startx).


To revert back to graphical logon:

sudo systemctl enable graphical-user.target --force
sudo systemctl set-default graphical-user.target

The current active option is shown with:

$ systemctl get-default
graphical.target

And ALL the available options are:

RunLevel Units  
  0      runlevel0.target, poweroff.target  Shut down and power off
  1      runlevel1.target, rescue.target    Set up a rescue shell
2,3,4    runlevel[234].target, multi-user.target    Set up a nongraphical multi-user shell
  5      runlevel5.target, graphical.target Set up a graphical multi-user shell
  6      runlevel6.target, reboot.target    Shut down and reboot the system

So you can also use runlevel{number}.target where {number} is the run level.

Rinzwind
  • 309,379
1

You can remove any desktop, and even the graphics server, and you will be left with a fully functional operating system that can be used through the terminal and any terminal based application. You need a keyboard or remote shell access (with keyboard) to operate that, however. If you need a mouse and a virtual keyboard, leave a shell in place with the virtual keyboard software. You may always change to a lighter desktop environment, though any system operation may be difficult and sometimes impossible with only a mouse.

vanadium
  • 97,564