Linux...Do It for the Children

A rundown of some fun and educational Linux software for kids.

I'm probably going to regret that title. I've been making fun of those words, "do it for the children" for years. It's one of those "reasons" people turn to when all else has failed in terms of getting you to sign on to whatever lifestyle, agenda, law, changes to food—you name it. Hearing those words draws the Spock eyebrow lift out of me faster than you can say, "fascinating".

Okay, pretend that I didn't start this article with that comment. Let's try this instead.

As I write this, my youngest son is 11 years old. He has grown up in a magical world of electronics that delivers what he wants to watch when he wants to watch it. Access to the web is something he always has known. Until very recently, he never had seen television with commercials. A couple years ago, my wife and I thought it was something he should at least understand, so we turned to a live TV program for the first time in I don't know how long. He was not impressed with the interruptions. Now, with multiple Google Home units in the house, including one in his bedroom, the on-demand magic is pretty much complete.

He started playing video games when he was three and was scary good on my PS3 by the time he turned four. He started using a laptop when he was five, and that laptop ran Linux. I'm pretty sure he was using Kubuntu, but it might have been Linux Mint. Either way, it was a KDE Plasma desktop. In short, the world of tech is nothing new for him, and Linux is just what people run. His school has Chromebooks, and the few run-ins he's had with Windows left him cold.

Kids and Linux? Absolutely.

GCompris

Much earlier on, however, I took advantage of some of the simpler educational games available on Linux. One of my favorites is GCompris, an all-in-one collection of educational games for children, geared for ages two to ten (Figure 1). By the way, GCompris is pronounced like the French words, J'ai compris, and it literally means, "I have understood", paying homage to its educational focus. I've mentioned this one in the past, but GCompris is a living, breathing project, actively developed by the KDE community with a new release just this past month.

""

Figure 1. GCompris is a suite of educational games for kids.

When you start GCompris for the first time, it asks you for the language in which you wish to work. Along the top, an icon bar with animal characters provides a list of categories, such as reading, math, amusements, puzzles, computer skills, discovery activities and more. Clicking on any of those choices causes a list of related games or activities, also with colorful icons, to be displayed below. There can be quite a few activities per category, so you may need to scroll up and down to see them all. GCompris comes with more than 100 different activities, making it a must for your young penguinista.

Along the bottom is a smaller menu with some large icons related to the program itself including shutdown, information, help and settings. You can hide this by clicking on the bars at bottom left. By default, GCompris starts full screen. To force a resizable window view, use this command:


gcompris-qt -w

KTurtle

Once your kids are past their early years, they might find themselves wondering how to make their own games. This is when you introduce them to programming, of course. Not far beyond the basic computer skills training in GCompris, you might introduce them to KTurtle, a simple programming game based on Logo. I call it a game, but this is a real programming environment and a great place to start (Figure 2).

""

Figure 2. KTurtle Start Screen

On the left of the interface is the editor pane, where you type your Logo code. The language is simple and flexible, and it's able to work in the student's native language. In the middle is the canvas where the results of your code take place. The turtle icon drags a virtual pen that you can pick up and put down. When it's down and you tell it to move in one direction or another, it draws lines. For instance, look at the code below:


reset

repeat 3 {

forward 100

turnleft 120

}

The reset clears the canvas, assuming something already is there. Then, you enter a loop that repeats three times. Go forward 100, turn left 120 degrees, and repeat. The result is a triangle (Figure 3).

""

Figure 3. A Turtle Triangle

KTurtle comes with its own manual, which you can access from the Help menu along the top. To get started, several examples are included, and you can get to those by clicking File→Examples. If you want to get really fancy and see just how cool a turtle icon drawing lines can get, click File→"Get more examples" to download code from the internet (Figure 4). You can sort the list by rating or number of downloads. You also can search by name if you know what you're looking for. The "Sierpinski Triangle" and the "Fractal Tree" are both educational and fun to watch when you click "Run".

""

Figure 4. Installing other KTurtle programs. Under the main window, you can see the included instruction manual.

Scratch

Another great introduction to programming is the Scratch language, developed by the "Lifelong Kindergarten Group" at MIT, the Massachusetts Institute of Technology. You can find this one in your distribution's repository. I installed it with a simple sudo apt install scratch.

Scratch is a graphical programming language where you drag program blocks into an editor window. The blocks click into each other like digital LEGO blocks, and from those blocks, you can create wondrous things, like my son's "Cat Simulator" (Figure 5).

""

Figure 5. The cat simulator—it's like the real thing, only not.

The cat simulator includes background artwork that he created, sound clips (such as my son saying, "Down!" when the cat jumps up on things) and other silliness. When you start Scratch, you see a multi-paned window. On the far right and top is the "stage" or canvas on which your program visually executes. Below that is a window that shows the active "sprites" (or "costumes") in use on the stage. You can bring in additional sprites from several categories, many of which are included with the program (Figure 6).

""

Figure 6. Scratch Sprites, or Costumes

In the middle of the program is the editor window, into which you will drag blocks that will tell what backgrounds to load, what sprites to interact with, and what sounds to make. In all cases, you can create your own with the included editor—a simple but highly flexible paint program. You also can record sound clips, although again some are included with the package.

To the left of the editor window, the various command blocks are arranged in eight different categories, such as motion, looks, sound, variables and so on (Figure 7). The cool thing about Scratch is that you can experiment with making things happen by just dragging blocks and creating "scripts" for your "sprites"—for example, when you press the m key, play the "meow.wav" sound file. When you press another key, you can have the sprite move to a particular place, turn in a specific direction and move. When sprites collide or touch the edge of the screen (look in the "sensing" category), you drag other blocks into place to make other things happen. Everything that you'd expect in a programming language is here, including logical constructs like "if then else".

""

Figure 7. Scratch Command Block Categories and Sprite Scripts

OLPC and Sugar Labs' Sugar

Open-source proponents have long believed that free software can be a boon to children at every stage of development—both in terms of age and also financially. Not far from where I live, there's the "Computer Recycling Centre", where volunteers take old computers, fix them up, load up Linux (usually), and make them available to people who otherwise could not afford them.

One of the more interesting child-oriented open-source projects was OLPC, or "One Laptop Per Child". Much has been written about this bold and grand plan to create a small, insanely durable laptop, and to put untold numbers of these laptops into the hands of disadvantaged children around the world for $100 per laptop (Figure 8). The project never achieved its lofty goals for reasons that would fill a book, but it did leave some interesting DNA behind in the form of free software.

""

Figure 8. The OLPC XO-1 Laptop (Credit, Wikipedia "Fuse-Project"; upload to OLPC-Wiki: OLPC user "Walter" - http://wiki.laptop.org/go/Image:Green_and_white_machine.jpg)

Sugar is not an operating system; it's a simple and feather-light desktop environment, designed to be the interface to a Linux distribution that powered the OLPC computers. Under the surface of the current Sugar live distribution is Fedora. You can download and install the Sugar Labs ISO onto a USB stick and boot from it. If you want to get a feel for the lightness of being that is Sugar, it works like a charm when booted from a Raspberry Pi.

When SOAS (Sugar on a Stick) boots up, it asks for your name and takes you through a process of selecting a colorful icon to use to identify yourself. It then asks for your gender (you can pass if you so choose), and finally, it asks for your grade. That final choice starts at preschool, works its way through high school and (somewhat anticlimactically) ends at adult. I told it that I was in Grade 2.

Sugar is meant to be simple and unobtrusive. There are no stacking windows or objects to move around—what you might call the classic desktop metaphor. This does, strangely enough, add a level of confusion to working with the interface when you've grown up with what is thought of as a classic desktop (for example a Start menu, panels, status bars and so on). Instead, the Sugar desktop uses the concept of "Community". Press F1 to access your neighborhood (local network), F2 to jump to group activities (for example, classmates) and F3 to open your personal home screen. This is a circular palette from which you can choose whatever activity you desire (Figure 9). Hover over one of the icons, and a pop-up will tell you what it does.

""

Figure 9. The Sugar Interface Menu

Tons of activities are built in to Sugar: programming environments like Python and Logo, personal finance, journals, games, communications and more. There's even an ebook reader that ties in to the public domain collection at Feedbooks and the Internet Archive, from which you can download from a networked catalog of choices, such as action, science fiction, or juvenile.

Remember that this layout was designed to take maximum advantage of small, low-resolution screens, hence this no window design. To find out what you've got open and to switch between users, places or applications, press the F6 key to pull in a frame that surrounds the central activity (Figure 10). Along the top are places and activities, to the right are the people in your current group, to the left are places, and along the bottom, you'll see notifications and controls for network, volume and a handy way to take screenshots.

""

Figure 10. The Sugar "Desktop" Frame View

Look again, near the top on the right-hand side. Click the little stick figure there, and a drop-down menu will appear from which you can log out, shut down the computer, or change your personal preferences (Figure 11). What I'd like you to take from this particular screen is that Sugar, although designed with kids in mind—it was, after all, designed for the "One Laptop Per Child" initiative—isn't just for kids. Under the simple interface, there's a real operating system.

""

Figure 11. The Sugar User Settings Menu

As you can probably tell from the screenshots, I ran Sugar on a Stick from a virtual window using the ISO I downloaded. It was as simple as doing this:


qemu-system-x86_64 -enable-kvm -accel kvm -vga qxl -m 2048
↪-cdrom ./Fedora-SoaS-Live-x86_64-29-1.2.iso

Note that the above is all on one line. Since Sugar is a desktop environment, you also can just install it to your PC. As I am currently running Kubuntu (that might change by the time you read this), it was as simple as typing:


sudo apt install rdesktop xrdp sucrose

Yes, I know it's called Sugar, but the package name is sucrose. The first two packages are there because I want you to be able to run it in a virtual window, with your child's user name. Okay, now that you've got that installed, you can create a user for your child. Let's pretend you have a kid named Francois (hey, it could happen):


sudo adduser francois

Now, set up a default environment, in this case, "sugar", like this:


sudo su - francois -c 'echo sugar >> .xsession'

If you created your child's account using the adduser command, as above, the system will have asked you for some bits of information including a password. You'll need that for the next step:


rdesktop -g 1200x900 -u francois -p the_password 0

Obviously, the_password is the password you chose. This command will create a session on your current desktop using a 1200 by 900 geometry, logged in as your child. From here, you can experiment with the Sugar environment before you turn it over to your child. It's not complicated, but it's definitely different. The downside to this approach, running the Sugar environment as "just a desktop" versus actually downloading the Fedora Sugar spin, is that you aren't necessarily going to have all the apps loaded. You'll certainly get a feel for Sugar, but your main menu "wheel" will likely contain far fewer apps than what you see in the Sugar on a Stick distribution.

Oh, and remember the Scratch programming language from earlier in this article? Remember KTurtle before that? You can access an interesting hybrid version of the two called "Turtle Blocks" via Sugar (Figure 12).

""

Figure 12. Turtle Blocks, a Kind of Cross between Scratch and KTurtle (Logo).

Conclusion

There really is no downside to getting your kids started with a Linux system or desktop. The staggering amount of free software (gratis, not just libre) will keep them occupied and learning for many years to come. Oh, and there also are tons of games; you may have missed that with me concentrating on the whole learning aspect of things.

Speaking of years, Happy 25th Birthday, Linux Journal, and a great many more! I first started writing for the magazine back in 1999, and I am thrilled to have been part of the journey. I don't know whatever possessed you to let me into the writing room, but hey...party on, dudes!

Resources

Marcel Gagné is Writer and Free Thinker at Large. The Cooking With Linux guy. Ruggedly handsome! Science, Linux and technology geek. Occasionally opinionated. Always confused. Loves wine, food, music and the occasional single malt Scotch.

Load Disqus comments