How to Install a GUI on Ubuntu Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to install a gui or a graphical user interface on a headless ubuntu server and i just want to start out with a warning that this is probably not a good idea to do on a production server that has you know a public-facing website or a web app that people are using because it just adds a lot of complication to the packages that are installed on the server and potentially introduces security vulnerabilities so with that um i guess necessary warning let's go ahead and get on into the tutorial all right so i am logged into an ubuntu server here at this ip address and what i want to do is as always do an apt update and that'll be followed up with an apt upgrade now these should all be up to date because i was just in here checking it and they are so the first thing we're going to do is to install something called task cell so apt install task cell and this was something new to me something that i haven't um seen before but it's basically allows you to install like a collection of software at once instead of installing each individual package so it's very valuable in that sense so now that we have that we want to install a display manager now um gnome the gnome desktop by default uses something called gdm3 as the default display manager and from what i understand this is very heavy it's not light at all we want to install a different display manager than what comes packaged with ubuntu desktop okay so we're running ubuntu server we're going to add a a desktop environment to it but we don't because we're going to access it over the over the network over the internet potentially we want something lightweight so you have a couple options one of them is slim afton saw slim if you want that one another one is light dm and there's there's a couple more than this there's a few more than this i think light dm in size is like 400 megabytes bigger than slim so i'm going to stick with slim for now and that is 470 megabytes so let's go ahead and install that okay so we can actually check that you can check what your default display manager is on any system if any in the etc x11 default display manager file just take a look at that and because we had it just installed slim that is our new display manager okay so let's use task cell tsksel to install ubuntu desktop now normally you would have to install all the individual components together or separately but this allows you to do that with just pretty much one click so i found that if you see ubuntu cloud image checked by default keep it checked and then in addition to that use the arrow keys to come down to ubuntu desktop or another version that you want to install hit your spacebar to select it tab down to ok and hit enter now this takes quite a while to install probably i don't know five five ten minutes i'll let you know but we'll fast forward through this part as well okay so that installed it took about five minutes and now we have an ubuntu desktop environment running on our remote server but how do we see things how do we connect to it and interact with it graphically well we're going to use something called vnc which stands for virtual network computing and there has to be a server aspect to the vnc communication and the client aspect on your local machine so the client's going to connect to the server and show ubuntu desktop very simple explanation but let's go ahead and install something called tigervnc standalone server so apt install tigervnc stand alone server and i just want to point out that this is not your only option you can use another vnc server i'm just choosing tigervnc here so let's go ahead and install that and that shouldn't take too long and once we do that let's create if you don't already have it let's create a user for the to log into the the server so we'll do add user and i'll say tony and we'll give him a password we type the password and a name room number work home other yes okay so we have a user called tony let's switch over to that user with su tony now we are operating as tony and with the vnc server package installed we can type in vnc server dash local host no and what this is going to do is set up a vnc server you will require a password to ask access your desktop so i'll give it i'll create a password i'll verify that password and would you like to enter view only password no so now we have a vnc server up and running on our remote computer we can confirm that with vnc server dash list and you'll see that here so basically this is the port we're going to connect on at our ip address so this ip address colon 5901 and then we're going to use the password that we just created to access it so let's do that there's a lot of different options you can use for the client there's a built-in screen sharing app on mac you can also install a vnc software on mac or if you're on a different computer you can install something like tight vncs what are the other ones tigervnc ultravnc if you're on windows and stuff like that so what we're going to use is the vnc server that i installed which is vnc viewer and i'm going to come in here and right click new connection and we're going to give them the credentials that we just talked about so the ip address is 161.35.232.7 colon 5901 right 5901. uh the name we'll just call it uh tony's tony's server tony server okay uh now we'll double click on that connecting to tony's server this is a warning that this is an unencrypted connection so stuff that's going back and forth could be plain text it's over the tcp port so we'll continue with that knowing that and then we'll type in that password that we just created so let me type that in click ok and there we go so this is our remote this was a one time this used to be a headless ubuntu server and now we have a desktop running specifically ubuntu desktop so this is the first time that we're seeing this next next next start using ubuntu so here's all of your applications that are installed by default you can show all of the individual ones it's not the most um what should i say like the display is not high resolution or anything this is a lot of data being packed passed back and forth but you can see a graphical user interface so for example let's open up the firefox web browser that opens up fairly quickly let's go to google.com and again this is this is a remote connection to a remote server over the vnc connection and it seems to be working good tony teaches tech so there you go this is this is really cool so we'll go back to our terminal session just to show you a little bit how to manage it and we'll get out of here for now you can do like we did before vnc server dash list if we're done with that server we can type in vnc server s-e-r-v-e-r-kill and then you can use the shorthand here colon1 to turn off that server and it successfully killed that server process and if you look at the server list again that doesn't exist anymore so if we try to go back into our vnc viewer and connect to that it'll eventually error out probably hang here for a bit and then error out i have a bunch of other videos about remote desktop connections copying files to and from all that stuff so if that interests you subscribe to this channel and i'll see you in the next one [Music]
Info
Channel: Tony Teaches Tech
Views: 119,446
Rating: undefined out of 5
Keywords: add gui to ubuntu server, does ubuntu server have a gui, lightdm, tasksel, tigervnc, tigervnc-standalone-server, ubuntu display manager, ubuntu gui, ubuntu install gui, ubuntu server gui, ubuntu server install gui, ubuntu start gui
Id: ODhGNe0s4lI
Channel Id: undefined
Length: 9min 7sec (547 seconds)
Published: Tue Mar 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.