Feed aggregator

Linux Thursday - Jan 4, 2019 - New Year Edition

Linux Journal - Mon, 01/07/2019 - 13:00

Please support Linux Journal by subscribing or becoming a patron.

Linux 5.0-rc1 Released, Scratch 3 and Raspberry Pi, Phoronix Test Suite 8.6-Spydeberg Milestone 1 Is Now Available, Elteria Adventures Coming to Linux and Chromium Now Supports VAAPI in Fedora

Linux Journal - Mon, 01/07/2019 - 08:27

News briefs for January 7, 2019.

Linux 5.0-rc1 was released yesterday. Linus Torvalds wrote: "The numbering change is not indicative of anything special. If you want to have an official reason, it's that I ran out of fingers and toes to count on, so 4.21 became 5.0. There's no nice git object numerology this time (we're _about_ 6.5M objects in the git repo), and there isn't any major particular feature that made for the release numbering either. Of course, depending on your particular interests, some people might well find a feature _they_ like so much that they think it can do as a reason for incrementing the major number. So go wild. Make up your own reason for why it's 5.0."

MIT recently released Scratch 3, the latest version of its visual programming language. The Raspberry Pi blog announced it has upgraded to make this a smooth transition for those who use its free project resources, "whether that be at a Code Club, CoderDojo, Raspberry Jam, or at home, so we've been busy upgrading our resources to work with Scratch 3". In addition, "Scratch 3 versions of all projects in the Code Club Scratch Modules 1–3 and the CoderDojo Scratch Sushi Cards are already live!" See the post for more details related to Scratch 3 on RPi.

Phoronix Test Suite 8.6-Spydeberg Milestone 1 is out. This is the first development snapshot for the "open-source, cross-platform benchmarking software release due out later in Q1". New features for the Phoronix Test Suite include updates for Microsoft Windows Server 2019 (and it'll be a fully supported platform as well), a new "new phoronix-test-suite compare-results-to-baseline sub-command for comparing two result files with treating the first argument as the performance baseline and providing various statistics off that", a "new ShowPostRunStatistics user configuration" and more. You can get the first development snapshot of Phoronix Test Suite 8.6 at GitHub.

Elteria Adventures is "an open-world RPG MMO with world-building features and it's coming to Linux". GamingOnLinux reports that the developer confirmed it will run on Linux, simply saying ""Yes it will. Also on Mac :)" Evidently the Steam page doesn't give many details on what the game will be like, but GamingOnLinux says "it sounds a bit like Minecraft mixed with an RPG and it has a bunch of platforming as the world is built across many floating islands".

The Chromium web browser in Fedora now has Video Acceleration API (VAAPI) support, making "video playback much smoother while using significantly less resources". Fedora is now the second distribution to include the VAAPI patch in its official Chromium package. See the Fedora Magazine post for more info.

News kernel Programming Scratch Raspberry Pi Phoronix gaming Chromium Fedora

IBM Began Buying Red Hat 20 Years Ago

Linux Journal - Mon, 01/07/2019 - 06:30
by Glyn Moody

How Big Blue became an open-source company.

News that IBM is buying Red Hat is, of course, a significant moment for the world of free software. It's further proof, as if any were needed, that open source has won, and that even the mighty Big Blue must make its obeisance. Admittedly, the company is not quite the behemoth it was back in the 20th century, when "nobody ever got fired for buying IBM". But it remains a benchmark for serious, mainstream—and yes, slightly boring—computing. Its acquisition of Red Hat for the not inconsiderable sum of $34 billion, therefore, proves that selling free stuff is now regarded as a completely normal business model, acknowledged by even the most conservative corporations.

Many interesting analyses have been and will be written about why IBM bought Red Hat, and what it means for open source, Red Hat, Ubuntu, cloud computing, IBM, Microsoft and Amazon, amongst other things. But one aspect of the deal people may have missed is that in an important sense, IBM actually began buying Red Hat 20 years ago. After all, $34 billion acquisitions do not spring fully formed out of nowhere. Reaching the point where IBM's management agreed it was the right thing to do required a journey. And, it was a particularly drawn-out and difficult journey, given IBM's starting point not just as the embodiment of traditional proprietary computing, but its very inventor.

Even the longest journey begins with a single step, and for IBM, it was taken on June 22, 1998. On that day, IBM announced it would ship the Apache web server with the IBM WebSphere Application Server, a key component of its WebSphere product family. Moreover, in an unprecedented move for the company, it would offer "commercial, enterprise-level support" for that free software.

When I was writing my book Rebel Code: inside Linux and the open source revolution in 2000, I had the good fortune to interview the key IBM employees who made that happen. The events of two years before still were fresh in their minds, and they explained to me why they decided to push IBM toward the bold strategy of adopting free software, which ultimately led to the company buying Red Hat 20 years later.

Go to Full Article

Weekend Reading: Ansible

Linux Journal - Sat, 01/05/2019 - 06:30
by Shawn Powers

I've written about and trained folks on various DevOps tools through the years, and although they're awesome, it's obvious that most of them are designed from the mind of a developer. There's nothing wrong with that, because approaching configuration management programmatically is the whole point. Still, it wasn't until I started playing with Ansible that I felt like it was something a sysadmin quickly would appreciate.

Part of that appreciation comes from the way Ansible communicates with its client computers—namely, via SSH. As sysadmins, you're all very familiar with connecting to computers via SSH, so right from the word "go", you have a better understanding of Ansible than the other alternatives.

With that in mind, I've written a few articles exploring how to take advantage of Ansible. It's a great system, but when I was first exposed to it, it wasn't clear how to start. It's not that the learning curve is steep. In fact, if anything, the problem was that I didn't really have that much to learn before starting to use Ansible, and that made it confusing. For example, if you don't have to install an agent program (Ansible doesn't have any software installed on the client computers), how do you start?

Ansible, Part I: the Automation Framework That Thinks Like a Sysadmin

How to get started with Ansible. Shawn tells us the reason Ansible was so difficult for him at first was because it's so flexible with how to configure the server/client relationship, he didn't know what he was supposed to do. The truth is that Ansible doesn't really care how you set up the SSH system; it will utilize whatever configuration you have. This article will get you set up.  

Ansible, Part II: Making Things Happen

Finally, an automation framework that thinks like a sysadmin. Ansible, you're hired.

Ansible is supposed to make your job easier, so the first thing you need to learn is how to do familiar tasks. For most sysadmins, that means some simple command-line work. Ansible has a few quirks when it comes to command-line utilities, but it's worth learning the nuances, because it makes for a powerful system.

Ansible, Part III: Playbooks

Playbooks make Ansible even more powerful than before.

Go to Full Article

Google's Fuchsia OS to Support Android Apps, Linux Servers with Poorly Configured IPMI Cards Prone to Attack, LinuxGizmos' 2019 SBC Catalog Is Out, USB Type-C Becoming More Secure and Epic Games Not Planning to Provide a Linux Version of Its Store

Linux Journal - Fri, 01/04/2019 - 08:10

News briefs for January 4, 2019.

Google's Fuchsia OS will have Android app support via Android Runtime. According to 9To5Google, it was expected that Fuchsia would support Android apps, and now "that suspicion has been confirmed by a new change found in the Android Open Source Project, and we can say with confidence that Fuchsia will be capable of running Android apps using the Android Runtime." The article also notes that "How exactly Fuchsia will use the Android Runtime from there is still unclear. This is includes whether the Android Runtime is able to work as expected to replace Linux kernel calls with equivalents from Fuchsia's Zircon kernel or if ART will run inside of a Linux virtual machine using Machina, Fuchsia's virtual machine system."

Linux servers equipped with poorly configured IPMI (Intelligent Platform Management Interface) cards are prone to attack. ITPro Today reports that "since November, black hat hackers have been using the cards to gain access in order to install JungleSec ransomware that encrypts data and demands a 0.3 bitcoin payment (about $1,100 at the current rate) for the unlock key". The post recommends that to secure against these attacks, make sure the IPMI password isn't the default and "access control lists (ACLs) should be configured to specify the IP addresses that have access the IPMI interface, and to also configure IPMI to only listen on internal IP addresses, which would limit access to admins inside the organization's system."

LinuxGizmos has published its 2019 catalog of open-spec Linux hacker boards. These are all "hacker-friendly, open-spec SBCs that run Linux or Android", and LinuxGizmos provides "recently updated descriptions, specs, pricing, and links to details for all 122 SBCs."

USB Type-C is becoming more secure with the launch of the USB Type-C Authentication Program. eWeek reports that the USB-IF (USB-Implementers Forum) is "taking a cryptographic approach to helping protect USB users and devices against potential risks". In addition, "With the authentication specification, compliance with USB specifications is validated in an effort to prevent potentially dangerous devices and chargers from connecting to a system. The specification can also limit the risk of malicious software that might be embedded within a USB device from attacking a system. According to the USB-IF, the authentication specification enables implementors of the standard to authenticate certified USB Type-C chargers, devices, cables and power sources."

Epic Games says it doesn't currently plan to provide a Linux version of its store. GamingOnLinux, quoted this tweet from Sergey Galyonkin, Director of Publishing Strategy for Epic Games, in response to a question on Reddit: "It really isn't on the roadmap right now. Doesn't mean this won't change in the future, it's just we have so many features to implement."

News Google Fuchsia Android Mobile Servers Security SBCs USB gaming

Using Linux for Logic

Linux Journal - Fri, 01/04/2019 - 06:30
by Joey Bernard

I've covered tons of different scientific applications you can run on your computer to do rather complex calculations, but so far, I've not really given much thought to the hardware on which this software runs. So in this article, I take a look at a software package that lets you dive deep down to the level of the logic gates used to build up computational units.

At a certain point, you may find yourself asking your hardware to do too much work. In those cases, you need to understand what your hardware is and how it works. So, let's start by looking at the lowest level: the lowly logic gate. To that end, let's use a software package named Logisim in order to play with logic gates in various groupings.

Logisim should be available in most distributions' package management systems. For example, in Debian-based distros, install it with the following command:

sudo apt-get install logisim

You then can start it from your desktop environment's menu, or you can open a terminal, type logisim and press Enter. You should see a main section of the application where you can start to design your logic circuit. On the left-hand side, there's a selection pane with all of the units you can use for your design, including basic elements like wires and logic gates, and more complex units like memory or arithmetic units.

Figure 1. When you first start Logisim, you get a blank project where you can start to design your first logic circuit.

To learn how to start using Logisim, let's look at how to set up one of the most basic logic circuits: an AND gate.

Figure 2. You easily can add logic gates to your circuit to model computations.

If you click the Gates entry on the left-hand side, you'll see a full list of available logic gates. Clicking the AND gate allows you to add them to the design pane by clicking on the location where you want them added. At the bottom of the left-hand side, you'll see a pane that displays the attributes of the selected gate. You can use this pane to edit those attributes to make the gate behave exactly the way you want. For this example, let's change the number of inputs value from 5 to 2. The next step is to add an output pin in order to see when the output is either 1 or 0. You can find pins in the wiring section.

Go to Full Article

Purism Introduces "It's a Secure Life" Bundle Sale, Wave Computing Open-Sourcing MIPS, Red Hat Announces Long-Term Commercial Support for OpenJDK on Microsoft Windows, ArchLabs 2018.12 Now Available and RawTherapee 5.5 Released

Linux Journal - Tue, 12/18/2018 - 08:50

News briefs for December 18, 2018.

Purism is introducing "It's a Secure Life" bundles from now until January 6. The bundles are 15%–18& off, and they can be made up of different combinations of the Librem 5 smartphone (preorder), the Librem 15 laptop and the Librem Key.

Wave Computing announced yesterday it plans to open-source its MIPS instruction set architecture to "accelerate the ability for semiconductor companies, developers and universities to adopt and innovate using MIPS for next-generation system-on-chip (SoC) designs". According to the announcement, "Under the MIPS Open program, participants will have full access to the most recent versions of the 32-bit and 64-bit MIPS ISA free of charge—with no licensing or royalty fees. Additionally, participants in the MIPS Open program will be licensed under MIPS' hundreds of existing worldwide patents."

Red Hat this morning announced long-term commercial support for OpenJDK on Microsoft Windows. In addition to supporting OpenJDK builds on RHEL, this support will further enable "organizations to standardize the development and deployment of Java applications throughout the enterprise with a flexible, powerful and open alternative to proprietary Java platforms".

The ArchLabs 2018.12 release is now available. It's been six months since the last release, and this version has done away with the live environment, so when you start the USB install, you are thrown straight into the installer. According to the announcement, "Instructions on how to start the installer are right there. No need for passwords with this live USB either." Other changes include Aurman has been replaced with a new homegrown AUR helper called Baph, the package repo has been updated and installing ArchLabs should be easier than ever. You can download it from here.

RawTherapee 5.5 has been released. This new version of the open-source RAW photo editor has several new features, including a new Shadows/Highlights tool, improved support for Canon mRaw format variants, unbounded processing, new color toning methods and more. You can get the new version via your package manager or visit the download page.

News Purism Librem MIPS open source Red Hat Windows OpenJDK Java ArchLabs Linux Photography RawTherapee

Sharing Docker Containers across DevOps Environments

Linux Journal - Tue, 12/18/2018 - 07:00
by Todd A. Jacobs

Docker provides a powerful tool for creating lightweight images and containerized processes, but did you know it can make your development environment part of the DevOps pipeline too? Whether you're managing tens of thousands of servers in the cloud or are a software engineer looking to incorporate Docker containers into the software development life cycle, this article has a little something for everyone with a passion for Linux and Docker.

In this article, I describe how Docker containers flow through the DevOps pipeline. I also cover some advanced DevOps concepts (borrowed from object-oriented programming) on how to use dependency injection and encapsulation to improve the DevOps process. And finally, I show how containerization can be useful for the development and testing process itself, rather than just as a place to serve up an application after it's written.

Introduction

Containers are hot in DevOps shops, and their benefits from an operations and service delivery point of view have been covered well elsewhere. If you want to build a Docker container or deploy a Docker host, container or swarm, a lot of information is available. However, very few articles talk about how to develop inside the Docker containers that will be reused later in the DevOps pipeline, so that's what I focus on here.

Figure 1. Stages a Docker Container Moves Through in a Typical DevOps Pipeline

Container-Based Development Workflows

Two common workflows exist for developing software for use inside Docker containers:

  1. Injecting development tools into an existing Docker container: this is the best option for sharing a consistent development environment with the same toolchain among multiple developers, and it can be used in conjunction with web-based development environments, such as Red Hat's codenvy.com or dockerized IDEs like Eclipse Che.
  2. Bind-mounting a host directory onto the Docker container and using your existing development tools on the host: this is the simplest option, and it offers flexibility for developers to work with their own set of locally installed development tools.

Both workflows have advantages, but local mounting is inherently simpler. For that reason, I focus on the mounting solution as "the simplest thing that could possibly work" here.

How Docker Containers Move between Environments

A core tenet of DevOps is that the source code and runtimes that will be used in production are the same as those used in development. In other words, the most effective pipeline is one where the identical Docker image can be reused for each stage of the pipeline.

Go to Full Article

Episode 10: Hydrants and Sirens

Linux Journal - Mon, 12/17/2018 - 11:14
Your browser does not support the audio element. Reality 2.0 - Episode 10: Hydrants and Sirens

Katherine Druckman and Doc Searls talk to David Egts (@davidegts), Chief Technologist North America for the Public Sector at Red Hat (@redhatgov) about open source enthusiasm.

Links Mentioned: 

Linux 4.20 rc7 Is Out, the Skrooge Team Announces the 2.17.0 Release of Its Personal Finance Manager, Confluent Has a New Confluent Community License, Pixel Wheels Racing Game has a New Release and Debian Installer Buster Alpha 4 Is Now Available

Linux Journal - Mon, 12/17/2018 - 08:33

News briefs for December 17, 2018.

Linux 4.20 rc7 was released yesterday. Linus Torvalds writes "This is a *tiny* rc7, just how I like it. Maybe it's because everybody is too busy prepping for the holidays, and maybe it's because we simply are doing well. Regardless, it's been a quiet week, and I hope the trend continues." And, he says he still plans to release 4.20 right before Christmas.

The Skrooge Team announced the 2.17.0 release of its personal finance manager, which is based on KDE Frameworks. This release fixes several bugs and includes a few new features, such as a progress bar in the taskbar, and it supports only Qt >= 5.7.0. You can get it from your distro's package management system, or download it from here.

Confluent, founded by the creators of the open-source Kafka project, has announced a new license called the Confluent Community License, "which would limit the ability of vendors to take its open source software and sell it, in the same way that Amazon did with the core Kafka". According to the Business Insider story, "AWS took Kafka and repackaged it as a paid cloud service—something completely legal, as open source software is free for anyone to use as they wish." Business Insider also notes that the new license applies only to specialized add-ons to Kafka that are developed in-house.

There's a new release of the Pixel Wheels racing game. It now "remembers the best lap and best total time for each track and shows you a congratulation message when you reach the top 3 in either categories", countdown now has sound and has several other new features. The game is available for Linux, Android, Windows and Mac, and you can get it from here.

Debian Installer Buster Alpha 4 was released over the weekend. This release has many improvements and hardware support changes, and it now supports 76 languages. Go here to install.

News kernel Skrooge KDE Confluent licensing AWS gaming Debian

Photography and Linux

Linux Journal - Mon, 12/17/2018 - 08:31
by Carlos Echenique

Is it possible for a professional photographer to use a FOSS-based workflow?

I'm a professional photographer based out of Miami, Florida. I learned photography on my own, starting at age 12, with a Yashica TL Electro 35mm film SLR. In college, I discovered I also had quite an affinity for computers and programming, so I got my degrees in that field. I landed an IT job in county government, and photography took a back seat in my life until two things happened: I became a father, and the digital revolution came to the world of photography.

I dove into digital photography as it made practicing my art economical in the extreme. Having a child meant plenty of opportunities to take photos. All of my photographer friends suddenly needed someone who could understand both computers and photography, and I was conveniently placed to help them.

I turned pro in 2008, when a local ballet troupe asked me to photograph their performance of The Nutcracker. Other performances followed, and my skills were further honed. I later was asked by the late Pedro Pablo Peña to photograph his International Ballet Festival, which I did for two years.

Fast-forward to 2014 when I started a photography club at my day job and offered free photography lessons, once a month, to any fellow employees willing to listen.

In 2017, at the behest of my club members, I was asked to assemble a low-cost photography laptop configuration, as many of my students wanted to expand their photographic skills in the post-processing side of digital photography. I completed my task, assembling a reasonable portable digital darkroom for less than $700 USD that included all necessary photo-editing software with no recurring monthly fees, an upgraded hard drive and a colorimeter.

The laptop turned out so well, I decided to take the plunge myself and converted my Windows 10 workstation (custom-built by me) to a dedicated FOSS photography workstation.

Go to Full Article

Epic Games' Free Cross-Platform Service Coming in 2019, Harness Announces New 24-7 Service Guard, Vivaldi Version 2.2 Released, KDE Applications 18.2 Are Out and Valve's Steam Link App for RPi Officially Available

Linux Journal - Fri, 12/14/2018 - 08:59

News briefs for December 14, 2018.

Epic Games recently announced it's working on a free cross-platform service for 2019: "Throughout 2019, we'll be launching a large set of cross-platform game services originally built for Fortnite, and battle-tested with 200,000,000 players across 7 platforms. These services will be free for all developers, and will be open to all engines, all platforms, and all stores. As a developer, you're free to choose mix-and-match solutions from Epic and others as you wish." Epic also noted that "all services will be operated in a privacy-friendly, GDPR-compliant manner".

Harness yesterday announced the release of 24x7 Service Guard, a new "Machine Learning-based capability that empowers and protects developers who practice Continuous Delivery". According to the press release, "With 24x7 Service Guard, engineering teams now have the equivalent of a dedicated bodyguard to watch all production services and observe the end user experience across all APM, monitoring, and log tools. When a service is impacted, 24x7 Service Guard can proactively roll back code changes automatically—the equivalent of a 'safety net' for production applications."

Vivaldi, the ultra-customizable browser with a do-not-track policy, released a new version yesterday. Version 2.2 "improves accessibility, navigation and media". The Vivaldi blog post notes that "the update introduces more unique ways to manage tabs, makes Access Keys easier to use, integrates Pop Out video, and makes the browser's toolbars more configurable." You can download Vivaldi from here.

KDE Applications 18.12 are out. This release resolves more than 140 issues and features several improvements including practical file management with Dolphin, Okular enhancements, full support for emojis in Konsole, usability improvements for everyone and more. See the full list of changes here.

Valve's Steam link app for Raspberry Pi 3B and 3B+ is now officially available. Phoronix reports that "This app provides similar functionality to the low-cost Steam Link dedicated device that's been available the past few years for allowing in-home streaming of games on Steam from your personal PC(s) to living room / HTPC type setups using Steam Link." You can get the app here.

News gaming Harness Machine Learning Monitoring Vivaldi Privacy KDE Valve Raspberry Pi Steam

FOSS Project Spotlight: Appaserver

Linux Journal - Fri, 12/14/2018 - 07:00
by Tim Riley

An introduction to an application server that allows you to build MySQL user interfaces without programming.

Assume you are tasked to write a browser-based, MySQL user interface for the table called CITY. CITY has two columns. The column names are city_name and state_code—each combined are the primary key.

Your user interface must enable users to execute the four main SQL operations: select, insert, update and delete. The main characteristics for each operation are:

  • The select operation needs an HTML prompt form to request a query. It also needs a where clause generator to select from CITY. After forking MySQL and retrieving the raw rows, it needs to translate them into an HTML table form.
  • The HTML table form needs to be editable, and user edits need to be translated into update statements.
  • Each resulting row following the execution of a query is a candidate for deletion.
  • The insert operation needs a blank form. It also needs to translate Apache's common gateway interface (CGI) into insert statements.

So, you might create the source file called city.c and type in all the required code. Of course, relational databases have relations. One city has many persons residing in it. Assume the PERSON table has the column names of full_name, street_address, city_name and state_code. full_name and street_address combined are the primary key (Figure 1).

Figure 1. Database Schema of Many Persons Residing in One City

Are you going to create the source file called person.c too? What about customer.c, inventory.c, order.c, ...?

Alternatively, you might create the source files called select.c, insert.c, update.c and delete.c. Then each of these modules would need as input:

  • A single table name.
  • The table's additional attributes.
  • The table's column names and additional attributes.
  • A recursive list of related tables.
  • Apache's CGI dictionary output.

The principle behind Appaserver is this multi-module approach. Appaserver stores table names in a table. Each table's column names and relations are also stored in tables. Taking the table-driven concept to the nth degree forms a database of a database. You can glean a detailed understanding of how the Appaserver database is modeled from https://appahost.com/appaserver_database_schema.pdf.

Go to Full Article

Opera Launches Built-in Cryptocurrency Wallet for Android, ManagedKube Partners with Google Cloud to Provide a Monitoring App for Kubernetes Cluster Costs, QEMU 3.1 Released, IoT DevCon Call for Presentations and GNOME 3.31.3 Is Out

Linux Journal - Thu, 12/13/2018 - 08:46

News briefs for December 13, 2018.

Opera announced today the launch of a built-in cryptocurrency wallet for Android. According to The Verge, "The wallet will first support ethereum, with support for other coins likely to come later. Ether investors using Opera would potentially be able to more easily access their tokens using the feature." You can get Opera for Android here.

ManagedKube, a Kubernetes software development tool company, announced yesterday it is collaborating with Google Cloud to "launch a monitoring application that provides companies with visibility into their Kubernetes cluster costs". The press release notes that "ManagedKube provides an easy-to-read dashboard that gives insights on how much is being spent on each pod, node, and persistent volume across multiple time dimensions. This visibility allows companies to forecast budgets, understand product margins, and quickly identify optimization opportunities for reducing Kubernetes cloud costs."

QEMU 3.1 has been released. Phoronix reports that this update of the QEMU emulator adds "multi-threaded Tiny Code Generator support, display improvements, adds the Cortex-A72 model and other ARM improvements, and various other enhancements". For more details, see the QEMU ChangeLog.

IoT DevCon call for presentations is now open. Deadline for proposals is February 28, 2019. The conference is being held June 5–6 in Santa Clara, California.

GNOME 3.31.3 is out, and this will be the last snapshot of 2018. Note that this is development code meant for testing and hacking purposes. For a list of changes, go here, and the source packages are here.

News Opera Android Cryptocurrency Kubernetes Google Qemu IOT GNOME

About ncurses Colors

Linux Journal - Thu, 12/13/2018 - 07:00
by Jim Hall

Why does ncurses support only eight colors?

If you've looked into the color palette available in curses, you may wonder why curses supports only eight colors. The curses.h include file defines these color macros:

COLOR_BLACK COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE

But why only eight colors, and why these particular colors? At least with the Linux console, if you're running on a PC, the color range's origins are with the PC hardware.

A Brief History of Color

Linux started as a PC operating system, so the first Linux console was a PC running in text mode. And to understand the color palette on the PC console, you need to go all the way back to the old CGA days. In text mode, the PC terminal had a color palette of 16 colors, enumerated 0 (black) to 15 (white). Backgrounds were limited to the first eight colors:

  • 0. Black
  • 1. Blue
  • 2. Green
  • 3. Cyan
  • 4. Red
  • 5. Magenta
  • 6. Brown
  • 7. White ("Light Gray")
  • 8. Bright Black ("Gray")
  • 9. Bright Blue
  • 10. Bright Green
  • 11. Bright Cyan
  • 12. Bright Red
  • 13. Bright Magenta
  • 14. Yellow
  • 15. Bright White

These colors go back to CGA, IBM's Color/Graphics Adapter from the earlier PC-compatible computers. This was a step up from the plain monochrome displays; as the name implies, monochrome could display only black or white. CGA could display a limited range of colors.

CGA supports mixing red (R), green (G) and blue (B) colors. In its simplest form, RGB is either "on" or "off". In this case, you can mix the RGB colors in 2x2x2=8 ways. Table 1 shows the binary and decimal representations of RGB.

Table 1. Binary and Decimal Representations of RGB 000 (0) Black 001 (1) Blue 010 (2) Green 011 (3) Cyan 100 (4) Red 101 (5) Magenta 110 (6) Yellow 111 (7) White

To double the number of colors, CGA added an extra bit called the "intensifier" bit. With the intensifier bit set, the red, green and blue colors would be set to their maximum values. Without the intensifier bit, each RGB value would be set to a "midrange" intensity. Let's represent that intensifier bit as an extra 1 or 0 in the binary color representation, as iRGB (Table 2).

Go to Full Article
Syndicate content