Use your desktop or laptop screen and keyboard with your Pi

Meltwater has come up with a nice little trick which allows you to use your laptop or desktop’s display and keyboard as the display and keyboard for your Pi. You won’t need to do any soldering or to buy any special equipment: all you need is a network cable.

You’ll be using the network port to do this, so if you were relying on it to get internet connectivity you’ll need a wireless dongle too, but using another device’s keyboard and display means that you can cut right down on the kit you need to carry around if you’re bringing your Pi somewhere to show off your latest project.

Meltwater has made an exhaustive guide to setup for beginners available, alongside a cut-down version for advanced users who don’t need quite so much help.

24 comments

Avatar

I do this quite often on OS X when setting up new SD cards, only the method I learned is a little simpler:

– System Preferences -> Sharing -> Internet Sharing to Ethernet
– Connect Raspberry Pi to Mac’s Ethernet port
– SSH pi@192.168.2.2 (usually, else use ‘arp -a’ to get a list of IPs)

Avatar

Arghh, another PuTTY screen shot with diacraticificated a’s all round the dialog/whiptail border (as used in raspi-config). Simon Tatham and co have a lot to answer for for not making UTF-8 the default encoding!

If you have the Raspberry Pi connected to its own monitor but want to share mouse and keyboard between your computer and the Pi, it’s also worth looking at synergy.

If you’re on Linux (or under X on any system I suppose), then `sudo apt-get install x2x` on the pi followed by `ssh -XC pi@raspberrypi.local x2x -north -to :0.0` is pretty handy. No clipboard syncing like synergy gives you though.

Avatar

Great tip! You can do the same on windows, e.g. on windows 7:
– Network and Sharing Centre -> Change adapter settings (on left) -> Right click wireless adapter -> Properties -> Sharing Tab -> Tick ‘Allow…’.

Best to do the above before plugging in the Pi.

You can run “arp -a” in cmd to find the 192.168.137.X IP Address that it gives the Pi once it’s plugged in.

Don’t forget to untick network sharing before trying to use your Ethernet port normally.

Avatar

We covered the same topic this week in a blog a friend and I write about the Raspberry Pi (in Spanish) http://comiendorasps.blogspot.com.es

Avatar

Hola Bernat,

¬°Gracias! Thank you for the link. I’ll add it to my list of Spanish Raspberry Pi links.

Avatar

You can also connect via serial port, using the UART on GPIO pins, with a 3.3V level USB-Serial adaptor. The PL2303HX module costs about $2 on ebay, even with the needed F-F “dupont” 4-conductor ribbon cable included. If you don’t have any other loads, you can even power the Pi with the +5V from the USB adaptor as well.

Avatar

I, like a lot of people, don’t have a TTYLOMGWTHIT cable though I do have a fair few spare ethernet leads and this guide has been infinitely more useful than one saying to get another new cable.

In fact I wish this had been around at the release as it would have meant a lot less faffing around for someone like myself.

Avatar

Helpful Tip.

Avatar

I have tried this before without any luck, in fact I messed up my internet connection on my laptop. This his was clear and worked great.
(the serial port method worked but when i used nano to edit a file on the pi the cursor would get lost, this didn’t happen using this method).

THANKS!

Avatar

If your cursor gets lost when using a serial link, be aware you should set the terminal size. For example I use a 120 x 50 character size window in PuTTY, so I issue the commands ‘stty cols 120’ and ‘stty rows 50’ before editing, then the shell knows the size of my screen, and everything works properly.

Avatar

that’s handy to know – essential actually for those who have a Model A

Avatar

this was meant to go with JBeale’s comment via serial , dunno why it ended down here

Avatar

The comment-nesting seems to go wrong sometimes :-(

Avatar

Both methods are very useful depending on what you need. I’ve used the serial links, and it works nicely, although it was annoying that X11 didn’t work.

For me, having the network means I can run graphical programs (including Python which uses GUIs), and with the RPi home directory shared I can access all the files, even edit them directly on my machine. Some people have also got internet sharing working through it too, so they can update the Pi etc (I’ve not tried it yet, but probably worth having it setup in a cmdline.txt copy to switch to).

I’ve not got a Model A to try with, but I’ve brought a USB to LAN adaptor (for around the same cost as the TTL-Serial cable cost me), which should allow this method to work for a model A (plus I can use it on my laptop for an extra LAN port when I’m connected to a wired LAN but no extra ports available).

Avatar

If anyone with the distro/linux skills is reading….

I think it can be made even easier if the distro detects the direct connection and allocates an IP address (just like Windows/Mac/Other linux) to do when networking is set to automatic (always in the range 169.254.x.x).

If that was done, then you shouldn’t need to change anything on the SD-Card and you “should” be able to connect using just the host name “raspberrypi.local” or similar.

This would then provide the out of the box, “plug and play” solution which would be VERY helpful.

Avatar

Meltwater’s method works a treat – I tested it in preparation for the @Bristol event we attended at the weekend. It goes nicely hand in hand with a brief guide to using VNC I wrote, also for the event: http://www.rasptut.co.uk/files/raspberry-pi-vnc.php

Avatar

I do the exact same thing with my Pi and my old PowerBook. I made a custom, extra-short Cat5 Ethernet cable in order to reduce cable clutter, and I run the Pi off of one of the PowerBook’s USB ports, which seems to provide enough power if you have nothing else connected to the Pi. In addition to using SSH from the terminal, I also have TightVNCServer installed on the Pi and use the open-source VNC viewer, Chicken, to access the Pi’s desktop on my PowerBook. This setup really give you the best of everything from remote access to the Pi’s command interface, to access to the Pi’s GUI, and even Internet access!

A couple of tips:
1. (for Mac users) On some of the older versions of Mac OS X (not sure about the newer versions) you have to open up port 443 on the firewall (assuming your firewall is enabled, which it should be). Mac OS X’s Internet Connection Sharing runs on this port.
2. I’ve found that I have trouble running the desktop at anything above 16-bit, so the command that I use to start the VNC server on the Pi is, “tightvncserver :1 -geometry 1024×768 -depth 16”. Geometry can be set to whatever desktop resolution you want; I use 1024×768 because that’s the screen resolution of my PowerBook.

Avatar

Cody, try RealVNC Viewer instead of Chicken of the VNC. I find I get no colour corruption at 24-bit in the former where-as in the latter I too get issues.

Avatar

The Link Address is not available ??
Sorry, Maybe I can’t reach it from China…Can anyone upload it onto this website?? THX!

Avatar

Hello,

I recently ordered for a RPi with 512MB with berryboot configured on my SD card.I am able to SSH through putty but it asks for username and password when loin through the same.Have provided username as pi and password as raspberry but every time it says access denied.What can be the issue
?
Regards,
Vishal

Avatar

Does anyone know anything about doing this with windows 8? Thanks

Avatar

I had loads of problems linking my pi with my pc then I changed my grey Ethernet cable for a yellow one and it works fine now.

Avatar

I have a Macbook Air; so i will have to buy a ethernet adapter (one end usb and the other an output for a standard network cable. Then get network cable (doubled ended); put one side in my mac adapter and the other in the Pi.

Will this work? then i dont need to buy a wireless mouse, keyboard etc to programme it??

Avatar

This is a great keyboard to use with your raspberry pi.

https://www.youtube.com/watch?v=tXLjW9Po-9U

Leave a Comment

Comments are closed