If you want to Control your pi using your computer!
Yeah there is way.
VNC is a graphical desktop sharing system that will allow you to remotely control the desktop interface of your Raspberry Pi from another computer.
Let's start...
First we need to Setting up Our Raspberry Pi
1. Insert the micro SD card with NOOBS preinstalled into the micro SD card slot on our Raspberry Pi.
- Plug in the USB 2.0 Mini Microphone, and the (optional) WiFi Wireless Adapter.
- Plug in your USB keyboard and mouse.
- Connect your monitor using the HDMI port.
- Now plug in the USB power cable to your Pi.
- Your Raspberry Pi will boot, and a window will appear with a list of different operating systems that you can install.
- Tick the box next to Raspbian and click on Install.
- Raspbian will then run through its installation process. Note: this can take a while.
- When the installation process has completed, the Raspberry Pi configuration menu (raspi-config) will load. Here you can set the time and date for your region and enable a Raspberry Pi camera board, or even create users. You can exit this menu by using Tab on your keyboard to move to Finish.
- Once rebooted, login to your Raspberry Pi. The default login for Raspbian is username pi with the password raspberry.
NOTE: To load the graphical user interface at any time type startx into the command line.
More info: raspberrypi.org
2 - Installing Utilities & DependenciesNOTE : You will be using the Terminal utility on the Raspberry Pi to install the utilities you need for this Alexa Voice Service walkthrough. Terminal comes preinstalled on the Raspberry Pi, and you can get to it from the Desktop. You can learn more about Terminal here.
SSH allows you to remotely gain access to the command line of a Raspberry Pi from another computer (as long as they are both on the same network). This removes the requirement to have an external monitor connected to your Raspberry Pi.
SSH is enabled by default on Raspberry Pi. If you run into problems getting SSH to work, make sure it’s enabled. This is done using the raspi-config utility.
Type the following in the Terminal:
sudo raspi-config
Then navigate to SSH, hit Enter and select Enable SSH server.
Now let's SSH into your Raspberry Pi. To do that, you need to know the IP address of your Raspberry Pi.
Type this command into the terminal:
hostname -I
> 192.168.1.10 //this is an example Raspberry Pi’s IP - it would be different
If you’re on a Windows PC, follow the instructions here to SSH Using windows
Now that you know the IP address of your Raspberry Pi, you are ready to connect to it remotely using SSH. To do this, open the terminal utility on the computer you would like to connect from and type the following:
ssh pi@<YOUR Raspberry Pi IP ADDRESS>
It will prompt you for your password. NOTE: the default password for the user pi is raspberry.
Voila! You’re now remotely connected to your Raspberry Pi. Now you’ll install all the utilities while connected remotely via SSH.
2.3 Install VNC ServerVNC is a graphical desktop sharing system that will allow you to remotely control the desktop interface of your Raspberry Pi from another computer. This will come in very handy as you get rid of the external monitor connected to your Raspberry Pi.
sudo apt-get install tightvncserver
Start VNC Server
To start the VNC Server, type: tightvncserver
You will be asked to set a password to access the Pi. You'll need this when you try to access the Pi from another computer, which we will be doing in a moment.
Run VNCServer at Startup
You want to make sure the VNC Server runs automatically after the Raspberry Pi reboots, so you don’t have to manually start it each time with the command tightvncserver through SSH. To do that, type the following in the terminal:
cd /home/pi
cd .config
Note the '.' at the start of the folder name. This makes it a hidden folder that will not show up when you type 'ls'.
mkdir autostart
cd autostart
Create a new configuration by typing the following command:
nano tightvnc.desktop
Edit the contents of the file with the following text:
[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false
Type ctrl-X and then Y to save the changes to the file.
That's it. The next time you reboot the VNC server will restart automatically
Connecting to a Pi over VNC using WindowsOn Windows you'll need to download and install a VNC client program. A commonly used one is TightVNC which can be downloaded from tightvnc.com
Choose either the 32 or 64 bit download depending on which version of Windows you are using. If you don't know then check by looking at System in Control Panel. Download the installer file and run it.
During installation you'll be offered the choice of Typical, Custom or Complete. You only need the VNC client and not the server, so choose Custom. Then select TightVNC Server
and choose Entire feature will be unavailable
. Click Next
. Uncheck the option about Windows Firewall and click Next
again, then Install
.
Once the installation is complete you should find TightVNC Viewer
under the start menu. When you run it you'll be presented with the dialog below. You will need to enter the IP address of the Raspberry Pi followed by the screen number (:0
or :1
). For example:192.168.0.6:1
Click the Connect
button and you will be prompted for the password that was specified when configuring the VNC server on the Raspberry Pi earlier. You should then find yourself at the Raspberry Pi desktop.
Don't use the logout
menu as you would on the Raspberry Pi desktop when you want to close down. Just close the TightVNC window itself and then use the kill command on the Raspberry Pi, described above, to shut down the VNC server.
For further documentation about TightVNC Viewer please visit tightvnc.com
Connecting to Raspberry Pi via VNC
You may now disconnect the Monitor, keyboard and mouse (if you like). Now with SSH (allows remote access to the terminal) and VNC (allows you to remote control the Raspberry Pi’s desktop interface) installed, the external monitor is optional. Feel free to disconnect it from the Raspberry Pi.
Thank You by :- Salman Faris
Comments