1

I need a solution like those of MS Windows 3.x and MS DOS, where you boot up the computer using DOS and if you want the GUI you just type the command win.

I need something like that with Ubuntu Server and any GUI environment. In other words, I need the computer boot up by default using Ubuntu server and works using the shell and if needed a GUI to do some tasks visually, I just type a command to load the GUI and then I could able to close (release resources used by GUI) it while the server shell still works.

Indeed, my first experience with Ubuntu was Ubuntu Server, from many years, but when I followed advises such as sudo apt-get install ubuntu-desktop, I always finished with a computer boots up the GUI by default and I don't want that. I need GUI on demand. Even editing grub will lead to need to reboot again.

I ask this question because I need to safe resources using the Ubuntu Server, but I need the ease of GUI during make major settings, such as, settings network, editing config files, etc.

SaidbakR
  • 769

2 Answers2

1

sudo apt-get install ubuntu-desktop is a sufficient solution, but it requires you to alter grub settings so that you boot into console mode by default. According to answers on https://askubuntu.com/a/92279/295286 you need to edit /etc/default/grub to have the following line:

# Stops the ubuntu purple screen
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

# Uncomment to disable graphical terminal (grub-pc only) 
GRUB_TERMINAL=console

For changes to take effect, remember to run sudo update-grub

Alternatively, if you don't mind using minimalistic desktop environment instead of whole desktop, install openbox or blackbox only.Installing these doesn't affect which mode your computer boots into. I use this exact same approach on my Arch Linux virtual machine.

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • Do you mean that every time I need to run the desktop, I have to edit the grub and then reboot, then before closing the desktop I have to edit it again? – SaidbakR Feb 23 '17 at 15:46
  • @SaidbakR no, you need to edit it only once. Also, after you edit /etc/default/grub file, you should run sudo update-grub. I'll add that to my answer in a minute – Sergiy Kolodyazhnyy Feb 23 '17 at 15:49
  • 1
    A minimalistic desktop environment alias window manager, is a good alternative. I suggested fluxbox, but openbox and blackbox are also good candidates. Another candidate is jwm :-) – sudodus Feb 23 '17 at 15:51
  • Ok, I understand, but sudo update-grub itself does not take any effect without rebooting. – SaidbakR Feb 23 '17 at 15:51
  • 1
    @sudodus yeah that one can do , too. There's also 9wm, but that one has steep learning curve, so I rarely recommend it. Openbox and blackbox are very simple and just work. I've had them pretty much on every server-style OS that I've ever installed: Arch, FreeBSD, Ubuntu - they just work – Sergiy Kolodyazhnyy Feb 23 '17 at 15:54
  • @SaidbakR Of course. Everything really depends on your goal. If your main goal is to make server go into console every time you boot it - then grub approach is the way to go. If you just want to keep server running and just play with GUI sometimes, just install any of the simple window managers we already suggested. – Sergiy Kolodyazhnyy Feb 23 '17 at 15:58
  • @Serg I'm not Linux Guru, so I need to know which of simple window managers that you regarded is more easier in installation and running. i.e I need copy & paste commands to install it. – SaidbakR Feb 23 '17 at 16:01
1

Ultra-light window manager, that you can start and stop

You can install xinit, fluxbox and xterm (plus the GUI programs that you want to use). Then you can start the graphics with startx. Exit from the fluxbox window manager brings you back to the text screen.

I made compressed image files, that provide shortcuts to such systems (32-bit and 64-bit Xenial systems), but of course you can make your own system or add this kind of graphics to an existing system.

See these links for more details,

help.ubuntu.com/community/Installation/UEFI-and-BIOS/stable-alternative

dd_text_16.04-UEFI-n-BIOS_2017-01-15_intel-4-pendrive-7.8GB.img.xz

dd_X32-Txt-Startx-Intl_2016-12-11_4GB.img.xz

sudodus
  • 46,324
  • 5
  • 88
  • 152