• Complain

Warren W. Gay - Raspberry Pi System Software Reference

Here you can read online Warren W. Gay - Raspberry Pi System Software Reference full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Berkeley;CA, year: 2015, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Warren W. Gay Raspberry Pi System Software Reference
  • Book:
    Raspberry Pi System Software Reference
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2015
  • City:
    Berkeley;CA
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Raspberry Pi System Software Reference: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Raspberry Pi System Software Reference" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Warren W. Gay: author's other books


Who wrote Raspberry Pi System Software Reference? Find out the surname, the name of the author of the book and a list of all author's works by series.

Raspberry Pi System Software Reference — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Raspberry Pi System Software Reference" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Warren W. Gay 2014
Warren W. Gay Raspberry Pi System Software Reference 10.1007/978-1-4842-0796-3_1
1. Preparation
Warren W. Gay 1
(1)
Ontario, Canada
While it is assumed that youve already started with the Raspberry Pi, there may be a few things that you want to do before working through the rest of this book. For example, if you normally use a laptop or desktop computer, you may prefer to access your Pi from there. Consequently, some of the preparation in this chapter pertains to network access.
If you plan to do most or all of the projects in this book, I highly recommend using something like the Adafruit Pi Cobbler (covered later in this chapter). This hardware breaks out the GPIO lines in a way that you can access them on a breadboard. If youre industrious, you could build a prototyping station out of a block of wood. I took this approach but would buy the Adafruit Pi Cobbler if I were to do it again (this was tedious work).
Static IP Address
The standard Raspbian SD card image provides a capable Linux system, which when plugged into a network, uses DHCP to automatically assign an IP address to it. If youd like to connect to it remotely from a desktop or laptop, then the dynamic IP address that DHCP assigns is problematic.
There are downloadable Windows programs for scanning the network. If you are using a Linux or Mac host, you can use Nmap to scan for it. The following is an example session from a MacBook Pro, using the MacPorts collection nmap command. Here a range of IP addresses are scanned from 1254:
$ sudo nmap sP 192.168.0.1
Starting Nmap 6.25 ( http://nmap.org ) at 2013 14 19:12 EDT
...
Nmap scan report for mac (192.168.0.129)
Host is up.
Nmap scan report for rasp (192.168.0.132)
Host is up (0.00071s latency).
MAC Address : B8:27:EB:2B:69:E8 (Raspberry Pi Foundation)
Nmap done : 254 IP addresses (6 hosts up) scanned in 6.01 seconds
$
In this example, the Raspberry Pi is clearly identified on 192.168.0.132, complete with its MAC address. While this discovery approach works, it takes time and is inconvenient.
If youd prefer to change your Raspberry Pi to use a static IP address, you can find instructions in the Wired Ethernet section in 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@rasps 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 Ill 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, Ive specified the Macs IP address (alternatively, an /etc/hosts name could be used) and pointed the Raspberry Pi to use the Macs 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 doesnt give you graphical access to the Pis desktop, but for developers, SSH is often adequate. If you want remote graphical access to the Raspberrys desktop, see the next section, where VNC is introduced.
VNC
If youre already using a laptop or your favorite desktop computer, you can conveniently access your Raspberry Pis graphical desktop over the network. Once the Raspberry Pis VNC server is installed, all you need is a VNC client on your accessing computer. Once this is available, you no longer need a keyboard, mouse, or HDMI display device connected to the Raspberry Pi. Simply power up the Pi on your workbench, with a network cable plugged into it.
You can easily install the VNC server software on the Pi at the cost of about 10.4 MB in the root file system. The command to initiate the download and installation is as follows:
$ sudo aptget install tightvncserver
After the software is installed, the only remaining step is to configure your access to the desktop. The vncserver command starts up a server, after which you can connect remotely to it.
Using SSH to log in on the Raspberry Pi, type the following command:
$ vncserver :1 geometry 1024x740 depth 16 pixelformat rgb565
You will require a password to access your desktop.
Password:
Verify:
Would you like to enter a viewonly password (y/n ) ? n
New 'X' desktop is rasp:1
Creating default startup script/home/pi/.vnc/xstartup Starting applications specified in/home/pi/.vnc/xstartup
Log file is/home/pi/.vnc/rasp:1.log
$
The password prompts are presented only the first time that you start the VNC server.
Display Number
In the vncserver command just shown, the first argument identifies the display number. Your normal Raspberry Pi X-Window desktop is on display :0 . So when you start up a VNC server, choose a new unique display number like :1 . It doesnt have to be the number 1. To a limited degree, you can run multiple VNC servers if you find that useful. For example, you might choose to start another VNC server on :2 with a different display resolution.
Geometry
The -geometry 1024x740 argument configures the VNC servers resolution in pixels. This examples resolution is unusual in that normally 1024768 would be used for a display resolution, a common geometry choice for monitors. But this need not be tied to a physical monitor resolution. I chose the unusual height of 740 to prevent the VNC client program from using scrollbars (on a Mac). Some experimentation may be required to find the best geometry to use.
Depth
The -depth 16 argument is the pixel-depth specification. Higher depths are possible, but the resulting additional network trafficc might curb your enthusiasm.
Pixel Format
The last command-line argument given is -pixelformat rgb565 . This particular example specifies that each pixel is 5 bits, 6 bits, 5 bitsfor red, green and blue, respectively.
Password Setup
To keep unauthorized people from accessing your VNC server, a password is accepted from you when you start the server for the first time. The password chosen can be changed later with the vncpasswd command.
Server Startup
If you often use VNC, you may want to define a personal script or alias to start it on demand. Alternatively, have it started automatically by the Raspberry Pi as part of the Linux initialization. See for more information about initialization scripts.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Raspberry Pi System Software Reference»

Look at similar books to Raspberry Pi System Software Reference. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Raspberry Pi System Software Reference»

Discussion, reviews of the book Raspberry Pi System Software Reference and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.