Hardware Reference
In-Depth Information
If you'd prefer to change your Raspberry Pi to use a static IP address, you can find
instructions in the “Wired Ethernet” section in Chapter 7 of Raspberry Pi Hardware
Reference (Apress, 2014).
Using SSH
If you know the IP address of your Raspberry Pi or have the name registered in your hosts
file, you can log into it by using SSH. In this example, we log in as user pi on a host named
rasp (in this example, from a Mac):
$ ssh pi@rasp
pi@rasp's password:
Linux raspberrypi 3.2.27+ #250 PREEMPT ... armv6l
...
Last login : Fri Jan 18 22:19:50 2013 from 192.168.0.179
$
Files can also be copied to and from the Raspberry Pi, using the scp command. Do a
man scp on the Raspberry Pi to find out more.
It is possible to display X Window System (X-Window) graphics on your laptop/
desktop, if there is an X-Window server running on it. (Windows users can use Cygwin for
this, available from www.cygwin.com . ) Using Apple's OS X as an example, first configure
the security of your X-Window server to allow requests. Here I'll take the lazy approach of
allowing all hosts (performed on the Mac) by using the xhost command:
$ xhost +
access control disabled, clients can connect from any host
$
From the Raspberry Pi, connected through the SSH session, we can launch Xpdf, so
that it opens a window on the Mac:
$ export DISPLAY=192.168.0.179:0
$ xpdf &
Here, I've specified the Mac's IP address (alternatively, an /etc/hosts name could
be used) and pointed the Raspberry Pi to use the Mac's display number :0 . Then we run
the xpdf command in the background, so that we can continue to issue commands in the
current SSH session. In the meantime, the Xpdf window will open on the Mac, while the
Xpdf program runs on the Raspberry Pi.
This doesn't give you graphical access to the Pi's desktop, but for developers, SSH is
often adequate. If you want remote graphical access to the Raspberry's desktop, see the
next section, where VNC is introduced.
 
Search WWH ::




Custom Search