Using Your BeagleBone Black as a Desktop Computer - Turning Your BeagleBone into a Desktop Computer - BeagleBone For Dummies (2015)

BeagleBone For Dummies (2015)

Part V

Turning Your BeagleBone into a Desktop Computer

Visit www.dummies.com/cheatsheet/beaglebone to discover ways to do more with your BeagleBone.

In this part …

· Gathering all the peripherals and turning your BeagleBone Black into a desktop computer

· Discovering the BeagleBone Black’s desktop features

· Understanding how the World Wide Web works: HTML, CSS and JavaScript

· Creating your own website and publishing it for the world to see

Chapter 12

Using Your BeagleBone Black as a Desktop Computer

In This Chapter

Setting up the peripherals and booting

Revisiting the Linux Terminal

Navigating the desktop environment

Changing the look and feel of the desktop environment

Managing files and browsing the web

Terminating an LXDE session

Your BeagleBone Black definitely doesn’t look like a regular computer. You might be wondering, “How can such a small device be compared to a laptop or a desktop computer?” Don’t let that tiny board fool you. It’s quite capable of doing tasks and projects that your computer can’t do.

This chapter explains how you can connect a few peripherals to your BeagleBone Black and turn it into a desktop computer. It probably won’t be as fast as your computer, but it still can be quite fun to play with.

Getting Started

The default graphical user interface (GUI) used for the BeagleBone Black is LXDE, which stands for lightweight X11 desktop environment. It’s part of the Debian Wheezy distribution, and it’s one of the best solutions for the BeagleBone Black because it’s optimized for processor and memory use. It’s a lightweight GUI.

Before you start connecting all your peripherals, keep in mind that this chapter is specifically about the BeagleBone Black. The Original BeagleBone doesn’t support an HDMI output. If you purchase an LCD cape (such as the one shown in Figure 12-1) for your Original BeagleBone, however, you can still do the project in this chapter. You can also use the BeagleBone Black with it, if you prefer it that way. The LCD capes you can choose among have slightly different configurations, but they all come with documentation that explains exactly how to use them. When you get your BeagleBone with an LCD cape up and running, the desktop environment is exactly the same as we show you throughout this chapter, so you can easily follow along.

Figure 12-1: Original BeagleBone with an LCD cape.

Connecting the Peripherals and Booting Up

Most peripherals and cables required for this chapter are pretty standard. You may already have most of them, and those that you don’t have are easy to acquire. You may need the following list of components:

· Micro HDMI cable

· USB hub

· Keyboard and mouse

· Ethernet cable

· Power adapter

Figure 12-2 shows where you connect each of the peripherals on the BeagleBone Black.

Figure 12-2: BeagleBone Black’s peripheral connection locations.

We assume that at this point, you’ve installed the latest image of the Debian operating system in your BeagleBone Black’s eMMC memory or on a microSD card that’s inserted into your BeagleBone. If that’s not the case, see Chapter 2 for instructions.

Make sure that your BeagleBone Black is properly updated and upgraded. It’s a good idea to connect to it through Secure Shell (SSH) and run the following on the command line:

sudo apt-get update && sudo apt-get upgrade

Connecting a Micro HDMI cable or DVI display

HDMI (High-Definition Multimedia Interface) displays have replaced DVI (Digital Visual Interface) displays. Although many DVI displays are still being used for many applications, the trend has been to shift to HDMI. The BeagleBone supports only Micro HDMI output, but if you have an adapter that can convert DVI to HDMI, you can repurpose an old DVI display. If you have an active HDMI converter, make sure that it has an external power source.

We recommend using a Micro HDMI cable with an HDMI display. Some DVI displays won’t be compatible with your BeagleBone Black, and ultimately, a DVI display may not display anything in your screen. You could spend a lot of time trying to figure out the problem, only to realize that the screen you used isn’t compatible with your BeagleBone Black.

Connecting a USB hub, keyboard, and mouse

Because the BeagleBone Black offers only one USB host slot, you must use a USB hub to plug in more than a single USB peripheral. You can get an inexpensive hub like the one shown in Figure 12-3 at most electronics or computer stores. To use the BeagleBone Black as a desktop computer, you need to connect a USB keyboard and mouse to it.

Figure 12-3: A USB hub.


The virtual keyboard alternative

If you currently don’t have a USB hub and/or a keyboard, but you want to use the BeagleBone as a desktop computer as soon as possible, you can plug the mouse into the USB port of the BeagleBone and download a virtual keyboard. This approach isn’t optimal, but it’s a good short-term solution. You download the keyboard by typing the following on the terminal:

sudo apt-get install Florence

This command installs a program named Florence that runs a virtual keyboard. You can install it via an SSH connection or by using the terminal on the Desktop environment, as shown in the section “Accessing the Terminal” later in this chapter.


Connecting to your router

Do you ever wonder whether it’s still possible to use a computer without an Internet connection? We can’t recall a time in the past few years that being on a computer without an Internet connection was an enjoyable experience. You can simply connect an Ethernet cable from your home router to the BeagleBone Black. After you’ve made that connection, you can easily install and update software or simply browse the web while using your BeagleBone Black as a desktop computer.

In Figure 12-4, you see an Ethernet cable connected to a BeagleBone Black.

Figure 12-4: Power adapter and Ethernet cable connected to a BeagleBone Black.

Connecting the power

Connecting both a mouse and a keyboard to the BeagleBone Black — as you do in this chapter — can be quite power-consuming, so the power provided by an USB cable may not be sufficient for everything to work smoothly. If you connect your BeagleBone Black via USB to your desktop or laptop computer and everything lights up, great! The BeagleBone Black is getting power. Some functions may be slow or won’t work properly, however. In the worst-case scenario, the peripherals may not even light up. To err on the side of caution, you should get a proper power adapter. That way, you can rest assured that your BeagleBone has all the energy necessary to run at its fullest speed and performance. In Figure 12-4, a 5V power source is connected to a BeagleBone Black.

Make sure your power adapter provides 5V — not more or less than that! Also, you need to ensure that the power adapter has the correct polarity on the jack: The center provides 5V, whereas the outer ring is ground (GND).

Booting up

As soon as you apply power to your BeagleBone Black, it automatically boots. After a few seconds, you should see the typical, awesome-looking beagle with its tongue sticking out as the background of the desktop (see Figure 12-5).

Figure 12-5: First look at your BeagleBone Black’s desktop environment.

If you don’t see anything on the display, try disconnecting everything and then redoing the connections described in the preceding sections. Then reboot your board. Also, if you’re using a TV set as your display, make sure that you change its source to HDMI.

If you can’t see the full image shown in Figure 12-5, or if it’s small in comparison with the screen, the problem has to do with your screen’s adjustment. Try going into your screen’s settings menu and adjusting the picture size until everything fits in a way that’s pleasant to you.

Accessing the Terminal

When you have your BeagleBone Black set up like a desktop computer, you can do all the regular things that you do on a computer — such as creating files and folders or running applications — without using the terminal. If you have the knack of the terminal, however, and know how much faster things can be done that way, you can easily access it.

Even if you prefer doing everything in the desktop environment and using the terminal as little as possible, you still need to use it for some tasks, such as installing and updating software.

To access the terminal, click the icon in the bottom-left corner of your screen. Mouse over to Accessories and click LXTerminal, as shown in Figure 12-6.

You can read more about how to use the Linux terminal in Chapter 4.

Figure 12-6: Opening the terminal.

Figure 12-7 shows an open terminal window. You can have several terminal windows and tabs open at the same time. Click File to generate a new terminal window or tab. You can also see the keyboard shortcuts that do the same things on the menu that appears when you click File.

Figure 12-7: The terminal application window.

During an LXDE session, you may need to resize or minimize your open windows, such as the terminal. You handle this task in much the same way as you would on a Mac or Windows computer.

In this terminal, you can do pretty much the same things you may have done in previous chapters, but here you’re controlling the BeagleBone directly rather than controlling it remotely through the use of SSH. If you’ve created the emailer.py program from Chapter 10, for example, you can run it from the terminal. Start by logging in as root and then changing to the Projects folder:

sudo su
cd /var/lib/cloud9/Projects
python emailing.py

To run the Python script from the terminal, simply type

python emailing.py

Chapter 4 mentions the nano terminal text editor, which you can use to view and edit your text files. When you use your BeagleBone Black to create a desktop environment, you have other text-editor options, such as Leafpad. If you are in the Projects folder, type the following command in the terminal:

leafpad emailing.py

Note that after you issue the command line to start Leafpad, the terminal becomes stuck; you can’t write anything in the terminal from that point on. (Well, you can, but it won’t have any effect.) That’s not a problem because you can have as many open terminal windows and tabs as you want, and only the one where you issued a command to run a program is stuck. Any other open tabs or terminal windows are still functional. When you want to terminate something that’s being run in the terminal, for example Leafpad, simply press Ctrl+C with the terminal window that’s running it open.

Ctrl+C is the Cancel command when you are operating the Terminal. If you need to copy something from the Terminal, the appropriate shortcut is Ctrl+Shift+C. You can use Ctrl+Shift+X for cutting and Ctrl+Shif+V for pasting.

If running the script failed, you probably don’t have the necessary permissions. When you use the BeagleBone as a desktop computer, you’re logged in as debian. Regardless, you can still run programs as root. Don’t forget to log in as root or to precede your commands with sudo:

sudo python /var/lib/cloud9/emailing.py

Roaming the Desktop Environment

Before you start managing files or browsing the web, you need to know how to navigate the environment. This section explains the components of the interface.

Viewing the Applications menu

Click the leftmost icon (the Applications menu) in the bottom-left corner of your screen; it sort of looks like a bird. The Applications menu appears, as shown in Figure 12-6 earlier in this chapter.

The Applications menu is more or less the same as the Windows Start menu. After you’ve installed more programs, other categories should appear, such as Graphics for image-related programs and Programming for tools used to write code. Whenever you mouse over one of these categories, you see a list of applications associated with the category, and you can click a program’s name to run it.

Using the task bar

At the bottom of the screen is a bar known as a panel. Most people, however, would call this the task bar. This bar provides both information and shortcuts for accessing your programs (see Figure 12-8).

Figure 12-8: The task bar.

From left to right, the task bar displays the following things by default:

· Applications menu icon: You can read more about this menu on the previous section.

· Shortcut icons for programs: By default, the two shortcuts are for the File Manager and the web browser, but you can add other shortcuts. This is shown later in this chapter in the “Adding application shortcuts” section.

· Minimize-all button: This button minimizes all the windows that are open on your LXDE session.

· Buttons to change into different desktops: By default, there are two of them. You can read about using multiple desktops in the “Working with multiple desktops” section later in this chapter.

· All programs that you have currently running: Programs that are currently minimized have their names enclosed in brackets. In Figure 12-8, for example, [emailing.py] is a minimized Leafpad window.

· CPU Usage Monitor: The green graph displays the toll that your CPU is taking at the moment. If the CPU is currently hard at work, the rectangle is filled with green. If you just started a processor-heavy program, several peaks show up at the rightmost side. Note that this graph runs from right to left, displaying the newest data on the right.

· Information about network connection: Mousing over this icon provides information regarding your network connection. You can double-click it to manage your available connections.

· Digital clock: The clock displays the current time. When you mouse over the time, the date and day of the week are displayed.

· ScreenLock button: At the time this book was written, that button was buggy and wouldn’t work. When the bugs are fixed, clicking the icon locks the screen so that the screen saver displays and you have to type a password when you want to return to work.

· Logout button: When you click it, a new window opens so you can shut down, reboot, or log out of the current session.

Changing icon settings

Save for the CPU Usage Monitor, you can right-click all icons on the task bar to alter their settings, as you see in Figure 12-9.

Figure 12-9: Changing the settings of an icon on the task bar.

Adding and removing plug-ins

In Figure 12-9 you also see an option to add and remove panel items. When you choose this option, the Panel Preferences dialog box opens (see Figure 12-10). Click the Add button in the Panel Preferences dialog box to see another window that features several plug-ins that you can add to the task bar. To add a plug-in, click the name of the plug-in and then click Add.

Figure 12-10: Adding a plug-in to the task bar.

To remove a plug-in from the task bar, right-click it. You see the menu in Figure 12-9. Click Remove “plug-in name” (where plug-in name is the actual name of the plug-in) from Panel to remove the plug-in.

Adding application shortcuts

It’s important to note that the previous section explains how to add plug-ins not shortcuts for applications. To add an application shortcut, you use the Application Launch Bar plug-in that’s on the task bar by default; it’s next to the Applications menu icon. Follow these steps to add a shortcut icon to the task bar:

1. Right-click the Application Launch Bar plug-in icon, and choose Settings from the shortcut menu.

The Application Launch Bar dialog box opens (see Figure 12-11). On the left side, you see the applications for which you already have shortcuts.

2. From the list on the right side of the Application Launch Bar dialog box, select the application for which you want to create a shortcut.

All applications you currently have on your BeagleBone are listed, separated by category.

3. Click the Add button.

Figure 12-11: Adding a shortcut for an application on the task bar.

Adding task bars

You can add more task bars to your screen. Right-click anywhere on the current task bar and choose Create New Panel from the shortcut menu. A dialog box opens that enables you to choose the new task bar’s position and size. You can also adjust its appearance and designate the plug-ins you want it to feature.

Working with multiple desktops

Linux systems in general allow you to use multiple desktops on the same monitor. Having multiple desktops open is handy for keeping things organized and doing tasks in parallel. There are several ways to change between desktops. For one, you can click the desktop buttons described in the preceding section (refer to Figure 12-8). The blue rectangle is the active desktop. To change to the other one, simply click the gray rectangle.

On the icons for the desktops, the smaller rectangle shows the windows that are open and where on the screen they are. In the case of Figure 12-8, all the windows are in the center of the screen, and the second desktop doesn’t have any window open.

Even if you prefer using a single desktop, it’s good to know about the desktop icons on the task bar. If you unknowingly change from the active desktop to the other desktop, and it looks as though all your work has disappeared in the blink of an eye, just click the other desktop icon to return to the desktop where you were working.

The two desktops are completely independent, so you can customize each one, with different icons on the desktop, different shortcuts, and different themes. You can also have a program running on one desktop but not on the other.

This feature can be really, really useful sometimes. For instance, you could use one desktop for work — featuring programming applications, documentation and a few folders with all your scripts — and another for play — featuring programs for media playing and/or some videogames. If you are working on something that requires both research and development, you could use Desktop 1 for all the websites, datasheets, and any kind of documentation necessary and Desktop 2 for writing the code.

To add a desktop, right-click the Desktop Pager plug-in — that’s where the icons for choosing between each desktop are — and choose Desktop Pager Settings from the shortcut menu. A window opens, in which you can choose the number of desktops and assign them names.

To move a running program from one desktop to the other, simply right-click the application’s title bar and choose Send to Desktop from the shortcut menu. You can choose which desktop you want the application to go to, and you can even send it to all desktops. If you drag the application window to either side of the screen, the application is sent to the next desktop.

You can have as many desktops as you want, but don’t push the BeagleBone too hard. Even though it’s quite powerful for its size, it’s still a system with limited resources.

Customizing the BeagleBone

You use the Preferences tab of the Applications menu to set up the BeagleBone desktop environment in a way that’s comfortable, good-looking, and easy to use.

Customizing the desktop appearance

To customize your desktop, choose Applications⇒Preferences⇒ Openbox Configuration Manager. After a second or two, you see the Openbox Configuration Manager, which includes many customization options (see Figure 12-12).

Figure 12-12: The Openbox Configuration Manager.

With the configuration manager, you can change pretty much every single thing about the appearance of your desktop. Using the Theme tab, you can change the theme to one of the many predefined themes or installing themes that you fetch from the Internet. With the Appearance tab, you can change the font of all text that appears in your windows, such as the title, menu headers, and menu items.

You can also customize your windows, mouse, and the margins of the desktop. With the Desktops tab, you can change the names of your desktops to something that makes more sense.

These examples just scratch the surface of the customization you can do. Play around with the settings on the different tabs until you get the style that you prefer. Don’t worry — it’s impossible to break anything by merely changing its appearance.

Choosing a screen saver

On the Preferences tab, you can choose the Screensaver option to not only change your screen saver, but also define several parameters for it, such as the time it takes for the screen to lock and the time it takes for the screen-saver animation to restart.

You can choose among plenty of screen savers and modes. If you prefer not to use a screen saver, you can disable the feature or just have a blank screen.

Creating icons on the desktop

Apart from that awesome-looking beagle on the desktop, the screen looks kind of bland, doesn’t it? To make your desktop look more like what you may be used to on a typical computer, you can add a few icons for applications, folders, and files that you use frequently.

First, you create shortcuts for applications on your desktop by following these steps:

1. Click the Applications menu icon for in the lower-left corner of your screen.

2. Mouse over to the application you want to have on the desktop and right-click it.

3. Select Add to Desktop as shown in Figure 12-13.

Figure 12-13: Adding shortcuts for applications on the desktop.

In several chapters of this book, you use the Projects folder quite a lot. If you’ve already created it when going through other chapters, then having it on the desktop would be convenient. Normally, you could add a folder to the desktop through standard drag-and-drop or copy-and-paste procedures (similar to what you’d do on a Windows or Mac computer).

Because the Projects folder isn’t below /home/debian, however, you don’t have the necessary permissions to move it around by standard means. Generally, any folder that isn’t below /home/debian has only execute and read permission for users other than the administrator of the system, root, which means that although you can open the folder and see its contents, you can’t edit or move the folder or its contents unless you’re logged in as root. To move the Projects folder, use the following steps:

1. Start the terminal and log in as root, as follows:

sudo su

Keep in mind that you’re logged in as root only in the terminal. Logging in as superuser doesn’t give you root permissions in the desktop environment — only on the command line.

2. Copy the Projects folder to the desktop.

You have to do this recursively because other files are inside the Projects folder. Consequently, you use the -r option:

cp -r /var/lib/cloud9/Projects /home/debian/Desktop

The Projects folder should immediately show up on your desktop. You still don’t have permission to see or change any of the files within it, though.

3. Add read and write permission for all, doing so recursively to the entire folder by typing the following command:

chmod -R a+rw Projects

Some commands use-r for the recursive option, whereas others use -R. The cp and chmod commands used in these steps are good examples. Using the wrong case is often a source of errors.

You should now be able to access and alter any files in your Projects folder within the desktop environment.

To change to the regular user again while you’re in the terminal emulator, type login <username> and then enter a password. The default username is debian, and the default password is temppwd.

If you’re unsure about the concepts of permissions, root and terminal commands, you should check Chapter 4. You can also read how to change the username and password of your BeagleBone’s regular user in Chapter 4.

Changing the desktop background

You can search for backgrounds to download from the Internet. Alternatively, you can use a background from your usual computer by transferring it to the BeagleBone on a USB drive. The "Accessing external storage devices" section explains how to transfer a file from a USB drive. We challenge you to find a desktop background that looks cooler than that dog, though!

After you download or copy the background you want to use, follow these steps to change the background:

1. Right-click any empty spot on the desktop, and choose Desktop Preferences from the shortcut menu.

2. Make your selections for customizing your desktop (see Figure 12-14).

Figure 12-14: The Desktop Preferences dialog box.

Using the File Manager

The File Manager (see Figure 12-15) is the tool you use to manage your files. (Whew, didn’t see that one coming!) Chapter 4 explains how to create directories, rename and copy files, and so on by using command-line options while controlling the BeagleBone remotely through SSH, but you can do those things with a more familiar approach by using the File Manager. If you prefer, you can still use the command line, naturally.

The File Manager bears many striking resemblances to Windows’s File Explorer. You do things such as selecting and copying files in the exact same way. Additionally, most of the keyboard shortcuts available in Windows and Mac OS X are supported by LXDE. The widely known Ctrl+C and Ctrl+V shortcuts are available for copying and pasting files and folders, for example.

Even though using the terminal may seem alien and difficult at first, after you get the gist of it, it greatly speeds the process of managing files. Being a Linux Shell ninja is not about style alone. The terminal really does have several advantages; it just takes a while to get used to it.

Figure 12-15: The LXDE File Manager on the BeagleBone.

You start the File Manager by choosing Applications⇒Accessories or clicking its button in the bottom-left corner of the screen.

Navigating the File Manager

On the right side of Figure 12-15, shown earlier in this chapter, you see all files and folders within the open folder. You open folders and files by double-clicking them. Files open in the default application for that type of file. If Leafpad is your default text editor, for example, a .txt file would open in it.

In some cases, you may want to open a file with a different application. Take an .html file, for example. You would want to open it with a text editor to edit its contents and with your web browser so you can see the actual page. (This type of thing happens a lot in Chapter 15, which introduces HTML.) To open a file with an application other than the default, follow these steps:

1. Right-click the file, and choose Open With from the shortcut menu.

The Choose an Application dialog box opens, enabling you to choose the application you want to use to open the file (see Figure 12-16).

2. Click the application you want to use.

3. If you want this application to be the default application for that type of file, select the Set Selected Application as Default Action of This File Type box at the bottom of the dialog box.

Figure 12-16: Choosing an application to open a file.

On the left side of the File Manager window (refer to Figure 12-15) is the directory tree, which shows the parent folder of the current folder and all the folders above that. The root directory is also shown.


Geany

In Figure 12-16, the default application for opening Python scripts is set to be Geany. Geany is a helpful yet simple integrated development environment (IDE) for programming. Unlike Leafpad, but like Cloud9, it highlights different parts of code in different colors and provides several other useful tools, such as a terminal window in the IDE itself, akin to Cloud9. You can install it by typing the following command:

sudo apt-get install geany


Immediately above those directories, you can change what you want to be displayed. Instead of having the directory tree showing, for example, you could have Places showing. You can select between one or the other by pressing the arrow next to Directory Tree/Places (see Figure 12-15, earlier in this chapter). Figure 12-17 shows what you see when you have the Places displaying.

Figure 12-17: Displaying Places.

Places are special types of folders, and at least four are always available:

· debian is what could be called the main directory. Because you’re logged in as debian, this place is the only one where you have permission to create and edit files.

· Desktop , a folder inside debian, holds the files and folders that you can see on the desktop of your BeagleBone. It should be filled with documents and programs that you use frequently and want to have easy access to.

· Trash holds your deleted files and folders. Whenever you delete something (by selecting it and then pressing the Delete key), it’s not erased from your BeagleBone; it goes to the Trash folder. This is a good thing. If you change your mind about deleting something, you can just go to the Trash folder, right-click a file, and restore it from the shortcut menu. On the other hand, if you want to erase the files in the trash from your computer, just right-click the Trash icon and choose Empty Trash from the shortcut menu.

There’s no turning back after you choose the Empty Trash command! Your files are gone.

· Applications has all the applications on your BeagleBone, sorted by categories. Save for the Run and Logout buttons, it shows virtually the same things as the Applications menu.

Additionally, any mounted devices show up as places. When we captured Figure 12-17, for example, we had a LEXAR USB stick plugged into the USB hub. Bookmarked folders also appear as places.

Note that the File Manager has a similar design to that of a web browser. It features several familiar buttons, such as Home, Add Tab, and Bookmarks. You can also check your folder history and access a folder directly by typing the full path to a folder in the Path bar (labeled as Current Path in Figure 12-15), the same as you would do with a website’s address.

Creating blank files

To create a blank file, choose File⇒Create New⇒Blank File. You see a dialog box that prompts you to enter a name for the new file. If you change your mind about creating the file, you can click the Cancel button. Alternatively, you can right-click any empty space in the desired folder and choose Create New from the shortcut menu.

A cool thing about Linux systems is that they let you turn a blank file into pretty much anything. That blank file could easily be a program in Python, C, or JavaScript; an HTML file; or a shell script. It could also merely be a text file, which is the default. The extension you assign when you save the file is what defines its application.

Creating new folders

Folders are great ways to keep your files organized. You can have all the programs, files, and folders structured in a way that feels comfortable for you.

Creating a new folder is much like creating a blank file. Choose File⇒Create New⇒Folder, or right-click an empty space and choose Create New from the shortcut menu. In the dialog box that opens, type the name you want to use for the folder you’re creating.

You don’t have the necessary permission to create files and folders in other folders except those that are inside the debian directory unless you go through the terminal and are logged in as root.

Opening a folder in the terminal

A very useful option on the Tools menu is the Open Current Folder in Terminal option, which does exactly what its name suggests. This command enables you to use the Linux commands to make changes in the current folder. (Read Chapter 4 for more information about the Linux commands you can use.)

There are several advantages to using a terminal window:

· You can run scripts that you have in that folder by using the terminal.

· If you’ve mastered using the command line, you can do things much faster than you can by using the File Manager.

· Even though you’re not logged in as root in your session, you can issue root commands through the terminal. Simply precede each command with sudo.

The Tools menu also includes an Open Current Folder as Root command. Sometimes, though, this command doesn’t work properly until you add some extra features that aren’t enabled in the BeagleBone by default. In addition, being logged in as root is often somewhat dangerous, especially if you’re connected to a network. We think that anything that you want to do as root, you can achieve more easily and safely by using the terminal.

Accessing external storage devices

Any external USB storage device (such as an external hard drive or USB stick) that you plug in is automatically recognized by the BeagleBone. After you’ve plugged in a device, you see the window shown in Figure 12-18. Afterward, the device appears in Places (see LEXAR in Figure 12-17 earlier in this chapter).

Figure 12-18: An external medium has been inserted.

Using the Task Manager

The CPU Usage Monitor on the task bar displays the heavy lifting that the BeagleBone’s processor is doing. If the graph shows many green peaks or just a flat bar, the processor is hard at work, and the BeagleBone may be slow for the time being. Maybe it’s still loading a program, or maybe you’re running way too many programs.

The CPU Usage Monitor scrolls from right to left, which means that the green peaks on the right display the most recent data.

You can press Ctrl+Alt+Del to start the Task Manager, which shows which programs are currently running (see Figure 12-19). You can also open it through the Applications menu, under the category System Tools.

Figure 12-19: The Task Manager.

LXDE’s Task Manager may not come installed by default, in which case, pressing Ctrl+Alt+Del won’t work. But this is Linux, which means that installing software is a breeze. With an Internet connection, you install the Task Manager, by typing the following in the terminal:

sudo apt-get install lxtask

The Task Manager shows all the processes that are currently running on the BeagleBone, as well as the CPU and memory use. If a program isn’t responding, you can terminate it from the Task Manager, by right-clicking the program name and choosing Term from the shortcut menu. With this command you are politely asking the program to close, allowing it to shut down safely and closing all files and programs that depend on it. If the process is being stubborn, you can also use the rough method, which is to kill it. When you right-click a process and choose Kill from the shortcut menu, the program is terminated immediately, and some data may be lost.

Many processes shown in the Task Manager are probably alien to you, and some are necessary to run the board itself. Don’t play around with processes that you don’t recognize: You may crash the BeagleBone and corrupt some data. Additionally, be patient. Programs usually don’t crash; they just take a while to initiate. You should use the Task Manager to terminate or kill programs only as a last resort.

Browsing the Web

To browse the web, you need to start a web browser. Although several options do exist, the only one that comes installed by default on the BeagleBone is the Chromium web browser. To start it, you have two options:

· Click the task bar icon for the web browser in the bottom-left corner of the screen.

· Choose Applications⇒Internet⇒Chromium Web Browser.

Don’t forget to have your BeagleBone connected to the Internet before you launch the web browser. The “Connecting to your router” section explains how to have your BeagleBone connected to the Internet.

Figure 12-20 shows the Chromium web browser. It includes a toolbar with some useful buttons, as well as an address bar. Naturally, most of the web browser’s space is allocated for the web page itself.

Chromium is the open-source web browser that provides the source code for the widely known Google Chrome browser. If you normally use Google Chrome, you’ll feel just at home using Chromium.

Using the Customization menu

Figure 12-21 shows Chromium’s Customization menu, which lets you open new tabs, new windows, and Incognito windows, which are windows that don’t save the web pages that you visit in your history.

From the Customization menu, you can also access your bookmarks, check your recent tabs, and zoom the page. Several tools are available, such as Find and Print, and you can check your history and your recent downloads by choosing their commands.

Figure 12-20: The Chromium web browser.

Searching for web pages

Chromium’s default search engine is Google, which should meet most of your needs as far as search engines are concerned. To search for something on the Internet, you can simply type what you’re looking for in the address bar. If you type something other than a web-page address, the browser treats the text as a Google search.

If you prefer another search engine, you can change it by choosing Customization⇒Settings and changing the default search engine in the Search section of the resulting dialog box.

Figure 12-21: Chromium’s Customization menu.

Finding words within web pages

To find words on the web page you’re currently visiting, press Ctrl+F. The Find bar appears (refer to Figure 12-20). When it does, type the word or group of words that you want to search for. Found instances of the search item are highlighted on the web page, and you can use the up and down arrows on the Find bar to move to the next or previous match.

The Find tool of Chromium’s web browser is not case-sensitive.

When your search item includes more than one word, Find tries to locate a phrase that looks exactly the way you typed it.

Using tabbed browsing

Figure 12-20 shows three open tabs: Rui’s website, beagleboard.org, and our reliable Cloud9 IDE. Having multiple tabs open enables you to change between open web pages quickly and easily.

To add a new tab, click the New Tab button, choose Customization⇒New Tab, or you press Ctrl+T. The page that opens includes links to some of your most-visited web pages, as well as a Google search bar. Additionally, if you want to open a web page by clicking a hyperlink, but you want it to be opened on a new tab, you can click the hyperlink while pressing and holding the Ctrl key.

To move among the different tabs, click the one you want to go to. To close a tab, click the X button next to its name. If you close a tab by mistake and want to reopen it, choose Customization⇒Recent Tabs. You see a list of the tabs you’ve had open recently; click one to reopen it.

You have several useful keyboard shortcuts for navigating tabs:

· Ctrl+Tab cycles through the tabs in order from left to right.

· Ctrl+Shift+Tab cycles through the tabs from right to left.

· Ctrl+number takes you to a specific tab. If you have more than nine tabs open, Ctrl+9 always takes you to the last tab.

Be careful about having too many tabs open! The BeagleBone’s CPU may not be able to handle that much data.

Adding and using bookmarks

Adding bookmarks is a great way to open your favorite web pages easily. When you click the star next to the address bar (refer to Figure 12-20), the Bookmark dialog box pops up (see Figure 12-22). You can change the name of the bookmark and designate the folder in which the bookmark will be stored.

Figure 12-22: Adding a bookmark.

If you have a Google account, you can sign in to it to have your bookmarks shared across all your computers.

To see your bookmarks, choose Customization⇒Bookmarks. You can also check the Show Bookmarks Bar box that appears in the Bookmarks menu to have all your bookmarks appear below the address bar in the Chromium web browser.

Changing settings

Naturally, several settings are defined by default in Chromium, such as the search engine. You can change these settings by choosing Customization⇒Settings.

You can set your preferences for how a new page opens in Chromium. Choose Customization⇒Settings. Under On startup (see Figure 12-23), you have the following options to specify what should happen when you start Chromium:

· Open the New Tab Page: This option starts Chromium with blank page featuring a Google search bar and links to your most frequented websites. This is the default setting.

· Continue Where I Left Off: the page restores to where you left off the last time you used the browser. The tabs you had open previously reopen.

· Open a Specific Page or Set of Pages: You can define a set of pages automatically open when you start Chromium. For example, you might choose to have your email service, Facebook page, and favorite newspaper open.

You can choose a theme for Chromium. In the Appearance section (see Figure 12-23), you can choose to show the Home button, which appears next to the Reload button and takes you back to your home page. When you check that box, you have the option to define a home page.

When you click the Show Advanced Settings link, even more options show up. In the advanced settings, there are three different sections that deserve special attention.

· With the Privacy section you activate services that protect you while you’re on the Internet.

· With the Web Content section you choose the zoom of your web pages and the size of the text on the pages.

· With the Languages section you choose which language(s) your spell-checker should check for errors when you are writing something on the browser. Additionally, you can check a box to have the browser offer the possibility to translate a page whenever a page isn’t on its default language.

There are plenty of settings for you to explore; feel free to nose around until Chromium is customized in a way you feel comfortable with.

Figure 12-23: The Settings menu on Chromium.

Shutting Down, Rebooting, and Logging Off

In an LXDE session, you can shut down your BeagleBone, reboot it, or temporarily log off so that no one messes around with the computer while you’re away. To do so, you have to click the green guy running out of a door. Somehow, he manages to be in two places at the same time, and as such you have two ways to access the logout option:

· Choose Applications⇒Logout.

· Click the Logout icon in the bottom-right corner of the screen.

You see the window shown in Figure 12-24.

Figure 12-24: Terminating an LXDE session.


Finding out more about the BeagleBone’s desktop environment

The best way to find out how to use the BeagleBone’s desktop environment is simply to explore. If you want to get some more specific instruction, try doing an Internet search. In your search, you should include the specific thing you are looking for and one of the following keywords:

· BeagleBone, which is the computer you’re using

· Debian/Debian Wheezy, which is the Linux distribution that’s running on the BeagleBone

· LXDE, which is the GUI you’re using

· Openbox, which is the window manager of your desktop environment

· PCManFM, which is the standard file manager program for LXDE

If you want to find out how to customize the digital clock on the task bar, for example, you could try searching for LXDE digital clock.

Naturally, you can also search for useful and interesting software packages that you can use on your BeagleBone. Many people have posted lists on the Internet of software packages that they consider to be useful, fun, or even essential. At www.dummies.com/extras/beaglebone you can also find a list of some software packages.


You can choose to shut down the BeagleBone completely, reboot it, or merely log out. If you log out, you’re prompted to enter your username and password when you return to the computer.

The username is debian, and the default password is temppwd.

Sometimes, the reboot option doesn’t work due to lack of authorization to use that command.

You can also shut down and reboot from the command line by using sudo shutdown -h now and sudo reboot.