When I'm working with my Raspberry Pi, I usually connect it to a screen using the HDMI cable. If I only need to modify one or two lines, I also use ssh.

When I'm running my Raspberry Pi outside of my room (for example, somewhere halfway across the city), I don't normally bring my screen around, and while I've managed to run a script on my Raspberry Pi which emails me its current IP address, I can't always ssh into the Pi unless it is on a static IP Address or I have control over the router. For instance I often want to work with my Pi in a public location (such as a cafe) but am unable to do so.

What are some of the solutions that you've used when using your Pi outside of your room / home?

I'm wondering whether there is a small LCD screen that I could bring around (just so I can access the command line), or whether anyone has had good experiences working with online services that provide static IPs. Of course, any other solution that works is welcome too.

  • 1
    I have not done it in years and years and so cannot provide a complete answer, but you might look into the use of a short crossover cable.
    – goldilocks
    Mar 19, 2014 at 17:05
  • You don't need a crossover cable to connect to your Pi directly. Simply set your Pi to have a static IP for eth0 and use remote desktop on anther PC to connect.
    – Rob_IGS
    Apr 30, 2014 at 19:27

3 Answers 3


You could leave it at your home and simply set a static IP for your Pi on your router. You would then open port 22 (SSH) on your router, pointed to your Pi.

Then, you can SSH in from wherever. You would need to modify your script to email you its public IP address, which isn't too hard. I had a script that would get my public IP, but I don't have it on me currently, as my Pi died :(

I have a backup somewhere and I'll post the command to get the IP as soon as I can.

EDIT: Here's the script:

body="$(curl ifconfig.me)"
mail [email protected] $body

You can swap out body for whatever variable you want, though $body works fine.

I'm guessing you've figured out your complexities for emailing from the command line and so I won't go into detail on that, as it would take ages, with configuring postfix and all that shtuffs. You obviously need to have mail or whatever you use to email set up, and then email yourself the $body variable.

You could configure a cron job to run this, say, every day or so, or whenever the Pi boots up, or whenever.

Then, you can check that email and grab the Pi's IP, and SSH in. Granted, you do need a system (anything with SSH or PuTTY installed would work, even a phone can work) to SSH with, but this would allow you to connect/use your Pi outside of your home without needing a screen.

Hope this helps somewhat. If you need help with setting Static IP, read here. I don't know why it got downvoted, it's a perfectly good answer and works, just ignore the downvote.


As far as the LCD goes, Adafruit has a great LCD that does require some soldering, but will allow you to put out the IP address of the Pi at boot. The tutorials associated with the LCD on the Adafruit learning pages walk through configuration. I use one for a wifi radio and once it boots to the login prompt (if you're watching a monitor) it displays the IP for a few seconds on the LCD, the same time it writes it to the console on the monitor (look right above the login prompt).

The other option is to statically assign an IP to the Pi and then assign an IP to a laptop/desktop in the same subnet and use either a crossover cable or a small switch, assuming you are using the ethernet.

Another more complex option would be to set the Pi up as an access point using a wifi dongle. The performance of this along side the Raspbian OS and other processes may drop but it would allow remote access, and fewer cables.


If you have a laptop, you could use that as dhcp server, (very easy to setup using Ubuntu, explanation will follow. Even using Ubuntu Live CD or usbstick.) in that case the laptop must have an ethernet/wifi connection just as the Pi.
Most hardware nowadays will auto neggotiate, so if using a cable, you dont need a special one, like a crosscable in the old days.
There are posabilities using a serial link thru the GPIO but thats where my knowledge stops...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.