You need a certain type of monitor to use Raspberry Pi. Most of people do not have a monitor specifically for his/her Raspberry Pi. By taking this method, you can make your tablet or smartphone a screen for your Raspberry Pi. This will increase your productivity when you work with Raspberry Pi since you don't have to connect it with a PC screen.

Note that this technique works only when your Raspberry Pi and tablet/smartphone are connected to a same WiFi network.

For the detailed procedure, please refer to my blog.

Step 1: Check Raspberry Pi IP Address

You will be required IP of your Raspberry Pi in the following steps. You have to connect Raspberry Pi with screen and open the command line to In order to check the IP. Enter ifconfig or hostname -I. Keep the IP!

Step 2: SSH Client Setting - 1

SSH (Secure Socket Shell) client needs to be installed on your device. For example, Serverauditor is available both for Android and iOS devices. As an example, check my blog to set up SSH client, Serverauditor.

Step 3: VNC Server Installation and Setting

You can do this either on your tablet as now your SSH is available. Of course, you can do this on your Raspberry Pi connected with a PC monitor. Open a console line and enter the command by referring my blog.

Step 4: Install & Set Up VNC Viewer App on Your Tablet

Now you need to install VNC viewer app on your device. Many similar apps are available. The most famous one is the app by Real VNC. Once you install a VNC app, you need to set it up. You will need to enter Raspberry Pi IP followed by ":1" which is a display number. Also you will required VNC server password that you create in the previous step.

<p>Pinchan, </p><p>If you have proper network routing set up on both <br>devices, this should be possible even over the Internet. It'd be too <br>entailed to describe the steps here, and since I don't have an rPi to <br>work with, I can't create an instructable to show you how. However, <br>what you will need to do is to add a forwarding rule to your home <br>Internet gateway/router, to point incoming traffic to your rPi.</p><p>Ports to open:</p><p>vnc-server 5900/tcp # VNC Server<br>vnc-server 5900/udp # VNC Server</p><p>ssh 22/tcp # The Secure Shell (SSH) Protocol</p><p>1) permanently assign an IP address to your rPi, on the gateway/router. </p><p>2)<br> Create forwarding rule to allow incoming addresses asking for port 5900<br> to be redirected to that permanent IP address and same ports. Note: <br>This allows any monkey on the internet to poke your VNC services, so <br>make sure you have passwords set up. You may have to do the same for <br>port 22, or SSH. Again,if someone gets that password, they can take <br>over your rPi, and try attacking everything on your home network too. <br>You can tighten security by only allowing specific IPs to &quot;come in&quot;, so <br>make sure to learn how to do that once you have a working connection.<br></p><p>3) From your rPi, Go to <a href="http://whatismyip.com/" rel="nofollow"> http://whatismyip.com/ </a> <br> to see what IP address from the &quot;outside&quot; you'd need to use on the <br>&quot;outside computer.&quot; When you are &quot;inside&quot; you would use the IP from <br>step 1.<br></p><p>rcochran5, </p><p>In regards to the IP <br>address details in the configuration of VNC, this interface is looking <br>for IP:Display# , not IP:port number. VNC is a tool to allow multiple <br>people to have separate virtual &quot;displays&quot; to interact with the VNC <br>server. Each user has a definition, which includes the display numbers,<br> in the example, it's display 1. Additionally, VNC can be changed to <br>unique ports per connection.</p>
3389 will open up rdp
Is it possible assign a fixed ip?<br>Your mobile connected to internet by a provider, you find ip by whatsmyip app.now if you hit that ip with any other device, do you think request will come to your mobile ? You sure ?
<p>No, no no... No. Do not do this. This is extremely dangerous, opening your network up to LOTS of bad things for zero gain.</p><p>I will say again: DO NOT OPEN UP PORT 5900 TO OUTSIDE TRAFFIC.</p><p>Because there is no need to do so, when you are connecting to SSH anyway. Just use a SSH tunnel to connect to port 5900 through the SSH connection. Then all your traffic for both SSH and VNC is encrypted (Which most VNC connections are NOT by default) and you only have to open a single port.</p><p>Final warning: Do not open 5900 to outside traffic.</p>
<p>Yes, It is the clever way to encrypt the communication using ssh tunnel !</p>
<p>Hi,<br>Thanks. Your comment is definitely a good addition for this post. It's roughly mentioned, <br><a href="https://www.raspberrypi.org/documentation/remote-access/access-over-Internet/README.md" rel="nofollow">https://www.raspberrypi.org/documentation/remote-a...<br></a>But I didn't know what to do. As you advise, setting password is must for security, I think. Also thank you for pointing out wrong description. I corrected &quot;port#&quot; as &quot;display#&quot;.</p>
<p>Rather than opening ports (which is inherently insecure) you can set up a free VPN service using Weave. See Raspberry Pi instructions at https://www.raspberrypi.org/documentation/remote-access/access-over-Internet/README.md </p>
<p>Or use proper port redirection. Pick a random public side port that maps to the standard private port.</p>
<p>Using a different port than standard is nearly as insecure as using standard port is. Port sniffing is so easy to do nowadays that using non-standard ports is only useful if the attacker is using IP range discovery to hunt for low hanging fruit (people with open common ports) that he might gloss over you and pick someone else. If it's your specific system he is after using non-standard port is useless.</p><p>The onyl proper solution is to use secure/encrypted networking. Besides, NX/X2go are better for latency and speed in most cases than VNC and are inherently more secure because they're built atop of ssh -x and promote best practices (certificate based auth etc.)</p>
<p>Another method is set a static IP on the Pi, update to PIXEL(which has inbuilt VNC, has to be enabled in raspi-config), install VNC client in play store or app store, give the IP and get started.</p>
Optionally,you could use RDP. It works surprisingly well compared to VNC.
<p>This sounds interesting!</p>
<p>It's possible to use the TCP/IP over USB, where you connect RasPi and<br> the tablet by a USB cable; which of course takes care of charging the <br>tablet battery. Caveat: I did it on a Beaglebone, but it should work on <br>RasPi as well.By the way, VNC is one way to do it, and you <br>can also install and run an X server on the tablet and display remote <br>X11 protocol.</p>
<p>nice! will the tablet get asleep if viewing long time?</p>
<p>Hi,<br>It's up to your tablet. I didn't test how long battery lasted. But it doesn't consume battery so much, I feel.</p>
<p>Don't stop with the Raspberry Pi.</p><p>You can use VNC on any Linux based or Windows based computer. Install &quot;tightvncserver&quot; on either, configure(make sure to give it a password) and start.</p><p>Set the VNCserver to be either view-only or complete control.</p><p>Once you get it running, you will install it on anything you want to remotely access.</p><p>!Security Warning! VNC has little or NO security. do NOT VNC on an open network as 100% of your keystrokes can be captured and logged.</p><p>If you need more security, try tunnelling VNC thru SSH, google instructions.</p><p>I agree, NEVER open port 5900(VNC) to the wider network, that is just asking for trouble. Even SSH will be targeted with 100s of login attempts ever minute. Anything that is internet facing WILL be probed/attack and you will quickly find out how nefarious and ingenious the rest of the world is.</p>
<p>use &quot;ifconfig&quot; to get the IP address (or addresses).</p><p>&quot;hostname -l&quot; may return, the localhost IP address.</p><p>ifconfig will list all active network interfaces.</p><p>So, if you have a small USB-to-WiFi adapter, you will have two-2 real network interface: eth0=Wired Ethernet, wlan0=WiFi (and lo=loopback, the internal network)</p><p>You could use the simple shell script with grep to get just the ip address(es):</p><p>ifconfig | grep &quot;inet addr:&quot;</p>
<p>This method requires another computing device as well. The only issue I see with this great for remote access but not the best to use as a screen in many situations. Other possibilities if you have a VGA based TV get an HDMI to VGA with audio converter and stick your RPI to the back of your TV viola a cheap PC for every TV in your home. I would like to see RPI alternatives devices that run on faster storage medium would be great like a hard drive or SSD for instance. Even better yet would be USB SSD drive boot or possibly next gen SD card storage will provide improvements to be more comparable with hard disk drives at the very least.</p><p>I love the possible but for me it lacks a lot storage being its largest bottleneck. Maybe this will change in the future I sure hope so.</p><p>Other possible things do exist out there for RPI already they do make usb based displays. They also make HDMI to DVI adapters methodology of using VNC is cool on a tablet but it would be neat to see tablets come with micro HDMI inputs and allow switching of inputs as a standardization in the future as well as phones. It would be a very cheap addition that would add a lot of possibilities to smart devices. It would also stop phones and tablets from hitting the landfill as quickly as well.<br></p>
<p>I have a RPI with a 3 terrabyte USB drive attached. No shortage of space at all. I back up my laptop and my wife's to it among other things.</p>
<p>Sure this is really a side issue the brunt of my point was to offer solutions to using an external monitor although I would be there is still a way to interface tablet monitors somehow. The users title is very misleading so I was attempting to help take off some of the pressures of this but exercising discussion about monitor use. As I said I am well aware of usb drive based use scenarios but it almost would have been better if that was where the image was ran from or heck even a sata port would have been a cool addition ... m.2 anyone?</p><p>I covered reasoning in depth to add other storage options ports etc.. mainly speed based issues. Again all of it is not relevant I suppose to the OP but the misleading title was sure to generate discussion and maybe that was the OP's intention now that I think of it.</p>
<p>There are plenty of (other) places to spark such a discussion</p>
You might want to google the raspberry pi and see why and it was designed
<p>Nice, I may try that though I don't tend to need to plug displays in to my Pis as I can web to them see check on the services they run. I've tried half a dozen monitors when setting them up and never had a problem though; only with a 720p HDTV that a little off centre which was annoying back in the day when everyone used to use them for XBMC (ie before Plex stole the show)</p>
<p>I'm a little confused about when and how you would do this. You <br>start out by saying many people don't have a monitor they can hook up to<br> their RPi so they can use this instead, but the very first step is to <br>hook the RPi up to a monitor. So you do in fact need a monitor that <br>will work with the RPi in order to do this. Am I missing something?</p>
Thanks for your comment. I'm sorry if it's confused you.<br><br>Yes, you need a monitor at the beginning to check your IP. After that, you don't need it. I have a 22&quot; monitor. I usually connect my laptop with it. I always work with my laptop but it's small, so it's not comfortable for me to work with it long time. So I didn't want to connect Raspberry Pi with the 22&quot; monitor. Then I came up with this idea. Now I use the 22&quot; monitor only for my laptop. <br><br>Is that clear?
<p>You don't need a monitor. You should be able to look up the RPi's IP address by looking at your router's interface - in fact, better to look there anyway, because you will probably want to switch it to be a fixed local IP address which does not change day by day ...</p><p>So you may as well look it up and make it fixed in the same step ...</p>
@dj_segfault. I have several RPs running tasks and virtually never need to plug a screen in to them after they were set up. So they are stored under the stairs with my fibre ONT, ISP router, IP camera POE switch etc out of the way. So a remote viewing method like this is handy for the odd occasion you need to change something
<p>Doesn't work. When I enter in 'chmod x + vnc.sh', it says:</p><p>chmod: invalid mode: 'x'</p><p>then if i try to do './vnc.sh', it just says</p><p>-bash: ./vnc.sh: Permission denied</p><p>How do I fix this?</p>
<p>Thanks for the replies. It was 'sudo chmod +x vnc.sh' after all!</p>
<p>The command should be &quot;chmod +x vnc.sh&quot;. </p>
<p>Your format for your IP address is wrong I believe. </p><p>It should look somethink like </p><p></p><p>0r &lt;-different port (21)</p><p>Im not exactly sure what :(Port) you want to use with VNC for Pi</p><p>but I do know that the IP address has to have four sets of numbers seperated by (.) -</p>
<p>The number after the colon in VNC-Viwer is NOT a port number, it is the monitor number on the Raspberry Pi's VNC-Server, usually it will be :1.</p><p>In the picture in the Instructable, it does show :1, but the IP address shown only has 3 sections instead of 4!! (it says 192.168.16:1)</p><p>Usually it will be 192.168.XXX.YYY:1 where XXX:YYY need to be substituted by your RPi's local IP address on your home network</p>
<p>generally a vnc server defaults to port 5900</p>
He brings up a great point<br><br>Good idea to include in the guide, how to change this. Leaving it on port 5900 is asking to be hacked since Pi VNC still doesn't support 256 bit encryption and may never.
Sorry to scrutinize, but I feel the title is a little offsetting from the subject matter. With the HDMI or serial interface even if something goes wrong in software, you still see it. VNC isn't a monitor, its a type of terminal service. I would suggest &quot;How to setup your Raspberry Pi Project to remotely view, and use with a Tablet or SmartPhone.&quot; It still requires that someone configure SSH, Switch it to command line login, and configure networking before you can start the Instructable. 90% of people will use HDMI for this so that throws the title off. <br><br>Another idea would be to include in your guide, how to configure a default SD image so you never need to do what I mentioned, therefore never needing the Monitor, keyboard, mouse, and seeking the IP in the first place. <br><br>To get around needing the IP, have it announce the host name via LocalDNS, and on first command login, run Sudo raspi-config and let the user decide what to call it.
<p><a href="https://www.instructables.com/member/FlaredElectronics" rel="nofollow">FlaredElectronics</a>, took the words right out of my mouth. Exactly what I thought as I just read it. Not using it as a monitor at all, but rather remotely controlling it. Which has merit but should really be described as such.</p>
Have you considered plugging your HDMI cable into your television ?, you can then use that as a temporary monitor to set up your Pi
I think you're missing the point. Raspberry Pis are normally hidden in a cupboard somewhere performing a task; not sitting on display beside a TV
Ok maybe I misunderstood that comment of not having a computer monitor to set it up with. Sounded like &quot;how would I do this without having a monitor &quot;. So my reply was that they could always use a tv for setup purposes. Never said they should run it on a tv
<p>Thanks for a nice remark. Yes I have. Today TV has HDMI input. So you can use it as a monitor. Unfortunately as far as I know, tablets don't have HDMI input (some has only HDMI &quot;output&quot; like my x80 pro).</p>
Look on your router for the pi's lp address
<p>Awesome </p>
<p>Thanks for sharing :)</p>

About This Instructable




More by pinchan:Use your tablet as Raspberry Pi screen 
Add instructable to: