Introduction: Use Your Tablet As Raspberry Pi Screen
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.
54 Comments
1 year ago on Introduction
Can I use an iPad Air 2 that is locked out of the iPad account as a screen
3 years ago
Good day. I did something similar. Tight vnc server and ssh was instaled on raspberry pi 4B in raspbian buster. Real vnc client was installed on lenovo tablet. It is necessary to run vnc server on raspi by command: /usr/bin/tightvncserver. Then i typed in Real vnc ip adress of raspi with port number 1 in local lan, enter vnc password, confirm not encrypted connection, and enjoyed it.
Question 5 years ago
this seems more like an ad for your website than an instructable geez
Question 5 years ago on Introduction
http://chunou-sauce.com/2016/09/27/how-to-use-mobile-as-screen/ (link to blog)
"Hmm. We’re having trouble finding that site.". Temporary problem or is the blog missing?
6 years ago
@pinchan,
I encountered the following error at step 2.
Please advise.
Thank you.
6 years ago
Pinchan,
If you have proper network routing set up on both
devices, this should be possible even over the Internet. It'd be too
entailed to describe the steps here, and since I don't have an rPi to
work with, I can't create an instructable to show you how. However,
what you will need to do is to add a forwarding rule to your home
Internet gateway/router, to point incoming traffic to your rPi.
Ports to open:
vnc-server 5900/tcp # VNC Server
vnc-server 5900/udp # VNC Server
ssh 22/tcp # The Secure Shell (SSH) Protocol
1) permanently assign an IP address to your rPi, on the gateway/router.
2)
Create forwarding rule to allow incoming addresses asking for port 5900
to be redirected to that permanent IP address and same ports. Note:
This allows any monkey on the internet to poke your VNC services, so
make sure you have passwords set up. You may have to do the same for
port 22, or SSH. Again,if someone gets that password, they can take
over your rPi, and try attacking everything on your home network too.
You can tighten security by only allowing specific IPs to "come in", so
make sure to learn how to do that once you have a working connection.
3) From your rPi, Go to http://whatismyip.com/
to see what IP address from the "outside" you'd need to use on the
"outside computer." When you are "inside" you would use the IP from
step 1.
rcochran5,
In regards to the IP
address details in the configuration of VNC, this interface is looking
for IP:Display# , not IP:port number. VNC is a tool to allow multiple
people to have separate virtual "displays" to interact with the VNC
server. Each user has a definition, which includes the display numbers,
in the example, it's display 1. Additionally, VNC can be changed to
unique ports per connection.
Reply 6 years ago
3389 will open up rdp
Reply 6 years ago
Is it possible assign a fixed ip?
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 ?
Reply 6 years ago
No, no no... No. Do not do this. This is extremely dangerous, opening your network up to LOTS of bad things for zero gain.
I will say again: DO NOT OPEN UP PORT 5900 TO OUTSIDE TRAFFIC.
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.
Final warning: Do not open 5900 to outside traffic.
Reply 6 years ago
Yes, It is the clever way to encrypt the communication using ssh tunnel !
Reply 6 years ago
Hi,
Thanks. Your comment is definitely a good addition for this post. It's roughly mentioned,
https://www.raspberrypi.org/documentation/remote-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 "port#" as "display#".
Reply 6 years ago
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
Reply 6 years ago
Or use proper port redirection. Pick a random public side port that maps to the standard private port.
Reply 6 years ago
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.
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.)
6 years ago
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.
6 years ago
Optionally,you could use RDP. It works surprisingly well compared to VNC.
Reply 6 years ago
This sounds interesting!
6 years ago
It's possible to use the TCP/IP over USB, where you connect RasPi and
the tablet by a USB cable; which of course takes care of charging the
tablet battery. Caveat: I did it on a Beaglebone, but it should work on
RasPi as well.By the way, VNC is one way to do it, and you
can also install and run an X server on the tablet and display remote
X11 protocol.
6 years ago
nice! will the tablet get asleep if viewing long time?
Reply 6 years ago
Hi,
It's up to your tablet. I didn't test how long battery lasted. But it doesn't consume battery so much, I feel.