Language Selection

English French German Italian Portuguese Spanish

Linux Journal

Syndicate content
Updated: 40 min 9 sec ago

KDE Adding Matrix to Its Instant Messaging Infrastructure, E3D Launches New 3D Printing Slicer, digiKam Announces Major 6.0.0 Release, Google to Acquire Alooma and KDE Plasma Bugfix Update 5.15.1 Is Out

2 hours 53 min ago

News briefs for February 20, 2019.

KDE announces it's adding Matrix to its instant messaging infrastructure. Matrix "is an open protocol and network for decentralised communication, backed by an open standard and open source reference implementations for servers, clients, client SDKs, bridges, bots and more. It provides all the features you'd expect from a modern chat system: infinite scrollback, file transfer, typing notifications, read receipts, presence, search, push notifications, stickers, VoIP calling and conferencing, etc. It even provides end-to-end encryption (based on Signal's double ratchet algorithm) for when you want some privacy." For more information and how to get started, see the wiki page.

E3D, the UK hot-end manufacturer, has officially launched a beta of its new 3D printing slicer. Make reports that the new slicer named Pathio features 3D offsetting for perfect shells, logical grouped model settings, a good UI and scripting for power users. See the Pathio website to try out the beta.

digiKam 6.0.0 was released recently. This major release follows two years of intensive development and lots of work from students during the Summer of Code. New features include full support of video file management, raw file decoding engine supporting new cameras, simplified web service authentication using OAuth, new export tools and much more. Go here to download.

Google yesterday announced it intends to acquire Alooma, which "helps enterprise companies streamline database migration in the cloud". According to the announcement, "the addition of Alooma, subject to closing conditions, is a natural fit that allows us to offer customers a streamlined, automated migration experience to Google Cloud, and give them access to our full range of database services, from managed open source database offerings to solutions like Cloud Spanner and Cloud Bigtable".

KDE yesterday released a bugfix update to KDE Plasma 5: 5.15.1. This release adds "a month's worth of new translations and fixes from KDE's contributors" to the release announced a little more than one week ago. See the Plasma 5.15.1 changelog for the full list of changes and updates.

News KDE Matrix instant messaging 3D Printing digiKam Google Cloud Alooma Plasma

Cat-Proofing Your Screen Locker with Bash

4 hours 38 min ago
by Mitch Frazier

 

I have a computer in my bedroom. I also have cats. Unfortunately, cats and screen lockers don't mix well, particularly at night. To be accurate, it's more a problem with the display power management than the actual screen locking. Here's the way it works: I run a script to "shut the lights off at night" (that is, lock the screen and force the display to power down), and that works great, until one of the cats jumps on the desk and causes the mouse to move and turn the display back on. And the cats don't even have to touch the mouse; the slight movement of the desk is enough to cause the mouse to react. Recently, I'd had enough of it and figured there had to be a way to disable the mouse and "refactor" the script.

Go to Full Article

Google Makes Revisions to Avoid Breaking Ad-Blocking Extensions in Chrome, Kali Linux 2019.1 Released, New Version of Cutelyst Is Out, Ubuntu Posts Security Notice for systemd Vulnerability and Applications Open for Outreachy Summer 2019 Internships

Tuesday 19th of February 2019 02:01:51 PM

News briefs for February 19, 2019.

Google rethinks its planned changes to Chrome's extension API that would have broken many ad-blocking extensions. Ars Technica reports that Google has made this revision to "ensure that the current variety of content-blocking extensions is preserved". In addition, "Google maintains that 'It is not, nor has it ever been, our goal to prevent or break content blocking' [emphasis Google's] and says that it will work to update its proposal to address the capability gaps and pain points."

Kali Linux 2019.1 was released yesterday. This is the first release of 2019, bringing the kernel to version 4.19.13. This release fixes many bugs and includes several updated packages. The release announcement notes that "the big marquee update of this release is the update of Metasploit to version 5.0, which is their first major release since version 4.0 came out in 2011." You can download Kali Linux from here.

A new version of the Cutelyst Qt/C++ Web Framework is now available. According to Dantti's Blog, Cutelyst 2.7.0 brings back proper async support and includes a few other new features.

Ubuntu posted a security notice of a new systemd vulnerability yesterday. USN-3891-1 affects the following versions of Ubuntu and its derivatives: Ubuntu 18.10, Ubuntu 18.04 LTS and Ubuntu 16.04 LTS. The details: "systemd incorrectly handled certain D-Bus messages. A local unprivileged attacker could exploit this in order to crash the init process, resulting in a system denial-of-service (kernel panic)." See the security notice for instructions on how to update.

Applications for the Outreachy Summer 2019 round of internships is open now to April 2, 2019. The program "provides three-month internships to work in Free and Open Source Software (FOSS). Interns are paid a stipend of $5,500 and have a $500 travel stipend available to them." Outreachy "expressly invite women (both cis and trans), trans men, and genderqueer people to apply. We also expressly invite applications from residents and nationals of the United States of any gender who are Black/African American, Hispanic/Latin@, Native American/American Indian, Alaska Native, Native Hawaiian, or Pacific Islander. Anyone who faces under-representation, systemic bias, or discrimination in the technology industry of their country is invited to apply." Visit here for more information on the application process.

News Google Chrome Kali Linux Metasploit Security Cutelyst Ubuntu systemd Outreachy

Open Science, Open Source and R

Tuesday 19th of February 2019 12:30:00 PM
by Andy Wills

Free software will save psychology from the Replication Crisis.

"Study reveals that a lot of psychology research really is just 'psycho-babble'".—The Independent.

Psychology changed forever on the August 27, 2015. For the previous four years, the 270 psychologists of the Open Science Collaboration had been quietly re-running 100 published psychology experiments. Now, finally, they were ready to share their findings. The results were shocking. Less than half of the re-run experiments had worked.

When someone tries to re-run an experiment, and it doesn't work, we call this a failure to replicate. Scientists had known about failures to replicate for a while, but it was only quite recently that the extent of the problem became apparent. Now, an almost existential crisis loomed. That crisis even gained a name: the Replication Crisis. Soon, people started asking the same questions about other areas of science. Often, they got similar answers. Only half of results in economics replicated. In pre-clinical cancer studies, it was worse; only 11% replicated.

Open Science

Clearly, something had to be done. One option would have been to conclude that psychology, economics and parts of medicine could not be studied scientifically. Perhaps those parts of the universe were not lawful in any meaningful way? If so, you shouldn't be surprised if two researchers did the same thing and got different results.

Alternatively, perhaps different researchers got different results because they were doing different things. In most cases, it wasn't possible to tell whether you'd run the experiment exactly the same way as the original authors. This was because all you had to go on was the journal article—a short summary of the methods used and results obtained. If you wanted more detail, you could, in theory, request it from the authors. But, we'd already known for a decade that this approach was seriously broken—in about 70% of cases, data requests ended in failure.

Go to Full Article

Replacing OneNote or Evernote with open alternative ways to take notes

Monday 18th of February 2019 05:16:46 PM

Please support Linux Journal by subscribing or becoming a patron.

Debian 9.8 Released, Kernel 5.0-rc7 Is Out, Creative Commons Update on the EU Copyright Changes, Slax 9.8 Available and Mozilla Testing Picture-in-Picture Mode in Firefox

Monday 18th of February 2019 02:49:30 PM

News briefs for February 18, 2019.

Debian 9.8 was released over the weekend. This release mostly addresses security issues and bug fixes. See the post for the full list of changes and visit the mirror list to upgrade an existing installation.

Linux kernel 5.0-rc7 was released yesterday. Linus writes "A nice and calm week, with statistics looking normal. Just under half drivers (gpu, networking, input, md, block, sound, ...), with the rest being architecture fixes (arm64, arm, x86, kvm), networking and misc (filesystem etc). Nothing particularly odd stands out, and everything is pretty small. Just the way I like it."

Creative Commons publishes update on the EU copyright changes that the European Parliament will vote on this spring. The final text of Articles 13 and 11 has been changed somewhat, but according to the Creative Commons post, "With Article 13, it's no exaggeration to say that it'll fundamentally change the way people are able to use the internet and share online. And the European copyright changes will affect how copyright develops in the rest of the world. Even with some of the minor improvements to other aspects of the copyright file, it's hard to see how the reform—taken as a whole—will be a net gain except for the most powerful special interests." If you live in Europe, visit www.saveyourinternet.eu for more information and to contact your MEPs before the vote.

Slax 9.8 was released yesterday. This point release updates some of the included packages; it doesn't include new features. To download the new version, go here.

Mozilla has started testing picture-in-picture mode in Firefox Nightly. According to Softpedia News, "the current implementation of picture-in-picture mode in Firefox is very limited, and I expect Mozilla to accelerate work on it as we approach its target release date. No specifics in this regard are available, however." Picture-in-picture mode is already available in other browsers, such as Google Chrome and Vivaldi.

News Debian Security kernel creative commons EU Copyright Law Slax Mozilla Firefox

Converting Decimals to Roman Numerals with Bash

Monday 18th of February 2019 12:30:00 PM
by Dave Taylor

Decimals to Roman numerals—here we hit all the limitations of Bash shell scripting.

My last few articles have given me a chance to relive my undergraduate computer science degree and code a Roman numeral to decimal converter. It's quite handy when you're watching old movies (when was MCMLVII anyway?), and the basic coding algorithm was reasonably straightforward. (See Dave's "Roman Numerals and Bash" and "More Roman Numerals and Bash".)

The trick with Roman numerals, however, is that it's what's known as a subtractive notation. In other words, it's not a position → value or even symbol → value notation, but a sort of hybrid. MM = 2000, and C = 100, but MMC and MCM are quite different: the former is 2100, and the latter is 1000 + (–100 + 1000) = 1900.

This means that the conversion isn't quite as simple as a mapping table, which makes it a good homework assignment for young comp-sci students!

Let's Write Some Code

In the Roman numeral to decimal conversion, a lot of the key work was done by this simple function:

mapit() { case $1 in I|i) value=1 ;; V|v) value=5 ;; X|x) value=10 ;; L|l) value=50 ;; C|c) value=100 ;; D|d) value=500 ;; M|m) value=1000 ;; * ) echo "Error: Value $1 unknown" >&2 ; exit 2 ;; esac }

You'll need this function to proceed, but as a cascading set of conditional statements. Indeed, in its simple form, you could code a decimal to Roman numeral converter like this:

while [ $decvalue -gt 0 ] ; do if [ $decvalue -gt 1000 ] ; then romanvalue="$romanvalue M" decvalue=$(( $decvalue - 1000 )) elif [ $decvalue -gt 500 ] ; then romanvalue="$romanvalue D" decvalue=$(( $decvalue - 500 )) elif [ $decvalue -gt 100 ] ; then romanvalue="$romanvalue C" decvalue=$(( $decvalue - 100 )) elif [ $decvalue -gt 50 ] ; then romanvalue="$romanvalue L" decvalue=$(( $decvalue - 50 )) elif [ $decvalue -gt 10 ] ; then romanvalue="$romanvalue X" decvalue=$(( $decvalue - 10 )) elif [ $decvalue -gt 5 ] ; then romanvalue="$romanvalue V" decvalue=$(( $decvalue - 5 )) elif [ $decvalue -ge 1 ] ; then romanvalue="$romanvalue I" decvalue=$(( $decvalue - 1 )) fi done

This actually works, though the results are, um, a bit clunky:

$ sh 2roman.sh 25 converts to roman numeral X X I I I I I

Or, more overwhelming:

Go to Full Article

SUSE OpenStack Cloud v9, Ubuntu 18.04.2 LTS Released, Happy Birthday Steam for Linux, WebKitGTK v 2.23.90 Released, Future Support of Virtual Desktops Hinted at in Chromium Codebase

Friday 15th of February 2019 01:38:22 PM

SUSE OpenStack Cloud version 9 is out with its first release candidate.

After a bit of delay, Canonical just released the released Ubuntu 18.04.2 LTS (Bionic Beaver) packaged with a patched 4.18 Linux kernel to address the boot failure bug pushing its release by a week.

Yesterday (Valentine's Day) marked the 6 year anniversary of the release of Steam for Linux. Happy belated birthday Steam for Linux!!!

Just released is WebKitGTK version 2.23.90, adding better GTK integration, support for JPEG2000 and touchpad gestures and more.

A recent code commit to the Chromium codebase may hint to a near future support of virtual desktops; a definite plus for those who tend to run multiple programs all at once.

News

elementary 5 "Juno"

Friday 15th of February 2019 12:30:00 PM
by Bryan Lunduke

A review of the elementary distribution and an interview with its founders.

In the spring of 2014 (nearly five years ago), I was preparing a regular presentation I give most years—where I look at the bad side (and the good side) of the greater Linux world. As I had done in years prior, I was preparing a graph showing the market share of various Linux distributions changing over time.

But, this year, something was different.

In the span of less than two years, a tiny little Linux distro came out of nowhere to become one of the most watched and talked about systems available. In the blink of an eye, it went from nothing to passing several grand-daddies of Linux flavors that had been around for decades.

This was elementary. Needless to say, it caught my attention.

Figure 1. elementary 5 "Juno"

In the years that followed, I've interviewed elementary's founders on a few occasions—for articles, videos or podcasts—and consistently found their vision, dedication and attitudes rather intriguing.

Then in 2016, I was at a Linux conference—SCaLE (the Southern California Linux Expo). One bright, sunshiny morning, I found myself heading from my hotel room down to the conference floor. On my way, I got it in my head that I really could use some French toast. I had a hankering—a serious one. And when Lunduke gets a hankering, no force in the cosmos can stop him (he says, switching to talking about himself in the third person seemingly at random).

Somehow or another, I ended up convincing the elementary crew (four of them, also at SCaLE, with a booth to promote their system) to join me on my French toast quest.

After searching the streets of downtown Pasadena, we found ourselves in a small, but packed, diner—solving French Toast Crisis 2016—and allowing us to chat and get to know each other, in person, a bit better.

These were...kids—in their mid-20s, practically wee babies.

But, I tell you, they impressed me. Their vision for what elementary was—and what it could be—was clear. Their passion was contagious. It was hard to sit with them, in that cramped little diner, and not feel excited and optimistic for what the future held.

And, what's more, they were simply nice people. They oozed goodness and kindness. Their spirit had not yet been crushed by a string of IT managers that make soul-crushing a hobby.

They were the future of desktop Linux (or at least a rather big part of it). This was evident, even back then. And, that wasn't just the French toast talking.

Go to Full Article

Modeling the Entire Universe

Thursday 14th of February 2019 01:00:00 PM
by Joey Bernard

For this article, I want to look at the largest thing possible, the whole universe. At least, that's the claim made by Celestia, the software package I'm introducing here. In all seriousness though, Celestia is a very well done astronomical simulator, similar to other software packages like Stellarium. Celestia is completely open source and is licensed under the GPL.

If Celestia isn't available via the package management system for your favorite distribution, you always can get the latest stable version from the Celestia's website as an installable binary package. If you really need the absolute latest version, you can grab it from the GitHub repository. Binaries also are available for Windows and Mac OS X, in case you need to travel on the dark side of computing.

Once you have installed Celestia, starting it provides a view of the Earth from space.

Figure 1. Celestia begins your exploration of space with a 3D view of Earth.

You're first placed on a track that follows the Earth through space. This is necessary, because Celestia is actually a real-time simulation. If you were in a fixed location in space, any object you were looking at quickly would leave your field of view. You can pause the simulation by pressing the spacebar. Once you are following an object, you can rotate your view by clicking the left mouse button and dragging left/right or up/down.

If you're more interested in observing a centered object, you can click the right mouse button, and then dragging will move you around the object instead, allowing you to see the object's details. You can zoom in or out by using the mouse wheel. All of these navigation actions also have keyboard shortcuts, for those who prefer that to using a mouse.

But, how do you select which object you are centered on? The easiest option is to click the Navigation→Solar System Browser menu item to pop up a selection window.

Figure 2. You can use the solar system browser to select objects to center on within the solar system.

From here, you can choose from planets, moons, asteroids and other solar system objects available by default within Celestia (I'll explain how to add even more items shortly).

If you're looking at items beyond the solar system, you can click the Navigation→Star Browser menu item to open a new window.

Go to Full Article

RIP Dr. Bernard L. Peuto, Porting Android 9 Pie Go Stack to Rpi 3, LibreOffice v6.2 Coming Soon, Red Hat Virtualization Platform 4.3 Beta Released, Deepin Desktop Environment

Thursday 14th of February 2019 11:00:00 AM

It is with a heavy heart that I write to inform you that the father and architect of the Zilog Z8000 processor, Dr. Bernard L. Peuto, has passed. Learn more about his contributions to tech and the legacy he has left here.

An independent group referring to themselves as the  RaspberryPi DevTeam have launched a Kickstarter campaign to help fund their efforts in porting Google’s Android 9 Pie Go stack (built for entry-level smartphones) to the Raspberry Pi 3.

LibreOffice version 6.2 is right around the corner and the killer feature it will be sporting is a new tabbed layout for the menu items, making it similar to the competitive Microsoft Office suite.

Red Hat officially announced the 4.3 Beta release of the software defined Red Hat Virtualization platform which has been built to virtualize both Linux and Windows workloads.

Zamir SUN and Bowen Li of the Fedora project have put together a proposal to port over the beautiful Deepin Desktop Environment over to the Fedora Linux distribution.

News

Plasma v5.15 Released, NetBSD Switching to GCC v7, Django Announces Important Bug Fix, Xen Project Developer and Design Summit

Wednesday 13th of February 2019 01:01:31 PM

The KDE project launched the first stable release of Plasma in 2019 with version 5.15. The release boasts improvements in usability, notifications, eye candy and more.

 

The NetBSD Unix distribution has finally taken the plunge and will be switching to GCC version 7. It will initially start with amd64 and arm64 architectures. Other architectures haven't been thoroughly tested yet but are likely to be officially supported soon.

 

Django, the Python driven web framework, announced bugfix version 2.0.13, addressing bug number 30177 where format_number() crashes when the number has over 200 digits .

 

This years Xen Project's Developer and Design Summit will be held in Chicago on July 9. To register or learn more, visit the summit's official webpage .

 

It seems as if the developers working hard to bring you Ubuntu for the desktop are entertaining the idea of enabling the ZFS file system as the root file system.

News

A Line in the Sand

Wednesday 13th of February 2019 01:00:00 PM
by Doc Searls

There's a new side to choose. It helps that each of us is already on it.

Linux Journal was born in one fight and grew through a series of others.

Our first fight was for freedom. That began in 1993, when Phil Hughes started work toward a free software magazine. The fight for free software was still there when that magazine was born as Linux Journal in April 1994. Then a second fight began. That one was against all forms of closed and proprietary software, including the commercial UNIX variants that Linux would eventually defeat. We got in the fight for open source starting in 1998. (In 2005, I got a ribbon for my own small part in that battle.) And last year, we began our fight against what Shoshana Zuboff calls surveillance capitalism, and Brett Frischmann and Evan Selinger call re-engineering humanity.

This new fight is against actual and wannabe corporate and government overlords, all hell-bent on maintaining the caste system that reduces each of us to mere "consumers" and "data subjects" in a world Richard Brautigan described perfectly half a century ago in his poem "All Watched Over By Machines of Loving Grace". You know, like The Matrix, only for real.

They'll fail, because no machine can fully understand human beings. Each of us is too different, too original, too wacky, too self-educating, too built for gaming every system meant to control us. (Discredit where due: we also suck in lots of ways. For example, Scott Adams is right that we're easy to hack with a good con.)

But why wait for nature to take its course when surveillance capitalists are busy setting civilization back decades or more—especially when we can obsolesce their whole business in the short term?

Here at Linux Journal, we're already doing our part by not participating in the surveillance business that digital advertising has mostly become, and by doing pioneering work in helping the online publishing business obey the wishes of its readers.

Go to Full Article

PyPy v7.0.0, Vulernability Affecting runc and Container Technologies, Ubuntu for ARM-based Windows Laptops, antiX MX v18.1

Tuesday 12th of February 2019 02:38:03 PM

PyPy, the alternative implementation to the Python programming language announced the release of version 7.0.0. It includes 3 different interpreters that support Python versions 2.7, 3.5 and 3.6-alpha.

A vulnerability was just discovered (CVE-2019-5736) affecting runc and the management of container technologies which include Docker, cri-o, containerd, Kubernetes, etc. Learn more about this security hole and the ways it is being patched here.

A small group of programmers and hackers are working diligently to bring support for Ubuntu on ARM-based Windows laptops. Prebuilt images for the Asus NovaGo TP370QL, HP Envy x2, and the Lenovo Mixx 630 can be found on the official GitHub project page.

The Debian-based Linux distribution, antiX MX, just announced the release of version 18.1. The release is based off of Debian 9.7 "Stretch." You can obtain the ISO image here.

News

Removing Profanity from the Source Tree

Tuesday 12th of February 2019 12:45:00 PM
by Zack Brown

Warning: this article contains profanity.

Linus Torvalds recently stepped away from kernel development temporarily in order to think about how to be less harsh with developers in certain situations. Simultaneous with his departure was a patch introducing a new Code of Conduct into the kernel source tree. The effects of this are beginning to be felt.

Jarkko Sakkinen recently posted a patch to change a kernel comment containing the word "fuck" to use the word "hug" instead. So the code comment, "Wirzenius wrote this portably, Torvalds fucked it up" would become "Wirzenius wrote this portably, Torvalds hugged it up".

Steven Rostedt replied to this, saying that the code in question had changed so much that the original comment was out of date, and it should just be removed entirely. He said, "that will be an accurate change with or without CoC."

Jonathan Corbet remarked, "I'd much rather see either deletion or a rewrite over bleeping out words that somebody might not like." And Jiri Kosina agreed, saying, "turning comments into something that often doesn't make sense to anybody at all is hardly productive."

Sergey Senozhatsky pointed out that Linus was the author of the original self-deprecating comment. He asked, "Linus has made a comment, in his own words, about his own code. Why would anyone be offended by this?"

And Tobin C. Harding remarked of the original code comment, "This is my favourite comment to date in the kernel source tree. Surely there are still some people working on the kernel that do so for fun. I actually laughed out loud when I first stumbled upon this file."

In a different thread, Kees Cook said he agreed with removing "fuck" from the source tree, but felt that the word "hug" was not a good replacement, since it didn't maintain the original meaning. He said:

"This API is hugged" doesn't make any sense to me. "This API is hecked" is better, or at least funnier (to me). "Hug this interface" similarly makes no sense, but "Heck this interface" seems better. "Don't touch my hecking code", "What the heck were they thinking?" etc...."hug" is odd.

He added, "Better yet, since it's only 17 files, how about doing context-specific changes? 'This API is terrible', 'Hateful interface', 'Don't touch my freakin' code', 'What in the world were they thinking?' etc.?"

Go to Full Article

Episode 15: Learning Python

Monday 11th of February 2019 05:02:00 PM
Your browser does not support the audio element. Reality 2.0 - Episode 15: Learning Python

Katherine Druckman and Doc Searls talk to Linux Journal Senior Columnist, Reuven Lerner, about learning new languages such as Python.

Linux 5.0, Canonical Update, openSUSE Board Elections, Woman and Girls in Science, European Astro-Pi Challenge

Monday 11th of February 2019 04:43:42 PM

The release candidate 6 for the highly anticipated 5.0 Linux kernel was just released. You can view the changeset for 5.0-rc6 here.

Canonical issued an update (USN-3878-3) and a formal apology for a recent kernel update regression that prevented systems with certain graphics chipsets from booting.

A stable version of Chrome OS 72 was just released on Friday which introduces better access to external storage, touchscreen optimizations for tablet mode and more.

There are only a few days left to cast your ballot in the 2018-2019 openSUSE board elections. Be sure to get your vote in.

Today, the Raspberry Pi Foundation and ESA Education are celebrating the International Day of  Women and Girls in Science and to support the occasion, astronaut Jenni Sidey is helping to kick off the European Astro-Pi challenge. While the challenge itself is not limited to female contestants, it will hopefully encourage more to participate.

News

Easier Python paths with pathlib

Monday 11th of February 2019 12:30:00 PM
by Reuven M. Lerner

A look at the benefits of using pathlib, the "object-oriented way of dealing with paths".

Working with files is one of the most common things developers do. After all, you often want to read from files (to read information saved by other users, sessions or programs) or write to files (to record data for other users, sessions or programs).

Of course, files are located inside directories. Navigating through directories, finding files in those directories, and even extracting information about directories (and the files within them) might be common, but they're often frustrating to deal with. In Python, a number of different modules and objects provide such functionality, including os.path, os.stat and glob.

This isn't necessarily bad; the fact is that Python developers have used this combination of modules, methods and files for quite some time. But if you ever felt like it was a bit clunky or old-fashioned, you're not alone.

Indeed, it turns out that for several years already, Python's standard library has come with the pathlib module, which makes it easier to work with directories and files. I say "it turns out", because although I might be a long-time developer and instructor, I discovered "pathlib" only in the past few months—and I must admit, I'm completely smitten.

pathlib has been described as an object-oriented way of dealing with paths, and this description seems quite apt to me. Rather than working with strings, instead you work with "Path" objects, which not only allows you to use all of your favorite path- and file-related functionality as methods, but it also allows you to paper over the differences between operating systems.

So in this article, I take a look at pathlib, comparing the ways you might have done things before to how pathlib allows you to do them now.

pathlib Basics

If you want to work with pathlib, you'll need to load it into your Python session. You should start with:

import pathlib

Note that if you plan to use certain names from within pathlib on a regular basis, you'll probably want to use from-import. However, I strongly recommend against saying from pathlib import *, which will indeed have the benefit of importing all of the module's names into the current namespace, but it'll also have the negative effect of importing all of the module's names into the current namespace. In short, import only what you need.

Now that you've done that, you can create a new Path object. This allows you to represent a file or directory. You can create it with a string, just as you might do a path (or filename) in more traditional Python code:

Go to Full Article

Weekend Reading: Containers

Saturday 9th of February 2019 12:37:42 PM
by Carlie Fairchild

The software enabling this technology comes in many forms, with Docker as the most popular. The recent rise in popularity of container technology within the data center is a direct result of its portability and ability to isolate working environments, thus limiting its impact and overall footprint to the underlying computing system. To understand the technology completely, you first need to understand the many pieces that make it all possible. Join us this weekend as we learn about Containers.

Before we get started, many ask what the difference is between a container and virtual machines? Editor Petros Koutoupis explains: Both have a specific purpose and place with very little overlap, and one doesn't obsolete the other. A container is meant to be a lightweight environment that you spin up to host one to a few isolated applications at bare-metal performance. You should opt for virtual machines when you want to host an entire operating system or ecosystem or maybe to run applications incompatible with the underlying environment.

Everything You Need to Know about Linux Containers, Part I: Linux Control Groups and Process Isolation

Truth be told, certain software applications in the wild may need to be controlled or limited—at least for the sake of stability and, to some degree, security. Far too often, a bug or just bad code can disrupt an entire machine and potentially cripple an entire ecosystem. Fortunately, a way exists to keep those same applications in check. Control groups (cgroups) is a kernel feature that limits, accounts for and isolates the CPU, memory, disk I/O and network's usage of one or more processes.

Everything You Need to Know about Linux Containers, Part II: Working with Linux Containers (LXC)

Part I of this Deep Dive on containers introduces the idea of kernel control groups, or cgroups, and the way you can isolate, limit and monitor selected userspace applications. Here, I dive a bit deeper and focus on the next step of process isolation—that is, through containers, and more specifically, the Linux Containers (LXC) framework.

Go to Full Article

Microsoft Joins the OpenChain Project, Google Open-Sources ClusterFuzz, New Android Vulnerability, FSF Gives the Vikings D8 Mainboard and Workstation Its "Respect Your Freedom" Endorsement, and Fedora Is Redesigning Its Logo

Friday 8th of February 2019 02:37:57 PM

News briefs for February 8, 2019.

Microsoft has joined the OpenChain Project, "which builds trust in open source by making open source license compliance simpler and more consistent". Uber, Google and Facebook joined it last month. According to the announcement, "By joining OpenChain, Microsoft will help create best practices and define standards for open source software compliance, so that its customers have even greater choice and opportunity to bridge Microsoft and other technologies together in heterogeneous environments."

Google today announced it is open-sourcing ClusterFuzz and making it available for anyone to use. Fuzzing is "an automated method for detecting bugs in software that works by feeding unexpected inputs to a target program", and it's "effective at finding memory corruption bugs". ClusterFuzz is "a fuzzing infrastructure running on over 25,000 cores" was written to aid in the Chrome development process. You can check it out at the ClusterFuzz GitHub repository.

A security vulnerability discovered in Android gives attackers access to your phone if you open a .png file. ZDNet reports that "All it takes to trigger the bug is for attackers to send a crafted, malicious Portable Network Graphic (.PNG) file to a victim's device. Should the user open the file, the exploit is triggered." This bug affects Android versions 7.0–9.0.

The Free Software Foundation has certified new hardware with its "Respect Your Freedom" endorsement: the Vikings D8 mainboard and D8 workstation. According to Phoronix, "The Vikings D8 is a re-branded ASUS KCMA-D8 but flashed with Libreboot+Coreboot to free the hardware down to the BIOS." In addition, "the D8 Workstation also ships with the FSF-approved Trisquel operating system that is free of any Linux binary blobs and proprietary software." See also the FSF post on the Respects Your Freedom certification.

Fedora is redesigning its logo due to issues with its current logo, including "the lack of a single colour variant", "the logo not working well on dark backgrounds", "confusion with other well-known brands, and the use of a proprietary font." See this article by Máirín Duffy for more on the history of the Fedora logo and other details on the change, and also see this post to join the discussion on the new options.

News Microsoft OpenChain Project Google ClusterFuzz Android Security FSF Hardware Fedora

More in Tux Machines

KDE is adding Matrix to its instant messaging infrastructure

KDE has been looking for a better way of chatting and live-sharing information for several years now. IRC has been a good solution for a long time, but it has centralized servers KDE cannot control. It is also insecure and lacks features users have come to expect from more modern IM services. Other alternatives, such as Telegram, Slack and Discord, although feature-rich, are centralized and built around closed-source technologies and offer even less control than IRC. This flies in the face of KDE's principles that require we use and support technologies based on Free software. However, our search for a better solution has finally come to an end: as of today we are officially using Matrix for collaboration within KDE! Matrix is an open protocol and network for decentralised communication, backed by an open standard and open source reference implementations for servers, clients, client SDKs, bridges, bots and more. It provides all the features you’d expect from a modern chat system: infinite scrollback, file transfer, typing notifications, read receipts, presence, search, push notifications, stickers, VoIP calling and conferencing, etc. It even provides end-to-end encryption (based on Signal’s double ratchet algorithm) for when you want some privacy. Read more Also: KDE To Support Matrix Decentralized Instant Messaging

Android Leftovers

Canonical Is Planning Some Awesome New Content For The Snap Store

There I was, thoughtfully drafting an article titled "3 Things Canonical Can Do To Improve The Snap Ecosystem," when I jumped on the phone with Evan Dandrea, an Engineering Manager who just so happens to be responsible for the Snapcraft ecosystem at Canonical. As it turns out, that headline will need a slight edit. One less number. That's because I've just learned Canonical has some ambitious plans for the future of the Snap Store. Read more

Extensive Benchmarks Looking At AMD Znver1 GCC 9 Performance, EPYC Compiler Tuning

With the GCC 9 compiler due to be officially released as stable in the next month or two, we've been running benchmarks of this near-final state to the GNU Compiler Collection on a diverse range of processors. In recent weeks that has included extensive compiler benchmarks on a dozen x86_64 systems, POWER9 compiler testing on the Talos II, and also the AArch64 compiler performance on recent releases of GCC and LLVM Clang. In this latest installment of our GCC 9 compiler benchmarking is an extensive look at the AMD EPYC Znver1 performance on various releases of the GCC compiler as well as looking at various optimization levels under this new compiler on the Znver1 processor. Read more