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.

  • 1
  • 1
    @George OP said they tried that and it's not what they're looking for.
    – Seth
    Feb 23 '17 at 15:52
  • OP: Looks like you are looking for something like startx.
    – Seth
    Feb 23 '17 at 15:53
  • @George As I mentioned in the question, I need something like Windows 3.x and DOS. Just typing a command to get a GUI and then another command to leave it and free its resources.
    – SaidbakR
    Feb 23 '17 at 15:55

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

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

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.

  • 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 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 Feb 23 '17 at 15:54

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,




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.