Fedora Magazine

Subscribe to feed Fedora Magazine
Guides, information, and news about the Fedora operating system for users, developers, system administrators, and community members.
Aggiornato: 19 ore 31 min fa

Listen to the new Fedora podcast

Ven, 16/02/2018 - 09:00

The Fedora Marketing Team is proud to announce the Fedora Podcast. This ongoing series will feature interviews and talks with people who make the Fedora community awesome. These folks work on new technologies found in Fedora. Or they produce the distro itself. Some work on putting Fedora in the hands of users. There’s so much going on in Fedora, it takes a whole podcast series. The podcast will be released bi-weekly and already has seven episodes planned.

Episode #1

Matthew Miller, the Fedora Project Leader (FPL), talks about the Fedora Project, the Fedora community and other related topics. He touches on the history of Fedora, the relationship with Red Hat, community structure and more.

The episode is also available here:

Future Fedora Podcast topics
  • Ambassadors: “The face of Fedora”: A discussion about the contributors that serve as the face of Fedora. They talk to the general public, organize events, and bring people into the community.
  • Mindshare: “The outreach leadership in Fedora”: Mindshare aims to help Fedora teams reach their targets in a more effective way. The goal is to unify and share their work through optimized, standardized communication.
  • Fedora Magazine: The news portal of the Fedora Community”: The editors of the magazine share information about how the Magazine is made.
  • Atomic: “The Fedora’s next-generation cloud product”: This team works to integrate new OS technology and tools from Project Atomic into Fedora. Here they talk about their amazing technologies.
  • Infrastructure: “The team behind the distro”: Who are the people behind the iron? These incredible people keep everything running, so the whole community can do their work.
  • Modularization: Fedora’s Modularity initiative makes it simple for packagers to create alternative versions of software. It also allows users to consume those streams easily. Listen in as they explain how it all works.
Subscribe to the podcast

You can subscribe to the podcast in Simplecast, follow the Fedora Project on Soundcloud, or periodically check the author’s site on fedorapeople.org.


This podcast is made with the following free software: GNU/Ring, Audacity, and espeak.

The following audio files are also used: Soft echo sweep by bay_area_bobThe Spirit of Nøkken by johnnyguitar01, and Fussion Sound by pilinox.


Contribute at the Fedora Test Day for kernel 4.15

Mer, 14/02/2018 - 17:03

The kernel team is working on final integration for kernel 4.15. 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 day for Thursday, February 22. Refer to the wiki page for links to the test images you’ll need to participate.

How do test days work?

A test day 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 on test day.

3 Fedora videos from DevConf.cz 2018

Mar, 13/02/2018 - 10:37

The recent DevConf.cz conference in Brno, Czechia is a great example of an event by and for developers and open source community members. Hundreds of speakers showed off countless technologies and features advancing the state of open source in Linux and far beyond. Here’s a taste of the conference in the form of three videos concerning Fedora that were part of the schedule.

Fearless upgrades with Atomic Workstation

Jonathan Lebon shows off the Fedora Atomic Workstation. This variant of Fedora Workstation offers a full desktop working environment which can easily host Flatpaks and containers. Because it’s based on rpm-ostree, it offers painless upgrades and rollbacks. Check out Jonathan’s talk here:

Fedora panel discussion

In attendance at DevConf.cz 2018 were Fedora Project Leader Matthew Miller and many other community leaders. Miller provided a look at statistics on distribution, project, and community growth, as well as commentary and analysis. Since this was a panel discussion, it’s a fairly freewheeling session in which the audience participated as well. View the panel session here:

Fedora Workstation, year 3

Christian Schaller is a long-time free software contributor as well as a manager of Red Hat’s desktop engineering teams. In this presentation he covers both the past year’s successes in the Workstation as well as future challenges. He also talks about some of the latest technologies underway for the desktop such as Fleet Commander and Pipewire. Watch the whole session here:

Other DevConf.cz videos

You can check out all the videos from DevConf.cz 2018 at the official YouTube channel.

Inspect and manage processes with ps

Ven, 09/02/2018 - 09:00

Understanding Linux process management can be useful for both developers and system administrators. The ps command is an excellent way to get information about processes running on the system.

What is a process?

A process is a series of tasks executed by the operating system. In most cases the tasks are defined in a computer program (a set of instructions). The result of the execution of these programs are processes. Since Linux is a multiprocessing operating system, processes can be run concurrently and independently from each other. Each process has its own permissions, virtual memory address space, and so on.

A process can access and use system resources such as memory, CPUs, files on the file system, and physical devices. To manage and control access to these resources, the kernel needs to keep track of which processes are running and which resources are in use. The kernel does this using a data structure to represent the processes. This data structure is quite large and complex, so this article only focuses on a few categories of information.


Each process can be in one of the following states: RUNNING, WAITING, STOPPED or ZOMBIE. RUNNING and STOPPED are relatively straightforward to understand. The WAITING state means the process is waiting for an event or to access a resource , such as waiting for keyboard input. The ZOMBIE state describes a process which for some reason is stopped but still present in the list of processes managed by the kernel.


Each process in the system has a process identifier, or PID. Process also have user and group identifiers used to control access on the system resources.


Each process except for the initial one has a parent process. The kernel keeps track of the hierarchical relationship between processes.

File system

This category is used to track access to any files a process has opened.

Virtual Memory

This category is used by the kernel to track the mapping of each process’ virtual memory onto the system’s physical memory. A process’ virtual memory is a virtual address space that contains executable code and the data from different sources. For example, when a program uses a shared library, the code and data from the library is linked to this process’ virtual memory. Another example is for a program to allocate virtual memory during processing, such as to hold the content of files that it is reading.

ps in action

Now that you have a better idea of what a process is, here’s a look at the ps command and how to use it to get information about our system’s running processes. To quickly print all the active processes, use the following command:

$ ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 20:31 ? 00:00:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 24 root 2 0 0 20:31 ? 00:00:00 [kthreadd] root 4 2 0 20:31 ? 00:00:00 [kworker/0:0H] ....

Note the use of the -e option to display all processes, and -f to display the full format. You can also use -F for extended full format. The full format prints these eight columns:

  • UID = user identifier
  • PID = process identifier
  • PPID = parent process identifier
  • C = CPU utilization
  • STIME = time when the process started
  • TTY = terminal
  • TIME = combined system and user CPU time used by the process so far
  • CMD = process name including command

You can also see that systemd, which is the initial process, has a parent PID of 0. As the initial process, it has no parent.

The extended full format adds three more columns to the displayed output:

$ ps -eF UID PID PPID C SZ RSS PSR STIME TTY TIME CMD root 1 0 0 57658 11988 3 20:31 ? 00:00:03 /usr/lib/systemd/systemd --switched-root --system --deserialize 24 root 2 0 0 0 0 0 20:31 ? 00:00:00 [kthreadd] root 4 2 0 0 0 0 20:31 ? 00:00:00 [kworker/0:0H] root 6 2 0 0 0 0 20:31 ? 00:00:00 [mm_percpu_wq]

The new columns are:

  • SZ = virtual memory usage
  • RSS = real memory usage (resident set size)
  • PSR = processor to which the process is currently assigned

You can also customize the output of the ps command. Use the -o option to specify which columns you would like to be displayed. This can be useful when using ps in a shell script.

$ ps -ef -o pid,cmd PID CMD 1 /usr/lib/systemd/systemd --switched-root --system --deserialize 24 2 [kthreadd] 4 [kworker/0:0H]

Another useful option is -u, which allows you to filter the processes displayed by user ID. For example, to display all the processes owned by the user root, run a command like this:

$ ps -u root -o user,pid,cpu,cmd USER PID CPU CMD root 1 - /usr/lib/systemd/systemd --switched-root --system --deserialize 24 root 2 - [kthreadd] root 4 - [kworker/0:0H] root 6 - [mm_percpu_wq] root 7 - [ksoftirqd/0]

Another example to print the processes owned by the gdm user.

$ ps -u gdm -o user,pid,cpu,cmd USER PID CPU CMD gdm 1126 - /usr/lib/systemd/systemd --user gdm 1139 - (sd-pam) gdm 1157 - /usr/libexec/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart gdm 1180 - /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only gdm 1194 - /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart Debugging using ps

The ps command comes in handy when debugging an application. More specifically, you can use it to determine the resources used by an application. To list all the threads for a particular process, run a command like this:

$ ps -C firefox -L -o pid,tid,pcpu,state,nlwp,cmd PID TID %CPU S NLWP COMMAND 3015 3015 7.6 S 69 /usr/lib64/firefox/firefox 3015 3040 0.0 S 69 /usr/lib64/firefox/firefox 3015 3041 0.0 S 69 /usr/lib64/firefox/firefox 3015 3042 0.5 S 69 /usr/lib64/firefox/firefox 3015 3043 0.3 S 69 /usr/lib64/firefox/firefox 3015 3044 0.0 S 69 /usr/lib64/firefox/firefox ....

This example uses the -C option to select the processes using the command name firefox. The -L option shows the threads for that process. The -o option again displays selected columns, in this case PID and CMD, along with some other new columns:

  • TID = thread identifier
  • PCPU = percentage of CPU usage
  • STATE = state of the process, as seen earlier in this article. In the example the threads are in the S state, which means interruptible sleep — these processes are waiting for an event to run.
  • NLWP = number of light processes; in the example above, firefox is using 69 threads

Finally, you can use ps to track a memory leak. The presence of a memory leak in a process would increase the RAM memory the process has. You can monitor the Resident Set Size (RSS) to have an idea of how much RAM memory a process is using.

$ ps -eF --sort -rss PID PPID C SZ RSS PSR STIME TTY TIME CMD 3015 2352 11 807180 761056 3 14:20 tty2 00:06:47 /usr/lib64/firefox/firefox 3152 3015 7 611589 394944 0 14:20 tty2 00:04:23 /usr/lib64/firefox/firefox 3087 3015 1 598306 350224 0 14:20 tty2 00:00:40 /usr/lib64/firefox/firefox 3715 3015 2 579774 314300 1 14:44 tty2 00:00:46 /usr/lib64/firefox/firefox 2352 2235 2 921991 228908 1 14:15 tty2 00:01:50 /usr/bin/gnome-shell

This command makes use of the –sort -rss option to show the process with the highest RSS at the top. You could sort the processes in the other direction (increasing RSS) using the following option –sort rss.

Photo by João Silas on Unsplash.

Getting Started with the openbox windows manager in Fedora

Lun, 05/02/2018 - 09:00

Openbox is a lightweight, next generation window manager for users who want a minimal enviroment for their Fedora desktop. It’s well known for its minimalistic appearance, low resource usage and the ability to run applications the way they were designed to work. Openbox is highly configurable. It allows you to change almost every aspect of how you interact with your desktop. This article covers a basic setup of Openbox on Fedora.

Installing Openbox in Fedora

This tutorial assumes you’re already working in a traditional desktop environment like GNOME or Plasma over the Wayland compositor. First, open a terminal and run the following command using sudo.

sudo dnf install openbox xbacklight feh conky xorg-x11-drv-libinput tint2 volumeicon xorg-x11-server-utils network-manager-applet

Curious about the packages this command installs? Here is the package-by-package breakdown.

  • openbox is the main window manager package
  • xbacklight is a utility to set laptop screen brightness
  • feh is a utility to set a wallpaper for the desktop
  • conky is a utility to display system information
  • tint2 is a system panel/taskbar
  • xorg-x11-drv-libinput is a driver that lets the system activate clicks on tap in a laptop touchpad
  • volumeicon is a volume control for the system tray
  • xorg-x11-server-utils provides the xinput tool
  • network-manager-applet provides the nm-applet tool for the system tray

Once you install these packages, restart your computer. After the system restarts, choose your user name to login. Before you enter your password, click the gear icon to select the Openbox session. Then enter your password to start Openbox.

If you ever want to switch back, simply use this gear icon to return to the selection for your desired desktop session.

Using Openbox

The first time you login to your Openbox session, a mouse pointer appears over a black desktop. Don’t worry, this is the default look and feel of the desktop. First, right click your mouse to access a handy menu to launch your apps. You can use the shortcut Ctrl + Alt + LeftArrow / RightArrow to switch between four virtual screens.

If your laptop has a touchpad, you may want to configure tap to click for an improved experience. Fedora features libinput to handle input from the touchpad. First, get a list or input devices in your computer:

$ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=11 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ WebCam SC-13HDL11939N: WebCam S id=9 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]

In the example laptop, the touchpad is the device with ID 11. With this info you can list your trackpad properties:

$ xinput list-props 11 Device 'ETPS/2 Elantech Touchpad': Device Enabled (141): 1 Coordinate Transformation Matrix (143): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Tapping Enabled (278): 0 libinput Tapping Enabled Default (279): 0 droped

In this example, the touchpad has the Tapping Enabled property set to false (0).

Now you know your trackpad device ID (11) and the property to configure (278). This means you can enable tapping with the command:

xinput set-prop <device> <property> <value>

For the example above:

xinput set-prop 11 278 1

You should now be able to successfully click in your touchpad with a tap. Now configure this option at the Openbox session start. First, create the config file with an editor:

vi ~/.config/openbox/autostart

This example uses the vi text editor, but you can use any editor you want, like gedit or kwrite. In this file add the following lines:

# Set tapping on touchpad on: xinput set-prop 11 278 1 &

Save the file, logout of the current session, and login again to verify your touchpad works.

Configuring the session

Here are some examples of how you can configure your Openbox session to your preferences. To use feh to set the desktop wallpaper at startup, just add these lines to your ~/.config/openbox/autostart file:

# Set desktop wallpaper: feh --bg-scale ~/path/to/wallpaper.png &

To use tint2 to show a task bar in the desktop, add these lines to the autostart file:

# Show system tray tint2 &

Add these lines to the autostart file to start conky when you login:

# Show system info conky &

Now you can add your own services to your Openbox session. Just add entries to your autostart file. For instance, add the NetworkManager applet and volume control with these lines:

#NetworkManager nm-applet & #Volume control in system tray volumeicon &

The configuration file used in this post for conky is available here you can copy and paste the configuration in a file called .conkyrc in your home directory .

The conky utility is a highly configurable way to show system information. You can set up a preferred profile of settings in a ~/.conkyrc file. Here’s an example conkyrc file. You can find many more on the web.

You are now able to customize your Openbox installation in exciting ways. Here’s a screenshot of the author’s Openbox desktop:


Configuring tint2

You can also configure the look and feel of the panel with tint2. The configuration file is available in ~/.config/tint2/tint2rc. Use your favorite editor to open this file:

vi ~/.config/tint2/tint2rc

Look for these lines first:

#------------------------------------- #Panel panel_items = LTSCB

These are the elements than will be included in the bar where:

  • L = Launchers
  • T = Task bar
  • S = Systray
  • C = Clock
  • B = Battery

Then look for those lines to configure the launchers in the task bar:

#------------------------------------- #Launcher launcher_padding = 2 4 2 launcher_background_id = 0 launcher_icon_background_id = 0 launcher_icon_size = 24 launcher_icon_asb = 100 0 0 launcher_icon_theme_override = 0 startup_notifications = 1 launcher_tooltip = 1 launcher_item_app = /usr/share/applications/tint2conf.desktop launcher_item_app = /usr/local/share/applications/tint2conf.desktop launcher_item_app = /usr/share/applications/firefox.desktop launcher_item_app = /usr/share/applications/iceweasel.desktop launcher_item_app = /usr/share/applications/chromium-browser.desktop launcher_item_app = /usr/share/applications/google-chrome.desktop

Here you can add shortcuts to your favorite launcher_item_app elements. This item accepts .desktop files and not executables. You can get a list of your system-wide desktop files with this command:

ls /usr/share/applications/

As an exercise for the reader, see if you can find and install a theme for either the Openbox window manager or tint2. Enjoy getting started with Openbox as a Fedora desktop.

Enhancing photos with GNOME Photos

Ven, 02/02/2018 - 13:40

GNOME Photos is an application that lets you easily organize photos and screenshots. GNOME Photos doesn’t enforce a folder hierarchy. Instead, it relies on tracker to find and index photos inside well-known folders, such as Pictures in your home folder (~/Pictures).

Photos has steadily grown in its ability to edit pictures. For instance, GNOME Photos 3.24 recently added two new color adjustment options: exposure and blacks. Of course, the subject of digital photo editing is a deep one. Without going into too much detail, this article demonstrates the basic photo editing options available in GNOME Photos.

First, install Photos from the Software tool, or by using dnf along with sudo:

sudo dnf install gnome-photos

Run the app from the Overview by searching for “Photos.” The first time you run Photos, it populates its Photos tab with all image files found in ~/Pictures:

Adjusting Colors

Double-click on the photo you wish to edit. Click the pencil icon to open the Edit panel:

Click Colors, and a series of sliders expands.

These sliders control various enhancement effects to the image. This photo ended up under-exposed; the sensor probably detected too much light from the sky, leaving the beach without enough exposure time. Adjust the Exposure slider to the right and the image will update with an enhanced exposure.

Slide up the Saturation to deepen the sea and sky blues.

Applying a filter

Photos also ships with some canned filters. These filters apply preset adjustments to the photo to give it a particular style. For example, the Calistoga filter gives the beach a vintage/retro look:

Be sure to click Done to save the changes.

Non-destructive edits

Any time you edit a photo in Photos, it preserves the original. You can return to the original if you don’t like how your changes turn out. Open the Properties menu item and click Discard all Edits to revert the file to its original copy.

Set a background

Photos can also set pictures as the desktop background. First, crop the photo to your desired aspect ratio — 16×9 in this example.

Next, click Done. Then select the newly edited picture, and from the menu, select Set as Background.

Photos can do more than edit. It also integrates with GNOME Online Accounts, and can be set up to share photos to various online photo services. Photos also lets you organize your photos into albums. It even detects screenshots and automatically sorts them into a Screenshots album for you!

How to access a Raspberry Pi Zero’s GPIO pins from Fedora

Mer, 31/01/2018 - 08:23

When hacking with a Raspberry Pi Zero (or similar device), many makers use the General Purpose Input / Output (GPIO) pins. These pins are used to attach and control a wide range of devices such as LEDs or sensors to measure temperature, light, or humidity. However, if you prefer to code on your desktop or laptop this may be an issue since most of these devices don’t have accessible GPIO pins. This is where GPIO expander software can help.

The main goal of GPIO expander software is to use the Raspberry Pi Zero as an USB device connected to a personal computer, where the GPIO pins of the Raspberry Pi Zero will be made available to the host computer.

This article walks through the steps for setting up and using the GPIO expander software with a Raspberry Pi Zero on Fedora.

Connect the Raspberry Pi Zero

Connect the micro USB port (not the one labelled PWR) of the Raspberry Pi Zero to your computer. Once connected, run the lsusb command, and a new USB device like this should appear:

Bus 004 Device 005: ID 0a5c:2763 Broadcom Corp. Building GPIOexpander

Next, we are going to build GPIOexpander from source. Install the following build dependencies using dnf:

sudo dnf install git gcc bc cmake flex unzip bison gcc-c++ wget patch python2 perl-ExtUtils-MakeMaker perl-Thread-Queue libusb-devel

Then, create a directory for the sources and check them out using git

$ mkdir ~/pi_hacking $ cd ~/pi_hacking $ git clone --depth 1 https://github.com/raspberrypi/gpioexpander.git $ git clone --depth=1 https://github.com/raspberrypi/usbboot

Next, build GPIOexpander:

$ cd ~/pi_hacking/gpioexpander $ ./build.sh

Finally, build usbboot.

$ cd ~/pi_hacking/usbboot $ make

usbboot is responsible to boot the Raspberry from the host device (your PC) via USB (like booting a computer via an external mass storage) loading a very bare minimal system, while gpioexpander emulates an USB Ethernet dongle and runs the pigpiod daemon on the Raspberry Pi Zero.

Finalize the setup

Now, change back to the usbboot git checkout, and issue this command:

$ cd ~/pi_hacking/usbboot $ sudo ./rpiboot -d ../gpioexpander/output

You should see some messages looking like a boot process. Once finished, look at the network interfaces on your PC, using the “ifconfig” command.  A new network interface named similar to “enp0s20f0u1i2” with an IPv6 address assigned to it. Try pinging the Rasperry Pi Zero, where enp0s20f0u1i2 is the name of the interface created on your computer

$ ping6 fe80::1%enp0s20f0u1i2

Next, install the gpiozero Python package, and export the following bash variables:

Note: replace enp0s20f0u1i2 with the name of the interface created on your computer:

$ pip3 install gpiozero --user $ export GPIOZERO_PIN_FACTORY=pigpio $ export PIGPIO_ADDR=fe80::1%enp0s20f0u1i2 Test it out

Connect a LED to pin 20 (GPIO 25), start python3, and issue the following python code to make the LED blink:

$ python3 >>> from gpiozero import LED >>> led = LED(25) >>> led.blink()

The LED should blink. Awesome!

Now you can use the power of your Fedora workstation to use the Raspberry Pi Zero GPIO pins. Please note that you are limited to the GPIO Zero Python library and you can not use, for instance, the RPi.GPIO one. However the aim of this tool is to provide a simple to use system, useful for teaching sessions and experiments without the need of a network or a monitor, a power supply, a keyboard and a mouse in order to use the GPIO pins directly from a laptop or a workstation.

Container testing in OpenShift with Meta-Test-Family

Ven, 26/01/2018 - 09:00

The previous Magazine article on container testing showed how to use Meta-Test-Family (MTF) to validate  standalone containers. The goal is to avoid shipping containers without proper testing, and to guarantee that a given service in a container works properly.

Another possible way to test containers is in the OpenShift environment. This article describes how to test container in the orchestrated OpenShift world. Fedora alone already includes a huge number of containers.

MTF installation

Before you can start with the testing itself, install MTF from the official Fedora repository using sudo:

sudo dnf install -y meta-test-family

A COPR repository contains a development version of MTF which should not be used on a production environment. However, you can install it with these commands:

sudo dnf copr enable phracek/meta-test-family sudo dnf install -y meta-test-family

To install MTF directly from GitHub, run these commands:

git clone git@github.com:fedora-modularity/meta-test-family.git cd meta-test-family sudo python setup.py install

Now you can start testing containers in the OpenShift environment.

Prepare test for the OpenShift

Running your containers locally is dead-simple — just use the docker run command. But that’s not how you run your application in production — that’s OpenShift’s business. To make sure your containers are orchestrated well, you should test them in the same environment.

Bear in mind that standalone and orchestrated environments are different. Standalone containers can be executed easily with a single command. Managing such containers isn’t as easy: you need to figure out persistent storage, backups, updates, routing, scaling — all the things you get for free with orchestrators.

The OpenShift environment has its own characteristics: security restrictions, differences in persistent storage logic, expectation of stateless pods, support for updates, multi-node environment, native source-to-image support and much much more.  Deploying an orchestrator here is not an easy task. This is the reason why MTF now supports OpenShift, so you can easily test your containerized application in an orchestrated environment.

Before running and preparation the OpenShift environment, you have to create a test and a configuration file for MTF, in YAML format. These two files have to be in the same directory, and tests will be executed from the directory.

Configuration file for MTF

The configuration file looks like this:

document: modularity-testing version: 1 name: memcached service:     port: 11211 module:     openshift:         container: docker.io/modularitycontainers/memcached

Here’s an explanation of each field in the YAML config file for MTF:

  • service.port – port, where the service is available.
  • module.openshift – configuration part relevant only for OpenShift environment
  • module.openshift.container – Reference to container, which will be used for testing in OpenShift.
Test for memcached container

Here’s an example of a memcached test for a container:

$ cat sanity1.py import pexpect from avocado import main from avocado.core import exceptions from moduleframework import module_framework from moduleframework import common class SanityCheck1(module_framework.AvocadoTest): """ :avocado: enable """ def test_smoke(self): self.start() session = pexpect.spawn("telnet %s %s " % (self.ip_address,self.getConfig()['service']['port'])) session.sendline('set Test 0 100 4\r\n\n') session.sendline('JournalDev\r\n\n') common.print_info("Expecting STORED") session.expect('STORED') common.print_info("STORED was catched") session.close() if __name__ == '__main__': main()

This test connects to memcached via telnet on the given IP address and port. The port is specified in the MTF configuration file. The following sections speak more about the IP address.

Prepare OpenShift for container testing

MTF can install the OpenShift environment on your local system with the mtf-env-set command.

$ sudo MODULE=openshift OPENSHIFT_LOCAL=yes mtf-env-set Setting environment for module: openshift Preparing environment ... Loaded config for name: memcached Starting OpenShift Starting OpenShift using openshift/origin:v3.6.0 ... OpenShift server started. The server is accessible via web console at: You are logged in as: User: developer Password: <any value> To login as administrator: oc login -u system:admin

The mtf-env-set command checks for a shell variable OPENSHIFT_LOCAL — if specified, it checks if the origin and origin-clients packages are installed. If not, then it installs them.

In this case, a local machine performs the container testing. If you test containers on a remote OpenShift instance, you can ignore this step. If the OPENSHIFT_LOCAL variable is missing, tests are executed on the remote OpenShift instance specified by the OPENSHIFT_IP parameter (see below).

Container testing

Now you can test your container either on a local or remote OpenShift instance with the mtf command. The only difference is the command parameters:

sudo MODULE=openshift OPENSHIFT_USER=developer OPENSHIFT_PASSWORD=developer mtf sanity1.py

In this local testing case, sanity1.py uses as the value for self.ip_address.

sudo OPENSHIFT_IP=<ip_address> OPENSHIFT_USER=<username> OPENSHIFT_PASSWD=<passwd> mtf sanity1.py

In this remote testing case, sanity1.py uses OPENSHIFT_IP as the value for self.ip_address.

Tests are then executed from the environment where you store configuration file and tests for the given OpenShift instance. The output looks like this:

JOB ID : c2b0877ca52a14c6c740582c76f60d4f19eb2d4d JOB LOG : /root/avocado/job-results/job-2017-12-18T12.32-c2b0877/job.log (1/1) sanity1.py:SanityCheck1.test_smoke: PASS (13.19 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0 JOB TIME : 13.74 s JOB HTML : /root/avocado/job-results/job-2017-12-18T12.32-c2b0877/results.html $

If you open the log file marked in boldface above, you’ll see contents similar to the example below.

[...snip...] ['/var/log/messages', '/var/log/syslog', '/var/log/system.log']) 2017-12-18 14:29:36,208 job L0321 INFO | Command line: /bin/avocado run --json /tmp/tmppfZpNe sanity1.py 2017-12-18 14:29:36,208 job L0322 INFO | 2017-12-18 14:29:36,208 job L0326 INFO | Avocado version: 55.0 2017-12-18 14:29:36,208 job L0342 INFO | 2017-12-18 14:29:36,208 job L0346 INFO | Config files read (in order): 2017-12-18 14:29:36,208 job L0348 INFO | /etc/avocado/avocado.conf 2017-12-18 14:29:36,208 job L0348 INFO | /etc/avocado/conf.d/gdb.conf 2017-12-18 14:29:36,208 job L0348 INFO | /root/.config/avocado/avocado.conf 2017-12-18 14:29:36,208 job L0353 INFO | 2017-12-18 14:29:36,208 job L0355 INFO | Avocado config: 2017-12-18 14:29:36,209 job L0364 INFO | Section.Key [...snip...] :::::::::::::::::::::::: SETUP :::::::::::::::::::::::: 2017-12-18 14:29:36,629 avocado_test L0069 DEBUG| :::::::::::::::::::::::: START MODULE ::::::::::::::::::::::::

MTF verifies whether the application exists in the OpenShift environment:

2017-12-18 14:29:36,629 process L0389 INFO | Running 'oc get dc memcached -o json' 2017-12-18 14:29:36,842 process L0479 DEBUG| [stderr] Error from server (NotFound): deploymentconfigs.apps.openshift.io "memcached" not found 2017-12-18 14:29:36,846 process L0499 INFO | Command 'oc get dc memcached -o json' finished with 1 after 0.213222980499s

In the next step MTF verifies whether the pod exists in OpenShift:

2017-12-18 14:29:36,847 process L0389 INFO | Running 'oc get pods -o json' 2017-12-18 14:29:37,058 process L0479 DEBUG| [stdout] { 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "apiVersion": "v1", 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "items": [], 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "kind": "List", 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "metadata": {}, 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "resourceVersion": "", 2017-12-18 14:29:37,059 process L0479 DEBUG| [stdout] "selfLink": "" 2017-12-18 14:29:37,060 process L0479 DEBUG| [stdout] } 2017-12-18 14:29:37,064 process L0499 INFO | Command 'oc get pods -o json' finished with 0 after 0.211796045303s

The next step creates an application with the given label mtf_testing and with the name taken from the config.yaml file in the container tag.

2017-12-18 14:29:37,064 process L0389 INFO | Running 'oc new-app -l mtf_testing=true docker.io/modularitycontainers/memcached --name=memcached' 2017-12-18 14:29:39,022 process L0479 DEBUG| [stdout] --> Found Docker image bbc8bba (5 weeks old) from docker.io for "docker.io/modularitycontainers/memcached" 2017-12-18 14:29:39,022 process L0479 DEBUG| [stdout] 2017-12-18 14:29:39,022 process L0479 DEBUG| [stdout] memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. 2017-12-18 14:29:39,022 process L0479 DEBUG| [stdout] 2017-12-18 14:29:39,022 process L0479 DEBUG| [stdout] Tags: memcached 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] * An image stream will be created as "memcached:latest" that will track this image 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] * This image will be deployed in deployment config "memcached" 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] * Port 11211/tcp will be load balanced by service "memcached" 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] * Other containers can access this service through the hostname "memcached" 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] 2017-12-18 14:29:39,023 process L0479 DEBUG| [stdout] --> Creating resources with label mtf_testing=true ... 2017-12-18 14:29:39,032 process L0479 DEBUG| [stdout] imagestream "memcached" created 2017-12-18 14:29:39,043 process L0479 DEBUG| [stdout] deploymentconfig "memcached" created 2017-12-18 14:29:39,063 process L0479 DEBUG| [stdout] service "memcached" created 2017-12-18 14:29:39,064 process L0479 DEBUG| [stdout] --> Success 2017-12-18 14:29:39,064 process L0479 DEBUG| [stdout] Run 'oc status' to view your app. 2017-12-18 14:29:39,069 process L0499 INFO | Command 'oc new-app -l mtf_testing=true docker.io/modularitycontainers/memcached --name=memcached' finished with 0 after 2.00025391579s

The next step verifies whether the application is really running and on which IP address it’s reachable:

2017-12-18 14:29:46,201 process L0389 INFO | Running 'oc get service -o json' 2017-12-18 14:29:46,416 process L0479 DEBUG| [stdout] { 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "apiVersion": "v1", 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "items": [ 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] { 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "apiVersion": "v1", 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "kind": "Service", 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "metadata": { 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "annotations": { 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] "openshift.io/generated-by": "OpenShiftNewApp" 2017-12-18 14:29:46,417 process L0479 DEBUG| [stdout] }, 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "creationTimestamp": "2017-12-18T13:29:39Z", 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "labels": { 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "app": "memcached", 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "mtf_testing": "true" 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] }, 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "name": "memcached", 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "namespace": "myproject", 2017-12-18 14:29:46,418 process L0479 DEBUG| [stdout] "resourceVersion": "2121", 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "selfLink": "/api/v1/namespaces/myproject/services/memcached", 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "uid": "7f50823d-e3f7-11e7-be28-507b9d4150cb" 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] }, 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "spec": { 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "clusterIP": "", 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "ports": [ 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] { 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "name": "11211-tcp", 2017-12-18 14:29:46,419 process L0479 DEBUG| [stdout] "port": 11211, 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] "protocol": "TCP", 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] "targetPort": 11211 2017-12-18 14:29:46,420 process L0499 INFO | Command 'oc get service -o json' finished with 0 after 0.213701963425s 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] } 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] ], 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] "selector": { 2017-12-18 14:29:46,420 process L0479 DEBUG| [stdout] "app": "memcached", 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "deploymentconfig": "memcached", 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "mtf_testing": "true" 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] }, 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "sessionAffinity": "None", 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "type": "ClusterIP" 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] }, 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "status": { 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] "loadBalancer": {} 2017-12-18 14:29:46,421 process L0479 DEBUG| [stdout] } 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] } 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] ], 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] "kind": "List", 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] "metadata": {}, 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] "resourceVersion": "", 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] "selfLink": "" 2017-12-18 14:29:46,422 process L0479 DEBUG| [stdout] }

In the last phase, tests are executed.

2017-12-18 14:29:46,530 output L0655 DEBUG| Expecting STORED 2017-12-18 14:29:46,531 output L0655 DEBUG| STORED was catched 2017-12-18 14:29:46,632 avocado_test L0069 DEBUG| :::::::::::::::::::::::: TEARDOWN :::::::::::::::::::::::: 2017-12-18 14:29:46,632 process L0389 INFO | Running 'oc get dc memcached -o json' 2017-12-18 14:29:46,841 process L0479 DEBUG| [stdout] { 2017-12-18 14:29:46,841 process L0479 DEBUG| [stdout] "apiVersion": "v1", 2017-12-18 14:29:46,841 process L0479 DEBUG| [stdout] "kind": "DeploymentConfig", 2017-12-18 14:29:46,841 process L0479 DEBUG| [stdout] "metadata": {

At the end of the tests, you can verify whether the service is running in OpenShift environment using the command oc status:

$ sudo oc status In project My Project (myproject) on server You have no services, deployment configs, or build configs. Run 'oc new-app' to create an application.

From this output, you can see that you can test an arbitrary container and afterward, the OpenShift environment is cleared.


As you may have seen in this aricle, writing tests for containers is really easy. This helps you guarantee that a container is working properly just as an RPM package would. In the near future, MTF plans to extend its capabilities with S2I testing, and testing containers with OpenShift templates. You can read more in the MTF documentation.


4 cool new projects to try in COPR for January

Mer, 24/01/2018 - 12:12

COPR is a collection of personal repositories for software that isn’t carried in Fedora. Some software doesn’t conform to standards that allow easy packaging. Or it may not meet other Fedora standards, despite being free and open source. COPR can offer these projects outside the Fedora set of packages. Software in COPR isn’t supported by Fedora infrastructure or signed by the project. However, it can be a neat way to try new or experimental software.

Here’s a set of new and interesting projects in COPR.


Elisa is a minimal music player. It lets you browse music by albums, artists or tracks. It automatically detects all playable music in your ~/Music directory, thus it requires no set up at all – neither does it offer any. Currently, Elisa focuses on being a simple music player, so it offers no tools for managing your music collection.

Installation instructions

The repo currently provides Elisa for Fedora 26, 27 and Rawhide. To install Elisa, use these commands:

sudo dnf copr enable eclipseo/elisa sudo dnf install elisa Bing Wallpapers

Bing Wallpapers is a simple program that downloads Bing’s wallpaper of the day and sets it as a desktop wallpaper or a lock screen image. The program can rotate over pictures in its directory in set intervals as well as delete old pictures after a set amount of time.

Installation instructions

The repo currently provides Bing Wallpapers for Fedora 25, 26, 27 and Rawhide. To install Bing Wallpapers, use these commands:

sudo dnf copr enable julekgwa/Bingwallpapers sudo dnf install bingwallpapers Polybar

Polybar is a tool for creating status bars. It has a lot of customization options as well as built-in functionality to display information about commonly used services, such as systray icons, window title, workspace and desktop panel for bspwm, i3, and more. You can also configure your own modules for your status bar. See Polybar’s wiki for more information about usage and configuration.

Installation instructions

The repo currently provides Polybar for Fedora 27. To install Polybar, use these commands:

sudo dnf copr enable tomwishaupt/polybar sudo dnf install polybar Netdata

Netdata is a distributed monitoring system. It can run on all your systems including PCs, servers, containers and IoT devices, from which it collects metrics in real time. All the information then can be accessed using netdata’s web dashboard. Additionally, Netdata provides pre-configured alarms and notifications for detecting performance issue, as well as templates for creating your own alarms.

Installation instructions

The repo currently provides netdata for EPEL 7, Fedora 27 and Rawhide. To install netdata, use these commands:

sudo dnf copr enable recteurlp/netdata sudo dnf install netdata

Never miss a Magazine’s article, build your own RSS notification system

Mar, 23/01/2018 - 11:30

Python is a great programming language to quickly build applications that make our life easier. In this article we will learn how to use Python to build a RSS notification system, the goal being to have fun learning Python using Fedora. If you are looking for a complete RSS notifier application, there are a few already packaged in Fedora.

Fedora and Python – getting started

Python 3.6 is available by default in Fedora, that includes Python’s extensive standard library. The standard library provides a collection of modules which make some tasks simpler for us. For example, in our case we will use the sqlite3 module to create, add and read data from a database. In the case where a particular problem we are trying to solve is not covered by the standard library, the chance is that someone has already developed a module for everyone to use. The best place to search for such modules is the Python Package Index known as PyPI. In our example we are going to use the feedparser to parse an RSS feed.

Since feedparser is not in the standard library, we have to install it in our system. Luckily for us there is an rpm package in Fedora, so the installation of feedparser is as simple as:

$ sudo dnf install python3-feedparser

We now have everything we need to start coding our application.

Storing the feed data

We need to store data from the articles that have already been published so that we send a notification only for new articles. The data we want to store will give us a unique way to identify an article. Therefore we will store the title and the publication date of the article.

So let’s create our database using python sqlite3 module and a simple SQL query. We are also adding the modules we are going to use later (feedparser, smtplib and email).

Creating the Database #!/usr/bin/python3 import sqlite3 import smtplib from email.mime.text import MIMEText import feedparser db_connection = sqlite3.connect('/var/tmp/magazine_rss.sqlite') db = db_connection.cursor() db.execute('CREATE TABLE IF NOT EXISTS magazine (title TEXT, date TEXT)')

These few lines of code create a new sqlite database stored in a file called ‘magazine_rss.sqlite’, and then create a new table within the database called ‘magazine’. This table has two columns – ‘title’ and ‘date’ – that can store data of the type TEXT, which means that the value of each column will be a text string.

Checking the Database for old articles

Since we only want to add new articles to our database we need a function that will check if the article we get from the RSS feed is already in our database or not. We will use it to decide if we should send an email notification (new article) or not (old article). Ok let’s code this function.

def article_is_not_db(article_title, article_date): """ Check if a given pair of article title and date is in the database. Args: article_title (str): The title of an article article_date (str): The publication date of an article Return: True if the article is not in the database False if the article is already present in the database """ db.execute("SELECT * from magazine WHERE title=? AND date=?", (article_title, article_date)) if not db.fetchall(): return True else: return False

The main part of this function is the SQL query we execute to search through the database.  We are using a SELECT instruction to define which column of our magazine table we will run the query on. We are using the * symbol to select all columns ( title and date). Then we ask to select only the rows of the table WHERE the article_title and article_date string are equal to the value of the title and date column.

To finish, we have a simple logic that will return True if the query did not return any results and False if the query found an article in database matching our title, date pair.

Adding a new article to the Database

Now we can code the function to add a new article to the database.

def add_article_to_db(article_title, article_date): """ Add a new article title and date to the database Args: article_title (str): The title of an article article_date (str): The publication date of an article """ db.execute("INSERT INTO magazine VALUES (?,?)", (article_title, article_date)) db_connection.commit()

This function is straight forward, we are using a SQL query to INSERT a new row INTO the magazine table with the VALUES of the article_title and article_date. Then we commit the change to make it persistent.

That’s all we need from the database’s point of view, let’s look at the notification system and how we can use python to send emails.

Sending an email notification

Let’s create a function to send an email using the python standard library module smtplib. We are also using the email module from the standard library to format our email message.

def send_notification(article_title, article_url): """ Add a new article title and date to the database Args: article_title (str): The title of an article article_url (str): The url to access the article """ smtp_server = smtplib.SMTP('smtp.gmail.com', 587) smtp_server.ehlo() smtp_server.starttls() smtp_server.login('your_email@gmail.com', '123your_password') msg = MIMEText(f'\nHi there is a new Fedora Magazine article : {article_title}. \nYou can read it here {article_url}') msg['Subject'] = 'New Fedora Magazine Article Available' msg['From'] = 'your_email@gmail.com' msg['To'] = 'destination_email@gmail.com' smtp_server.send_message(msg) smtp_server.quit()

In this example I am using the Google mail smtp server to send an email, but this will work with any email services that provides you with a SMTP server. Most of this function is boilerplate needed to configure the access to the smtp server. You will need to update the code with your email address and credentials.

If you are using 2 Factor Authentication with your gmail account you can setup a password app that will give you a unique password to use for this application. Check out this help page.

Reading Fedora Magazine RSS feed

We now have functions to store an article in the database and send an email notification, let’s create a function that parses the Fedora Magazine RSS feed and extract the articles’ data.

def read_article_feed(): """ Get articles from RSS feed """ feed = feedparser.parse('https://fedoramagazine.org/feed/') for article in feed['entries']: if article_is_not_db(article['title'], article['published']): send_notification(article['title'], article['link']) add_article_to_db(article['title'], article['published']) if __name__ == '__main__': read_article_feed() db_connection.close()

Here we are making use of the feedparser.parse function. The function returns a dictionary representation of the RSS feed, for the full reference of the representation you can consult feedparser ‘s documentation.

The RSS feed parser will return the last 10 articles as entries and then we extract the following information: the title, the link and the date the article was published. As a result, we can now use the functions we have previously defined to check if the article is not in the database, then send a notification email and finally, add the article to our database.

The last if statement is used to execute our read_article_feed function and  then close the database connection when we execute our script.

Running our script

Finally, to run our script we need to give the correct permission to the file. Next, we make use of the cron utility to automatically execute our script every hour (1 minute past the hour). cron is a job scheduler that we can use to run a task at a fixed time.

$ chmod a+x my_rss_notifier.py $ sudo cp my_rss_notifier.py /etc/cron.hourly

To keep this tutorial simple, we are using the cron.hourly directory to execute the script every hours, I you wish to learn more about cron and how to configure the crontab, please read cron’s wikipedia page.


In this tutorial we have learned how to use Python to create a simple sqlite database, parse an RSS feed and send emails. I hope that this showed you how you can easily build your own application using Python and Fedora.

The script is available on github here.

How to change the Plymouth bootup theme

Ven, 19/01/2018 - 11:24

When starting Fedora, users are greeted with a neat graphical bootup sequence. The underlying software that displays the bootup graphics is called Plymouth, and the great thing is that it can be customized with different themes. In Fedora, the default theme is called Charge, and most users will be familiar with it, as it has been the default theme for many releases.

Default plymouth boot theme, “Charge”

Other than Charge, Fedora workstation ships with a handful of other basic themes, but more are available in the Fedora repositories. In this article we will cover the basic procedure to change your theme, and cover some of the additional themes available in the Fedora repositories.

Changing the Plymouth theme

The plymouth-set-default-theme is a utility in Fedora for changing the theme. However, before changing the theme, we will need to know what themes are available and installed on the system. Get a list of the installed themes with the following command:

$ plymouth-set-default-theme --list charge details text tribar

You can also use the utility to check what is the current Plymouth theme:

$ plymouth-set-default-theme charge

To change your Plymouth theme to “tribar”, use the following command.

$ sudo plymouth-set-default-theme tribar -R

Note that the -R flag will rebuild your initrd, and the next time you reboot your system, you will see the new theme in action.

More themes in the Fedora Repos

The official Fedora repositories contain a number of additional themes to try out. To use these, first install the package with dnf, then enable using the instructions above.


Spinner is a minimal theme with, as the name suggests, just a spinner to show you the bootup is still underway.

Install and enable this theme with the commands:

$ sudo dnf install plymouth-theme-spinner $ sudo plymouth-set-default-theme spinner -R Spinfinity

Spinfinity is a Fedora branded theme. It has an infinity symbol shaped indicator, as well as a plain white progress bar at the bottom of the screen.

Install and enable this theme with the commands:

$ sudo dnf install plymouth-theme-spinfinity $ sudo plymouth-set-default-theme spinfinity -R hot-dog theme

Take your Fedora back to 2012, and try out the Beefy Miracle theme. In this one, The Mustard Indicates Progress!

Install and enable this theme with the commands:

$ sudo dnf install plymouth-theme-hot-dog $ sudo plymouth-set-default-theme hot-dog -R



Configure software repositories in Fedora

Mer, 17/01/2018 - 09:00

Your Fedora system gets its software from repositories, or repos. Each of these repos can have any number of software apps available for you to install and use. The official Fedora repos contain thousands of free and open source apps. Some repos may have free or proprietary apps. Some only contain one. You may want to configure software repositories at certain times.

Fortunately, this is easy in Fedora. For instance, you may want to get a package to test and see if it fixes a bug. In that case, you’d want to turn on Fedora’s testing repo. You might want to leave it on to get more packages for testing. Or you might want to turn it off, to stop participating.

Configuring with the command line

To configure repos at the command line, use the dnf command. To see a list of all enabled repos, use this command:

sudo dnf repolist

You can use command options to change configuration for just one command. To enable or disable a repo just once, use a command option:

sudo dnf --enablerepo=<reponame>... sudo dnf --disablerepo=<reponame>...

Follow the option with the actual dnf command. For instance, to install the latest kernel from Fedora’s test repo:

sudo dnf --enablerepo=updates-testing install kernel\*

You can combine several enable and disable options together. For example:

sudo dnf --enablerepo=repo1 --disablerepo=repo2,repo3 install <package>

If you want to change the defaults permanently, use these commands:

sudo dnf config-manager --set-enabled <reponame> sudo dnf config-manager --set-disabled <reponame> Backing out confusion

Perhaps you install, update, or remove a lot of software using different setups. In this case, things may get confusing. You might not know which software is installed from what repos. If that happens, try this.

First, disable extra repos such as those ending in –testing. Ideally, enable only fedora and updates repos. Run this command for each unwanted repo:

sudo dnf config-manager --set-disabled <unwanted-repo>

Then run this command to synchronize your system with just stable, updated packages:

sudo dnf distro-sync

This ensures your Fedora system is only using the latest packages from specific repos.

For lots more detail on repositories, visit the Fedora wiki.

An update on ongoing Meltdown and Spectre work

Lun, 15/01/2018 - 06:17

Last week, a series of critical vulnerabilities called Spectre and Meltdown were announced. Because of the nature of these issues, the solutions are complex and requires fixing delicate code. The fixes for Meltdown are mostly underway. The Meltdown fix for x86 is KPTI. KPTI has been merged into the mainline Linux tree and many stable trees, including the ones Fedora uses. Fixes for other arches are close to being done and should be available soon. Fixing Spectre is more difficult and requires fixes across multiple areas.

Similarly to Meltdown, Spectre takes advantage of speculation done by CPUs. Part of the fix for Spectre is disallowing the CPU to speculate in particular vulnerable sequences. One solution developed by Google and others is to introduce “retpolines” which do not allow speculation. A sequence of code that might allow dangerous speculation is replaced with a “retpoline” which will not speculate. The difficult part of this solution is that the compiler needs to be aware of where to place a retpoline. This means a complete solution involves the compiler as well.

The first part of the work necessary for retpoline is now done. This should be completely merged in the next few days and available in Fedora stable releases shortly. These patches by themselves do provide a degree of protection against Spectre attacks but more work is needed to be a complete solution. The compiler support to provide further protection are still under review by upstream developers. Support for other arches is ongoing.

An alternative to the retpoline patches involves exposing some hardware features to more tightly control speculation. Some CPUs have a feature called Indirect Branch Restricted Speculation (IBRS). When this feature is enabled, userspace programs are further restricted in how they are able to speculatively execute instructions. Fully supporting this feature requires microcode updates, some of which are available now with others available shortly. IBRS provides a more complete solution without the need for compiler support but at a higher performance cost. The IBRS patches are still under review and should be merged eventually but will not be available in time for 4.15. When the IBRS patches are available, we will be backporting them to Fedora stable branches.

Both IBRS and retpoline cover the “variant 2” version of Spectre. The “variant 1” version of Spectre doesn’t have a solution with a quick and catchy name. The solution for variant 1 involves scanning the code for sequences that may be problematic. The method for scanning the code tends to produce many false positives (sequences that are not actually vulnerable) so upstream developers are trying to narrow down which parts of the code actually need fixing. Fixes for sequences which are known to be vulnerable have been merged.

Although Spectre is an important security issue, just as important is careful review of fixes to make sure the solution is maintainable. Rushing a fix could cause more problems in the future. The Fedora team is continually monitoring Spectre fixes to bring them to you when they are ready.

Submit Wallpaper for Fedora 28 Supplemental Wallpaper!

Ven, 12/01/2018 - 02:20

Each release, the Fedora Design team works with the community on a set of 16 additional wallpapers. Users can install and use these to supplement the standard wallpaper. Submissions are now open for the Fedora 28 Supplemental Wallpapers, and will remain open until February 13, 2018.

You always wanted to start contributing to Fedora but don’t know how? Contributing a supplemental wallpaper is one of the easiest way to start as a Fedora Contributor.

What exactly are the supplemental wallpapers?

Supplemental wallpapers are the non-default wallpapers provided with Fedora. Each release, the Fedora Design team works with the community on a set of 16 additional wallpapers. Users can install and use these to supplement the standard wallpaper.

If you are looking for some inspiration when submitting, here are the winners from the last Supplemental wallpapers package:

Dates and deadlines

The submission phase opens January 2, 2018 and ends February 12 at 23:59 UTC.

Important note, submissions during the last hours can in certain circumstances not get into the election, if there is no time to do the legal research.

The legal research is done by hand and very time consuming, so please help by following the guidelines correctly and submit only work that has the correct license.

The voting will open automatically 13 February 2018 and will be open until February 25 2018 at 23:59 UTC

How to contribute

Fedora uses for the submission the application Nuancier for managing the submissions and the voting process. Nuancier has the full list of rules and guidelines for submitting a wallpaper. The recommended license for submissions is CC-BY-SA — Note that we can not accept NC (no commercial use) or ND (no derrivatives) submissions.

For an submission you need an Fedora account. If you have none, you have to create one before here. For being allowed to vote, you must have membership in another group as cla_done or cla_fpca.

The number of submissions a contributor can make is limited. A participant can only upload two submissions to Nuancier. In case you submit multiple versions of the same image, the team will choose one version of it and accept it as one submission.

Submissions from previous supplemental wallpapers contests will not be selected. Creations which have not an essential height get rejected. Denied submissions also count, so if you make two contributions and both are rejected, you cannot submit more. Use your best judgment for your submissions.


Vipul Siddharth: How Do You Fedora?

Mer, 10/01/2018 - 13:41

We recently interviewed Vipul Siddharth on how he uses Fedora. This is part of a series on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the feedback form to express your interest in becoming a interviewee.

Who is Vipul Siddharth?

Vipul Siddharth is an intern at Red Hat. He is pursuing a bachelors degree in computer applications from Christ University in Bengaluru, India. Vipul started using Linux in 2015 His first distribution was Fedora and despite trying Arch, Elementary and others Fedora remains his primary operating system.

Siddarth’s current daily routine starts with working out, the college and finally the office. He is currently working on Fedora Cloud. “Now I am working on building a testing framework for fedora cloud.” Along with this, he regularly contributes to Fedora Quality Assurance. Vipul also organizes FOSS and Fedora events. “I have organized Fedora activity days and fedora-release parties for Fedora 25 and 26.”

Siddharth’s childhood hero was Goku from Dragon Ball Z. “I wanted to eat, laugh and protect the world like him. I kinda still do.” Vipul’s favorite movies are 12 Angry Men and The Godfather (I, II and III)

Vipul is a self-taught Python programmer. “I learnt basic python form a free course on Codecademy. After that, I started referring few books like ‘learn python the hard way’ and ‘learning python'”. He continued his learning by reviewing code in open source projects. He recommends ‘Competitive Programming 3 by Steven Halim and Felix Halim’ for data structure.

When asked about his favorite food Vipul responded that he switched to “the salad life”, but confided that he enjoys a few spoons of Nutella as an ocassional treat. “I used to be 130 Kgs and lost 53 Kgs (116 lbs) in a year and a half.” In order to do this he had to give up junk food.

Siddarth’s hobbies include both intellectual and physical pursuits. The physical pursuits couple with his rabbit food meal plan help keep him in shape. “If I am free even for 2-3 hours, I try to go to the gym. I love working out.” The intellectual pursuits involve using Fedora to pursue digital content. “Other than that, I visit quora and Reddit too often and read popular threads/subreddits.”

The Fedora Community

Vipul is an active particpant in the Fedora Community with Quality Assurance. “I participated in Fedora 24 graphical upgrade testing at Red Hat Bangalore office which was organized by Sumantro Mukherjee.” Mukherjee mentored Siddharth and helped him with his first QA contribution. Siddarth’s first impression of the Fedora Community he responded, “Friendly, easily approachable and very helpful.”

Siddarth would like to see the Fedora community grow in India and sees universities as the key to that growth. “I would love to increase Fedora community in India. I have already started a step towards the goal.” Vipul works with a few friends to organize ‘FOSS and Fedora’ sessions in multiple univerisities. His hope is that the Fedora becomes more well known among college students. He believes having more active Fedora ambassadors in India will positively impact the growth.

Vipul truly embraces the four cornerstones of Fedora: Freedom, Friends, Features, First. “Fedora uses bleeding edge technologies. It leads the pack by showing the path that others follow.” He feels this makes Fedora the perfect platform for students to learn and grow with. “This makes it a great learning platform especially for developers and students who wants to be up to date with technologies.” Siddarth also feels that the Fedora Community is excellent place for students and developers to get started. “I wish people knew how easy it is to start contribution at here because of the super helpful community.”

Vipul had two suggestions for becoming involved in the Fedora Community. “Just drop an Introductory email to user@fedoraproject.org and let them know what you are interested in.” In the case of not being sure about an area of interest Siddarth suggests approaching a Fedora Ambassador. “If you are not sure about your interest, approaching ambassadors to organise a Fedora Onboarding calls is a great idea. They can help you by making all the possible areas clear.” Vipul had a humorous reminder for those considering where to get involved. “Software is written by humans and therefore has bugs.”

What Hardware?

Vipul uses a Lenovo Thinkpad T440p at work. It is equipped with an Intel Core i7-4710MQ Processor, a 512GB SSD. “This laptop is great for running multiple VMs at once.” He uses a Thinkpad docking station to attach to a dell 24” monitor. Siddarth uses a Lenovo N50 wireless mouse and would like to eventually get a DAS professional keyboard. His personal computer is a Dell 7548 which is a touchscreen laptop.

What Software?

Siddarth mentione an array of software that he makes use of. It all starts with Fedora on both systems. “I am using Fedora 27 on both my systems and it works flawlessly. I have customised my fedora with gnome-shell extensions and an icon pack and it looks absolutely gorgeous.” His favorite extensions are: Dash to dock, Coverflow alt-tab, Clipboard Indicator, Multi-Monitor add-ons, and pomodoro. “I tried multiple finger touch, pinch in zoom, scroll and they are working flawlessly on my T440p.” He uses Clipboard Indicator to cache clipboard history. “Clipboard Indicator is a clipboard manager which caches clipboard history allowing to select from and paste up to 50 entries. It especially helps in writing playbook when we try to arrange tasks in order.” Pomodoro is a time organizer. “Pomodor helps me to focus on working in a systematic manner. I work with complete focus for 40 minutes then 10 minues break. Once I am refreshed, start again. Every three repetition, It reminds me to take a 30 minutes break.”

Vipul uses VIM and Atom for text editors. “I absolutely love VIM. I use the ultimate vim configuration.” Atom helps with navigating through a tree of project files. He makes ues of Terminator and Gnome-terminal. Vipul kicks his terminal experience up another notch using a framework for managing his zsh configuration. “I use oh-my-zsh to boost terminal experience.” He also make use of the following: GIMP, Darktable, HexChat, Riot, VLC media player, and SMplayer.

KPTI — the new kernel feature to mitigate “meltdown”

Ven, 05/01/2018 - 03:12

A new set of vulnerabilities were disclosed recently. As part of mitigating “meltdown”, the kernel introduced a new feature called Kernel Page Table Isolation (KPTI). This was a big change to come in late in the typical kernel development cycle but it provides important protection with some performance penalty. Updated kernels for supported versions of Fedora contain the KPTI patches. This article a high level overview of how KPTI works.

Modern processors for desktop computers offer different security levels to run code. The kernel runs at the most privileged level (“kernel space”) since it needs to access all parts of the hardware. Almost all other applications run at a lower privilege level (“user space”) and make system calls into the kernel to access privileged data.

Modern processors for desktop computers also support virtual memory. The kernel sets up page tables to control the mapping between a virtual address and physical address. Access between kernel and userspace is also controlled by page tables. A page that is mapped for the kernel is not accessible by userspace although the kernel can typically access user space.

Translating these mappings can be expensive so the hardware has a translation lookaside buffer (TLB) to store mappings. Sometimes it’s necessary to remove the old mappings (“flush the TLB”) but doing so is costly and code is written to minimize such calls. One trick here is to always have the kernel page tables mapped when user processes are running. The page table permissions prevent userspace from accessing the kernel mappings but the kernel can access the mappings immediately when a system call is made.

Meltdown exploit and how KPTI mitigates it

The meltdown exploit demonstrated that having the kernel mapping available in userspace can be risky. Modern processors prefetch data from all mappings to run as fast as possible. What data gets prefetched depends on the CPU implementation. When a running userspace program accesses a kernel mapping, it will take a fault and typically crash the program. The CPU however, may prefetch kernel data without causing any change to the running program. Prefetching is not usually a security risk because there are still permission checks on the addresses so userpace programs cannot access kernel data. What the meltdown researchers discovered was it was possible to measure how long data accesses took on prefetched data to gain information about the system. This is what’s referred to as a side-channel attack. The KPTI patches reworked how page tables are set up so that the kernel is no longer mapped in userspace. This means that userspace cannot prefetch any kernel data and thus the exploit is mitigated.

Actually writing an attack to collect useful data from this exploit can take weeks or months to develop for a single system. Still, in the interests of security the KPTI patches were merged to close this hole. The side effect of not having the kernel page tables always mapped means that the TLBs must be flushed more often, causing a performance penalty. By default, Fedora has KPTI enabled to provide security for users. KPTI can be turned off by passing “nopti” on the command line if users don’t want the performance hit.


Protect your Fedora system against Meltdown

Gio, 04/01/2018 - 01:06

You may have heard about Meltdown, an exploit that can be used against modern processors (CPUs) to maliciously gain access to sensitive data in memory. This vulnerability is serious, and can expose your secret data such as passwords. Here’s how to protect your Fedora system against the attack.

Guarding against Meltdown

New kernel packages contain fixes for Fedora 26 and 27 (kernel version 4.14.11), as well as Rawhide (kernel 4.15 release candidate). The maintainers have submitted updates to the stable repos. They should show up within a day or so for most users.

To update your Fedora system, use this command once you configure sudo. Type your password at the prompt, if necessary.

sudo dnf --refresh update kernel

Fedora provides worldwide mirrors at many download sites to better serve users. Some sites refresh their mirrors at different rates. If you don’t get an update right away, wait until later in the day.

If your system is on Rawhide, run sudo dnf update to get the update.

A note on Spectre

Spectre is the common name for another serious vulnerability that exploits both processor and software design to maliciously expose secret data. Work is ongoing by upstream developers, vendors, and researchers to mitigate this vulnerability. The Fedora team will continue to monitor their progress and notify the public about updates as they become available.

Best of 2017: articles for System Administrators

Mer, 03/01/2018 - 14:00

It has been a full year here at the Fedora Magazine, and now it is over, we are looking back at some of the awesome content from our contributors. Here are some of the best articles from our contributors that are useful for system administrators.

Installing WordPress on Fedora

Looking for a step-by-step tutorial on setting up WordPress on your Fedora server? Look no further:

How to install WordPress on Fedora

Configuring Sudo

This awesome quick tip walks you though setting up sudo — either at install-time, or after-the-fact:

Configure your Fedora system to use sudo

Installing Apache

Apache is available in the official Fedora repos. This article shows you how easy it is an set up a web server on Fedora.

How to install Apache web server on Fedora

How to boot to an earlier Kernel

On rare occasions, though, a new kernel can bring an issue with it. You might need to revert to an older one to keep things working until the bug is fixed. This article shows you how.

How to boot an earlier kernel on Fedora

Changing Kernel options

Learn how kernel configurations are generated and how to best make changes for a custom kernel.

Changing Fedora kernel configuration options

The header image for this post contains Laurel Wreath created by Gabriella Fono from the Noun Project & the server icon created by Aybige from the Noun Project.

Best of 2017: command line & terminal articles

Ven, 29/12/2017 - 09:00

It has been a full year here at the Fedora Magazine, and now it is nearing its end, we are looking back at some of the awesome content from our contributors. We feature many articles throughout the year that are focused on helping people get the most out of the command line. Here are some of the best articles from our contributors that cover command line tips and tricks.


Taskwarrior is a flexible command-line task management program, allowing you to manage your TODO list from the command line. This article covers the basic commands, a handful of more advanced commands, as well as some basic configuration settings.


Getting Started with Taskwarrior


If you write or maintain non-trivial bash scripts, you might want to check out this article. Argbash is a utility to make bash scripts accept command-line arguments in a standard and robust way.

Improve your Bash scripts with Argbash

Voice synth from the command line

Add speech to your Fedora system

GNU Nano

Learn the basics of Nano, a minimalist console text editor.

GNU nano: a minimalist console editor

Try the Tilix terminal emulator

If you’ve been in a terminal for a while and want to try something new, why not look at Tilix? Tilix is a tilable emulator that lets you split your terminal windows in different ways at once. It also follows the GNOME Human Interface Guidelines to be as user-friendly as possible. Learn how to get started with Tilix in Fedora 26 in this article.

Try Tilix — a new terminal emulator in Fedora

The header image for this post contains Laurel Wreath created by Gabriella Fono from the Noun Project & the command prompt icon created by Arthus Shlain from the Noun Project.

Best of 2017: articles for desktop users

Mer, 27/12/2017 - 09:00

It has been a full year here at the Fedora Magazine, and now it is nearing its end, we are looking back at some of the awesome content from our contributors. We feature many articles throughout the year that are focused on users that use Fedora as a Desktop OS. Here are some of the best articles from our contributors that are useful for Fedora Workstation users.

GNOME Photos

GNOME Photos is a photo library application that also — in recent years — gained basic editing features. This article walks you through the basics of editing images with GNOME Photos

Enhancing photos with GNOME Photos

Using Nautilus Scripts

Scripts in Nautilus are not a new feature, but still super useful for automating quick tasks into the File Browser.

Integrating scripts in Nautilus to perform useful tasks

Backing up with Déjà Dup

We all know backing up your system is important. This article — part of a series about backing up your Fedora system — walks you though setting up backups with the Déjà Dup utility.

Easy backups with Déjà Dup

Calculator in the Overview

The overview in Fedora workstation is equipped with search providers that allow apps to show results when searching. The Calculator app uses this feature to let you do simple calculations quickly via the search.

Quick tip: calculator in the Fedora Workstation overview


Flatpak can roughly be described as a modern replacement for RPMs, but its impact is far more significant than simply offering a new packaging format.This article covers what Flatpak is, and how to install Flatpaks on your Fedora system.

Getting Started with Flatpak

Installing more Wallpapers

The Fedora repos contain a treasure trove of wallpapers created for Fedora releases. This article shows you the wallpapers available from previous releases — going back to Fedora 8 — and what packages to install to get them on your current Fedora install.

How to install more wallpaper packs on Fedora Workstation

The header image for this post contains Laurel Wreath created by Gabriella Fono from the Noun Project & the laptop icon created by Saeful Muslim from the Noun Project.