With the end of the year approaching fast, it is a good time to look back at 2019 and go through the most popular articles on Fedora Magazine written by our contributors.
In this article of the “Best of 2019” series, we are looking at developers and how to use Fedora to be a great developer workstation
Make your Python code look good with Black on Fedora
Black made quite a big impact in the Python ecosystem this year. The project is now part of the Python Software Foundation and it is used by many different projects. So if you write or maintain some Python code and want to stop having to care about code style and code formatting you should check out this article.
Setting up a development environment, running integration tests, testing a new feature, or running an older version of software for all these use cases being able to create and run a virtual machine is a must have knowledge for a developer. This article will walk you through how you can achieve that using virt-manager on your Fedora workstation.
With the rise of Data science and machine learning, the Jupyter IDE has become of very popular choice to share or present a program and its results. This article goes into the details of installing and using Jupyter and the different libraries and tools useful for data science.
Fedora provides different container images, one of which is a minimal base image. The following article demonstrate how one can use this image to build smaller container images.
In 2019 the Go programming language turned 10 year old. In ten years the language has managed to become the default choice for cloud native applications and the cloud ecosystems. Fedora is providing an easy way to start developing in Go, this article takes you through the first step needed to get started.
Stay tuned to the Magazine for other upcoming “Best of 2019” categories. All of us at the Magazine hope you have a great end of year and holiday season.
The end of the year is a perfect time to look back on some of the Magazine’s most popular articles of 2019. One of the Fedora operating systems’s many strong points is its wide array of tools for system administrators. As your skills progress, you’ll find that the Fedora OS has even more to offer. And because Linux is the sysadmin’s best friend, you’ll always be in good company. In 2019, there were quite a few articles about sysadmin tools our readers enjoyed. Here’s a sampling.
Introducing Fedora CoreOS
If you follow modern IT topics, you know that containers are a hot topic — and containers mean Linux. This summer brought the first preview release of Fedora CoreOS. This new edition of Fedora can run containerized workloads. You can use it to deploy apps and services in a modern way.
To be a good sysadmin, you need to understand system startup and the boot process. From time to time, you’ll encounter software errors, configuration problems, or other issues that keep your system from starting normally. With the information in the article below, you can do some life-saving surgery on your system, and restore it to working order.
Although this article was published a few years ago, it continues to be one of the most popular. Apparently, we’re not the only people who sometimes get locked out of our own system! If this happens to you, and you need to reset the root password, the article below should do the trick.
This article is part of an entire series on systemd, the modern system and process manager in Fedora and other distributions. As you may know, systemd has sophisticated but easy to use methods to start up or shut own services in the right order. This article shows you how they work. That way you can apply the right options to unit files you create for systemd.
Fedora 30 introduced new ways to change the boot options for your kernel. This article from Laura Abbott on the Fedora kernel team explains the new Bootloader Spec (BLS). It also tells you how to use it to set options on your kernel for boot time.
Stay tuned to the Magazine for other upcoming “Best of 2019” categories. All of us at the Magazine hope you have a great end of year and holiday season.
“It’s all 1s and 0s.” People say this when they’re making a joke or a sarcastic remark. When it comes to computers thought, it’s really true. And at the hardware level, that’s all there is. The processor, the memory, various forms of storage, USB, HDMI, and network connections, along with everything else in that cell-phone, tablet, laptop, or desktop only uses 1s and 0s. Bytes provide for the grouping of the 1s and 0s. So they are a big help in keeping them organized. Let’s looks at how they do that.
Bytes are the unit of measure for data and programs stored and used in your computer. Though the byte has existed for a long time in computer history and has taken several forms, it’s current 8 bit length is well settled. Taken either singly or as adjacent groups, bytes are the generally accepted most common way the Bits in a computer are kept organized.
So what’s a bit? A bit is a binary digit; that is it can have only two values. In computers the two values a bit can have are zero (0) and one (1). That’s it, no other choices. A byte is just eight binary bits that are taken together to represent binary numbers. Through various coding schemes the numbers can represent a wide variety of other things like the characters we write with.
The table below shows a single Little-Endian byte showing individual bits of this byte and their associated powers of two. The decimal values of each power of two is show with each bit for reference. The line between Bit 3 and Bit 4 is where the byte is sub divided into four bit groups called Nibbles. Little-Endian is a very commonly used byte format. Stay tuned for more on Endians. If you’re curious about the name, do a search on (etymology of endian).
One Little-Endian Byte:
Bit0
Bit1
Bit2
Bit3
Bit4
Bit5
Bit6
Bit7
Power of 2
20
21
22
23
24
25
26
27
Decimal value
1
2
4
8
16
32
64
128
Each nibble of a byte can hold a four bit binary number as shown in the following table. If a bit is set to “1” that power of two adds to the value of the nibble. If a bit is set to “0” that power of two does not add to the value of the nibble. A byte which is two nibbles can hold a two digit hexadecimal number. Bits are really all that a computer can use. Programmers and engineers developing computer hardware use hexadecimal to make dealing with the bits easier. In the table below the least significant bit is on the left 20, 21, 22, 23
One Little-Endian Nibble:
Binary Number
Hexidecimal Value
0000
0
1000
1
0100
2
1100
3
0010
4
1010
5
0110
6
1110
7
0001
8
1001
9
0101
A
1101
B
0011
C
1011
D
0111
E
1111
F
I’ll explain Littel-Endian starting with a one byte diagram. The longer lines at the end of this frame are the boundaries of the byte so if you were drawing a group of adjacent bytes it would be clear where one byte left off and another began. The small lines divide the frame into individual locations where each of the eight bits can be shown. The medium line in the middle divides the byte into two equal four bit pieces which are the nibbles. Nibbles also have a long and varied history. I’ve never seen that they have been standardized. However the current well settled view is that nibbles are groups of four bits as I have shown them below. All of these lines only exist as people draw bytes. The lines don’t exist in the computer.
Byte Illustration
The Lower Nibble and Upper Nibble are labels as they would be used in a Little-Endian byte. In Little-Endian, the least significant digit is on the left end of a number. So the Lower Nibble is the least significant half of the number in the byte. Likewise the least significant bit is on the left LSBit (usually noted as LSB) stands for Least Significant Bit. and the most significant bit is on the right. The Upper Nibble on the right is the most significant half of the number. MSBit (usually noted as MSB) is the most significant bit. This is opposite to how we write decimal numbers with the most significant digit on the left. This is called Little-Endian because the “little end” of the number comes first.
With the byte being able to hold two hexadecimal digits, a byte can hold hexadecimal numbers between 00 and FF (0 to 255 in decimal) So if you are using bytes to represent the characters of a human readable language you just give each character, punctuation mark, etc. a number. (Then of course get everyone to agree with the coding you invented.) This is only one use for bytes. Bytes are also used as program code that your computer runs, numbers for various data you might have, and everything else that inhabits a computer in the CPU, memory, storage, or zooming around on the various buses and interface ports.
As it turns out there are two commonly used byte formats. Little-Endian has been used in the prior examples. Its feature is having the least significant digit on the left and the most significant digit on the right. If we were to write the decimal number 1620 in Little-Endian format it would be 0261.
There is also a byte format called Big-Endian. As you might expect it is opposite of Little-Endian with the most significant digit on the left and the least significant digit on the right. Like we write decimal numbers.
There are reasons for using both and the meaty reasons are beyond the scope of this article. However, Little-Endian tends to be used in microprocessors. The x86-64 processors in most PCs use the Little-Endian byte format. Though the later generations do have special instructions that provide limited use of Big-Endian format. The Big-Endian byte format is widely used in networking and notably in those big Z computers. Now you’re not necessarily limited to one or the other. The newer ARM processors can use either Endian format. Devices like microprocessors that can use both Big-Endian and Little Endian are sometimes referred to as Bi-Endian.
Well, sometimes you really need more than one byte to hold a number. To that end there are longer formats available that are composed of multiple bytes. For instance: The x86-64 processors Have Words which are 16 bits or 2 bytes that happen to be lined up next to each other head to tail, so to speak. They also have Double Words (32 bits or 4 bytes), and Quad Words (64 bits or 8 bytes). Now these are just examples of data forms made available by the processor hardware.
Programmers working with languages have many more ways to organize the bits and bytes. When the program is ready, a compiler or another mechanism converts the way that the program has bits and bytes organized into data forms that the CPU hardware can deal with.
Silverblue is an operating system for your desktop built on Fedora. It’s excellent for daily use, development, and container-based workflows. It offers numerous advantages such as being able to roll back in case of any problems. If you want to update to Fedora 31 on your Silverblue system, this article tells you how. It not only shows you what to do, but also how to revert back if anything unforeseen happens.
Prior the the update to Fedora 31 it is better to do any pending upgrades.
Updating using GNOME Software
Unfortunately the update can’t be done in GNOME Software right now, because of a bug in GNOME Software itself. For additional information please look at upstream issue.
Updating using terminal
If you do not like GNOME Software or like to do everything in terminal, than this next guide is for you.
Updating to Fedora 31 using terminal is easy. First, check if the 31 branch is available, which should be true now:
$ ostree remote refs fedora
You should see the following in the output:
fedora:fedora/31/x86_64/silverblue
Next, rebase your system to the Fedora 31 branch.
$ rpm-ostree rebase fedora:fedora/31/x86_64/silverblue
Finally, the last thing to do is restart your computer and boot to Fedora 31.
How to revert things back
If anything bad happens — for instance, if you can’t boot to Fedora 31 at all — it’s easy to go back. Just pick the previous entry in GRUB, and your system will start in its previous state before switching to Fedora 31. To make this change permanent, use the following command:
$ rpm-ostree rollback
That’s it. Now you know how to rebase to Fedora 31 and back. So why not do it today?
The kernel team is working on final integration for kernel 5.4. This version was just recently released, and will arrive soon in Fedora. This version has many security fixes included. As a result, the Fedora kernel and QA teams have organized a test week from Monday, December 09, 2019 through Monday, December 16, 2019. Refer to the wiki page for links to the test images you’ll need to participate. Read below for details.
How does a test week work?
A test day/week is an event where anyone can help make sure changes in Fedora work well in an upcoming release. Fedora community members often participate, and the public is welcome at these events. If you’ve never contributed before, this is a perfect way to get started.
To contribute, you only need to be able to do the following things:
Download test materials, which include some large files
Read and follow directions step by step
The wiki page for the kernel test day has a lot of good information on what and how to test. After you’ve done some testing, you can log your results in the test day web application. If you’re available on or around the day of the event, please do some testing and report your results.
Happy testing, and we hope to see you in the Test Week.
There are over 40 desktops in Fedora. Each desktop has it’s own strengths and weaknesses. Usually picking a desktop is a very personal preference based on features, looks, and other qualities. Sometimes, what you pick for a desktop is limited by hardware constraints.
This article is to help people compare Fedora desktops based on the desktop baseline memory. To narrow the scope, we are only looking at the desktops that have an official Fedora Live image.
Installation and Setup
Each of the desktops was installed on it’s own KVM virtual machine. Each virtual machine had 1 CPU, 4GB of memory, 15 GB virtio solid state disk, and everything else that comes standard on RHEL 8.0 kvm.
The images for installation were the standard Fedora 31 Live images. For GNOME, that image was the Fedora Workstation. For the other desktops, the corresponding Spin was used. Sugar On A Stick (SOAS) was not tested because it does not install easily onto a local drive.
The virtual machine booted into the Live CD. “Install to Hard Disk” was selected. During the install, only the defaults were used. A root user, and a regular users were created. After installation and reboot, the Live image was verified to not be in the virtual CDROM.
The settings for each desktop was not touched. They each ran whatever settings came default from the Live CD installation. Each desktop was logged into via the regular user. A terminal was opened. Using sudo each machine ran “dnf -y update”. After update, in that sudo terminal, each machine ran “/sbin/shutdown -h now” to shut down.
Testing
Each machine was started up. The desktop was logged into via the regular user. Three of the desktop terminals were opened. xterm was never used, it was always the terminal for that desktop, such as konsole.
In one terminal, top was started and M pressed, showing the processes sorted by memory. In another terminal, a simple while loop showed “free -m” every 30 seconds. The third terminal was idle.
I then waited 5 minutes. This allowed any startup services to finish. I recorded the final free result, as well as the final top three memory consumers from top.
Remember that these numbers are from a default Live install. If you remove, or add services and features, your memory usage will change. But this is a good baseline to look at if you are determining your desktop based on memory consumption.
Good news, everybody! I’m pleased to announce that we have completed our search for a new Fedora Community Action and Impact Coordinator, and she’ll be joining the Open Source Program Office (OSPO) team to work with Fedora as of today. Please give a warm welcome to Marie Nordin.
If you’ve been involved in Fedora, you may have already been working with Marie. She’s a member of the Fedora Design and Badges teams. Her latest contribution to the Design Team is the wallpaper for F31, a collaboration with Máirín Duffy. Marie has made considerable contributions to the Badges project. She has designed over 150 badge designs, created documentation and a style guide, and mentored new design contributors for years. Most recently she has been spear-heading a bunch of work related to bringing badges up to date on both the development and UI/UX of the web app.
Marie is new to Red Hat, joining us after 5 years of involvement with the Fedora community. She was first introduced to Fedora through an Outreachy internship in 2013 working on Fedora Badges. Marie’s most current full time position was in the distribution industry as a purchasing agent, bid coordinator, and manager. She also has a strong background in design outside of her efforts for Fedora, working as a freelance graphic designer for the past 8 years.
I believe that Marie’s varied background in business and administration, her experience with design, and her long term involvement with and passion for Fedora makes her an excellent fit for this position. I’m excited to work with her as both a colleague on her team at Red Hat and as a Fedora contributor.
Feel free to reach out with congratulations, but give her a bit to get fully engaged with Fedora duties.
After being a Fedora user for a while, you may have come to enjoy it. And in fact you might want to encourage others to try Fedora. You don’t need any special privileges or to become a Fedora Ambassador to do that. As it turns out, anyone can help others get started with Fedora just by sharing information about it.
Having the conversation
For example, if you go out to lunch with a group of colleagues periodically, you might find it natural to talk about Fedora with them. If someone shows interest, you can suggest to get together with them for a Fedora show and tell. There isn’t any need for formal presentations or prepared talks. This is just having lunch and sharing information with people you know.
When you’re with friends, relatives, colleagues, or neighbors, conversation often turns to things computer related, and you can bring up Fedora. There are usually opportunities to point out how Fedora would partially if not completely address their concerns or provide something they want.
These are people you know so talking with them is easy and natural. You probably know the kind of things they use PCs for, so you know the features of Fedora that will be attractive to them. Such conversations can start anytime you see someone you know. You don’t need to steer conversations toward Fedora — that might be impolite, depending on the situation. But if they bring up computer related issues, you might find an opportunity to talk about Fedora.
Taking action
If a friend or colleague has an unused laptop, you could offer to show them how easy it is to load Fedora. You can also point out that there’s no charge and that the licenses are friendly to users. Sharing a USB key or a DVD is almost always helpful.
When you have someone setup to use Fedora, make sure they have the URLs for discussions, questions, and other related websites. Also, from time to time, let them know if you’ve seen an application they might find useful. (Hint: You might want to point them at a certain online magazine, too!)
The next time you’re with someone you know and they start talking about a computer related issue, tell them about Fedora and how it works for you. If they seem interested, give them some ideas on how Fedora could be helpful for them.
Open source may be big business nowadays, but it also remains a strong grassroots movement. You too can help grow open source through awareness and sharing!
These services are available with a free account from the Fedora Accounts System (FAS). This account is the passport to all things Fedora! This article covers how to get set up with an account and configure Fedora Workstation for browser single sign-on.
Signing up for a Fedora account
To create a FAS account, browse to the account creation page. Here, you will fill out your basic identity data:
Account creation page
Once you enter your data, the account system sends an email to the address you provided, with a temporary password. Pick a strong password and use it.
Password reset page
Next, the account details page appears. If you want to contribute to the Fedora Project, you should complete the Contributor Agreement now. Otherwise, you are done and you can use your account to log into the various Fedora services.
Account details page
Configuring Fedora Workstation for single sign-On
Now that you have your account, you can sign into any of the Fedora Project services. Most of these services support single sign-on (SSO), so you can sign in without re-entering your username and password.
Fedora Workstation provides an easy workflow to add your Fedora credentials. The GNOME Online Accounts tool helps you quickly set up your system to access many popular services. To access it, go to the Settings menu.
Click on the option labeled Fedora. A prompt opens for you to provide your username and password for your Fedora Account.
GNOME Online Accounts stores your password in GNOME Keyring and automatically acquires your single-sign-on credentials for you when you log in.
Single sign-on with a web browser
Today, Fedora Workstation supports three web browsers out of the box with support for single sign-on with the Fedora Project services. These are Mozilla Firefox, GNOME Web, and Google Chrome.
Due to a bug in Chromium, single sign-on doesn’t work currently if you have more than one set of Kerberos (SSO) credentials active on your session. As a result, Fedora doesn’t enable this function out of the box for Chromium in Fedora.
To sign on to a service, browse to it and select the login option for that service. For most Fedora services, this is all you need to do; the browser handles the rest. Some services such as the Fedora mailing lists and Bugzilla support multiple login types. For them, select the Fedora or Fedora Account System login type.
That’s it! You can now log into any of the Fedora Project services without re-entering your password.
Special consideration for Google Chrome
To enable single sign-on out of the box for Google Chrome, Fedora takes advantage of certain features in Chrome that are intended for use in “managed” environments. A managed environment is traditionally a corporate or other organization that sets certain security and/or monitoring requirements on the browser.
Recently, Google Chrome changed its behavior and it now reports Managed by your organization or possibly Managed by fedoraproject.org under the ⋮ menu in Google Chrome. That link leads to a page that says, “If your Chrome browser is managed, your administrator can set up or restrict certain features, install extensions, monitor activity, and control how you use Chrome.” However, Fedora will never monitor your browser activity or restrict your actions.
Enter chrome://policy in the address bar to see exactly what settings Fedora has enabled in the browser. The AuthNegotiateDelegateWhitelist and AuthServerWhitelist options will be set to *.fedoraproject.org. These are the only changes Fedora makes.
Linux clothes specialist HELLOTUX from Europe recently signed an agreement with Red Hat to make embroidered Fedora t-shirts, polo shirts and sweatshirts. They have been making Debian, Ubuntu, openSUSE, and other Linux shirts for more than a decade and now the collection is extended to Fedora.
Embroidered Fedora polo shirt.
Instead of printing, they use programmable embroidery machines to make the Fedora embroidery. All of the design work is made exclusively with Linux; this is a matter of principle.
Some photos of the embroidering process for a Fedora sweatshirt:
Oh, “just one more thing,” as Columbo used to say: Now, HELLOTUX pays the shipping fee for the purchase of two or more items, worldwide, if you order within a week from now. Order on the HELLOTUX website.