I just got my first Ubuntu server but it's so hard to work with terminal only.
How can I install a good GUI for Ubuntu Server? How can I connect it with my Ubuntu desktop ?
I suggest:
sudo apt-get install xorg openbox
It is very light weight. Once installed, you can start the gui environment with
startx
and shut it down, returning to cli with
openbox --exit
But of course you can use other "desktop environment" metapackages instead of openbox and get a lot more bells and whistles, or alternately, there are other WMs like Openbox that have sufficient capabilities in and of themselves to be used as light weight DEs. They mostly have "box" in the name because they are derived from or inspired by Blackbox.
Added:
@sudodus Hi, nice to see another old nic from the other place. Yes, I should have mentioned fluxbox. I thought there were a bunch of SOMETHINGbox WMs, but I looked a bit & I guess it is just the 3. I'm going to try to insert a graph showing memory usage of some WMs. Lessee:
That doesn't show up for me. I'll leave the line. Maybe somebody can tell me what I did wrong. Here is a link to the pic:
https://l3net.files.wordpress.com/2014/02/cmp-all4.png
The 3 'boxes are pretty similar. Blackbox isn't actively maintained, so that might be a concern. They're all pretty light. The pic only covers memory usage but I suspect the story on cpu load drive usage is similar. I'm guessing fluxbox probably has a few features Openbox doesn't. Both are in the repos.
You can try more than one at a time if you want, but you'll have to look up how to tell startx which to start. Probably in the startx man page. If you just install 1, you don't have to remember that; startx will do it for you.
I'd be careful NOT to install a "display manager" which would come with some of the more conventional "Desktop Environments" because it makes it a little harder to turn the GUI on and off. Still do-able if you really WANT a pretty graphical login screen but more trouble. As you can see from the pic, there are still lighter WMs, some of which ARE actively maintained, but the lighter ones can be more . . . not so much "challenging", let's say "awkward". Openbox and Fluxbox are more like conventional setups. I haven't tried all the lighter ones though. Might be a gem among them.
From a perspective of getting help with it, Openbox also has the advantage that a LOT of people use it as part of LXDE or Lubuntu. Fluxbox users on the other hand probably tend to be more sophisticated on average so maybe it evens out.
sudo apt install <FAVORITE>-desktop
. You get to decide what the 'favorite' is. It's a mere crutch, though - real server gurus use shell. Once you get used to it, it's easy and fast.