1

I just want somebody to walk me through the steps of switching a command line interface linux box into a gui based one. I know this has to do with the X Window System but I don't exactly know how to go about installing it fully. Now, if firefox is installed for example and I try to run it, it will give me: "error: no display environment variable specified"

Of course I need to specify a display, right? I used this: export DISPLAY=:0 and when I typed firefox nothing happens. When I type firefox & and then enter the command jobs I can see that firefox is running. But nothing is displayed. No window pops up.

I searched about how to solve this error but I didn't really get it. I just want to apply changes to my linux box so that when I open a gui based software it just opens with a window. Actually that's one thing that is doable. I have done it long ago but I forgot how as I'm not a regular linux user. The other thing that I want to know: Is it also doable to change a cli linux box into an overall gui based linux permanently like those which are ready made such as Ubuntu and linux mint? Or does that require an actual coder?

I'm actually using a VM in virtualbox and experimenting with it. I can reverse any harm done to it. It is actually ubuntu 14.04 VM. It is the linux version of the metasoloitable3 VM by rapid7 used for pentesting: https://github.com/rapid7/metasploitable3

Thanks in advance

  • It sounds like a desktop is already running if Firefox doesn't quit or print any errors after setting the DISPLAY variable. Try pressing Ctrl-Alt-F7 – Billy Jun 6 at 21:26
3

You say you are using Ubuntu. To add the desktop. You need to install it.

However you say you are using Ubuntu 14.04 Ubuntu version numbers are YY.MM (year and month of release) see support has been dropped (it still has long-term security support until 2020-04).

To install do apt install kde-plasma-desktop (or other desktop) -- it will pull in all dependencies including X11.

However it may be better to use a different Virtual machine for desktop use. You could run them both, and connect to the not graphical one from the graphical one. You can still run graphical programs on the non-graphical one but display them on the graphical one using ssh -X, and installing just the program (e.g. firefox), but no desktop.

| improve this answer | |
3

For a minimal Gui use xorg

apt install xorg

If you would like to just use a GUI as in a desktop environment just do:

apt install ubuntu-desktop

after a restart you should be able to see the Gui

| improve this answer | |

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.