A Bootable Greeting For The Xenomorph In Your Life

When he needed a gift for his Alien superfan friend, [Stephen Brennan] decided the best way to put his unique set of skills to use would be to create a bootable Linux operating system that captures the sights and sounds of the Nostromo’s retro-futuristic computer systems. We could all use a friend like that.

Even if would never occur to you gift somebody a bootable flash drive, there’s a wealth of information in this blog post about Linux customization which could be useful for all sorts of projects. From creating a bootsplash image to automatically starting up a minimalistic windowing environment so a single graphical application takes center stage.

Whether you’re looking to tweak your desktop machine or build a Raspberry Pi kiosk, the commands and tips that [Stephen] shows off are sure to be interesting for anyone who’s not quite satisfied with how their Linux distribution of choice looks “out of the box”.

But there’s more to this project than a custom wallpaper and some retro fonts. [Stephen] actually took the time to create a facsimile of the “Personal Terminal” computer interface shown in the recent Alien: Isolation game in C using ncurses. The resulting program, aptly named “alien-console”, is released under the BSD license and is flexible enough that you could either use it as a base to build your own cyberpunk UI, or just load it up with custom text files and use it on your cyberdeck as-is.

Finally, to really sell the Alien feel, [Stephen] went through and ripped various audio clips from the film and wove them into the OS so it would make the movie-appropriate boops and beeps. He even included a track of the Nostromo’s ambient engine noise for proper immersion. But perhaps our favorite trick is the use of the sleep command to artificially slow down the terminal and give everything a bit more “weight”. After all, flying a pretend starship should feel like serious business.

Open Hardware Board For Robust USB Power Monitoring

We’ve all seen the little USB power meters that have become popular since nearly every portable device has adopted some variation of USB for charging. Placed between the power source and the device under test, they allow you to see voltage and current in real time. Perfect for determining how long you’ll be able to run a USB powered device on batteries, or finding out if a USB power supply has enough current to do the business.

[Jonas Persson] liked the idea of these cheap little gadgets, but wanted something a bit more scientific. His design, which he refers to as UPM, is essentially a “smart” version of those ubiquitous USB gadgets. Instead of just showing the data on a little LCD screen, it can now be viewed on the computer and analyzed. His little gadget even allows you to cut power to the device under test, potentially allowing for automated testing of things such as inrush current.

Essentially the UPM works in much the same way as the simple USB meters: one side of the device goes towards the upstream power source, and the device under test plugs into the other side. Between the two devices is a 16 bit ADC and differential amplifier which measures the voltage and current. There’s a header on the board which connects to the ADC if you wanted to connect the UPM to an external microcontroller or other data logging device.

But most likely you would be using the internal microcontroller to analyze the output of the ADC over I2C, which [Jonas] very cleverly connected to the upstream port with an integrated USB hub. One side of the hub goes off to the device being tested, and the other to the microcontroller. So the host device will see both the UPM’s integrated microcontroller and the target device at the same time. From there, you can use the ncurses user interface to monitor and control the device in real-time.

While the hardware looks more or less finished, [Jonas] has some more plans for the software side of UPM, including support for remote control and monitoring over TCP/IP as well as robust logging capabilities. This is definitely a very interesting project, and we’re excited to see it develop further.

In the past we’ve seen homebrew USB power meter builds, and even commercial offerings which boasted computer-based logging and analysis, so it was only a matter of time before somebody combined them into one.

Linux Fu: Controlling The Terminal

A Linux terminal has a lot more features than the TeleType of yore. On a TeleType, text spews out and scrolls up and is gone forever. A real terminal can use escape characters to do navigate around and emulate most of what you like about GUIs. However, doing this at the lowest level is a chore and limits portability. Luckily, all the hard work has already been done.

First, there’s a large database of terminal capabilities available for you to use: terminfo.  And in addition, there’s a high-level library called curses or ncurses that simplifies writing programs to control the terminal display. Digging deep into every nook and cranny of ncurses could take years. Instead, I’m going to talk about using a program that comes with ncurses to control the terminal, called tput. Using these two commands, you can figure out what kind of terminal you’re dealing with, and then manipulate it nearly to your heart’s content. Let’s get started!

Continue reading “Linux Fu: Controlling The Terminal”