Let's now install and configure VNC.
VNC will simply allow you to use the Raspberry Pi desktop from your own computer.
This is great, so you don't need to only use the terminal with command lines, and you also don't need
to have a monitor plugged to your Raspberry Pi.
Even if you have a monitor, you will see that it may be more convenient to work without it.
And the reason we did all this setup with SSH before is simply because we need to access the Raspberry
Pi through SSH here, so we can type a few command lines to configure and set up VNC.
So here make sure that you are connected to the Raspberry Pi okay.
You can see I have Pi at Raspberry Pi which means that I'm going to type commands inside the Raspberry
Pi.
If you don't have this, go back to the previous video and just note that here I am on the Raspberry
Pi.
If I want to go back to my windows terminal, or if you're on Linux or Mac OS, go back to your previous
terminal.
You can just type exit And you can see now I have lost the connection.
It doesn't mean that the Raspberry Pi is powered off.
Okay, it's still on.
It's just that you lost the connection.
And then with the up arrow, I can go back to running the same command, I press enter.
I need to put the password again.
And you see here, for example, what I did a mistake.
So this is what you would have if you put the wrong password.
And if you put the right password.
So to use VNC we actually need to enable VNC because it's disabled by default.
And to do that we will start a menu.
You can just type sudo like that.
And then raspi dash config.
And you can press tab for auto completion.
Okay so sudo raspi config you press enter and you get to a menu like this that you can navigate with
the arrows of your keyboard.
And we have two things to do here.
The first you will go to Interface options.
So you press enter.
Then you go down to VNC.
Press enter.
And would you like to uh so would you like the VNC server to be enabled.
You're going to go on.
Yes.
Press enter okay.
And you should go back to the menu.
The VNC server is enabled.
You press enter again and you are back to the menu.
Now we're going to do one more step.
You're going to go to System Options.
So that's the first menu here.
You press enter and then you go on boot auto login.
So you should have a menu that looks like this.
And you're going to choose desktop or maybe desktop auto login.
So just in case the default is console, it means the desktop is not going to boot.
So with VNC because we want to get access to the desktop, we want to make sure that the desktop is
enabled and you can choose desktop.
In this case you will have to log in into the desktop.
I'm just going to choose auto login for simplicity.
So when we login actually through VNC to get to the Raspberry Pi OS, we directly arrive to the desktop
and everything is correctly configured.
So I'm going to press enter on this option okay.
We go back to the menu and then I click on the right arrow to go to finish.
And it's going to ask us to reboot.
So I can press yes.
And as you can see we lose the connection.
Why do we lose the connection.
Because well, the Raspberry Pi is rebooting.
If it's rebooting, then of course we lose the SSH connection and we are back to the here to the windows
terminal.
So we just need to wait that the Raspberry Pi is back on the network and then.
Well, we should not need to use the terminal here again.
So I'm going to close that.
I'm going to keep that on the side for later.
And what do we do now.
So the Raspberry Pi should be back on the network with the VNC server enabled.
So what we need is a VNC client so that we can well, we can use a software to use VNC and connect to
the Raspberry Pi.
And to do that I'm going to so you can open a web browser and we're going to use Tiger VNC.
So there are lots of different VNC clients VNC viewers here.
We're going to use Tiger VNC.
So you can just type Tiger VNC in Google and go to Tiger vnc.org.
So they don't have a executable to download here.
But you can go you can see you can go on the GitHub release page and you see that they say that they
have a binaries for Linux, windows and also Mac.
So you click here okay.
And on releases you're going to get to GitHub.
Don't worry about this.
Just get the latest release.
It can be another version than this one.
It's okay.
And then they will give you a link here to SourceForge.
So you click on that link and you go to SourceForge where you can download the latest.
So you can click here on this button for windows.
But if you are on other operating systems you can see you have other versions.
You can choose your operating system.
Okay.
And I'm just going to click here to download.
Okay.
Your download will start shortly.
We just wait for this.
We don't click on anything.
Okay.
And it's downloading.
And then we can install.
So just click on okay.
So somehow my Windows Defender doesn't like this I'm going to click on more info and just run anyway
okay.
If you follow.
So here I'm going to say yes I have a pop up to allow the software to run.
So if you follow the links from the official website of Tigervnc it should be fine.
Okay, don't go to other links than that.
And now we are on the setup.
So next, uh, accept the agreement and you can install it.
Okay.
Next install finish.
And then you can just go to the search bar or press windows key for example, and type Tigervnc and
just launch Tigervnc.
So it's going to be empty like that.
All right.
So here the interface is quite simple.
Here.
You're going to put simply the IP address of the Raspberry Pi.
You have some options.
That might be it might be auto select by default.
But you don't need to change anything on the options for now.
So I'm just going to leave it by default.
And you will put the IP address.
So for me it was 192 dot 168 .203.222.
And here once again it's very important that you are.
So your computer here is on the same network as the Raspberry Pi.
Because once again, if you are not, then you won't be able to find the Pi from your computer.
So once I have put the IP address here, I can click on connect.
And very shortly after you should have something like that.
So certificate etc..
Do you want to make an exception for this server so you can click on.
Yes.
Okay.
This is just a security warning because we don't have any certificate but it doesn't really matter.
You just click on yes.
And you can see here now we have username and password.
So if you reach that it means that the VNC server is actually working and you could find it.
Now you just need to put username would be pi.
And the password is the same that you put before for SSH.
And it's the one that you have set.
When you flashed the Raspberry Pi OS and click on okay.
And we are on the Raspberry Pi desktop.
So this is what you see here.
This is not my windows computer.
This is the desktop of the Raspberry Pi.
And here just a quick parenthesis.
So here I have selected the.
So the IP address that I have found here okay.
So if you get access to this it's working correctly.
But let's say that in the future you try again with the same IP address.
For example you try tomorrow or in one week and it doesn't work anymore.
Why is that?
Probably because the IP address or the network mask may have changed.
So in this case, I recommend that you just find the IP address of the Raspberry Pi before.
Okay.
So in the case that it works now and that let's say tomorrow it doesn't work anymore, it's probably
because maybe the IP address changed.
It happens for me.
For example, I use my smartphone as a hotspot.
And somehow when I disconnect the hotspot and I create a new one, it gives a different IP address.
So the IP address I have today is not going to be the same as the one I have tomorrow.
So probably is a way to to fix that.
But there's going to be more complex.
But just know that you might have to check the IP address again just in case it works now and it doesn't
work in the future.
But if it doesn't work now, well, you need to go back and make sure that you can connect with SSH.
Make sure that you can access the menu that we just did in this video and that the well, the VNC server
is enabled and that you can download the Tigervnc client.
So if you see the desktop, great, you can now have access to your Raspberry Pi desktop without any
external monitor.
So you can go ahead and jump to the next lesson where we will finish the last configuration steps.
And I'm just adding this small extra troubleshooting parentheses here.
Okay.
To address the issue where you could have at this point not you would not see the desktop, but you
would see a gray screen.
So you could still connect with tigervnc, but you would see a gray screen.
That has happened to me recently when I tried on the Raspberry Pi four, so I don't know if it's due
to Raspberry Pi four.
I could try again here on the Raspberry Pi five.
It works correctly, but anyway, if you have a gray screen, well it means you won't see that.
So probably you just, uh, close tigervnc.
And then what we will do is go back to the terminal.
Okay?
So you should be able to connect with SSH.
We're going to go back here.
So I put the password.
We go back to the Raspberry Pi with SSH.
And we are going to do a sudo apt update okay.
So you write exactly this command sudo apt update.
You press enter.
You might need to put your password.
But here it works okay.
It's going to update the packages.
And then you need to do sudo apt upgrade okay.
So actually update is going to fetch the new packages and upgrade.
is going to update them.
This is something we're going to see a bit later when we talk about Linux.
So you don't really need to worry about this for now.
You just type those comments exactly.
So you upgrade.
This is probably going to show you a lot of packages, and it's going to stop and ask you to validate.
So you just press enter and then you can wait.
So you might wait for 10 or 15 minutes for everything to be updated here.
It shows me zero to upgrade because I have actually already upgraded the system before, but for you
it might take well, like I told you, 10 to 15 minutes depends.
And then after that you can reboot the Raspberry Pi.
How do you reboot the Raspberry Pi?
Well, we're not going to take the cable out and put it again.
Now we can use sudo and then reboot just like that.
So you press enter okay.
You can see the system will reboot now.
And now we lose the connection okay.
Because if you reboot, then while the Raspberry Pi is shut down.
So you lose the connection and then you can go back to Tiger.
So Tiger VNC.
So you should wait a bit.
Okay.
Maybe 30s.
Let's try to connect.
Okay.
We have this again.
So Pi.
And then the password.
And you should be able to get to this.
Okay.
And in the next video I'm going to show you at some point that we update the packages using an icon
here.
Or this icon is not here anymore, simply because we have already done it here previously in the terminal.
And finally, well, if nothing works.
So if you cannot get access to the Raspberry Pi OS desktop, well, there is one extra step that I've
put in this section about Raspberry Pi Connect.
Okay, so check that out with this for sure.
You will be able to get access to the desktop, of course, provided that you can already have access
here with SSH.
Okay, but if nothing works, try with Raspberry Pi Connect.
I have an extra video on this.