Fedora, like all Linux based systems, comes with a powerful set of security features. One of the basic features is permissions on files and folders. These permissions allow files and folders to be secured from unauthorized access. This article explains a bit about these permissions, and shows you how to share access to a folder using them.
Permission basics
Fedora is by nature a multi-user operating system. It also has groups, which users can be members of. But imagine for a moment a multi-user system with no concept of permissions. Different logged in users could read each other’s content at will. This isn’t very good for privacy or security, as you can imagine.
Any file or folder on Fedora has three sets of permissions assigned. The first set is for the user who owns the file or folder. The second is for the group that owns it. The third set is for everyone else who’s not the user who owns the file, or in the group that owns the file. Sometimes this is called the world.
What permissions mean
Each set of permissions comes in three flavors — read, write, and execute. Each of these has an initial that stands for the permission, thus r, w, and x.
File permissions
For files, here’s what these permissions mean:
Read (r): the file content can be read
Write (w): the file content can be changed
Execute (x): the file can be executed — this is used primarily for programs or scripts that are meant to be run directly
You can see the three sets of these permissions when you do a long listing of any file. Try this with the /etc/services file on your system:
Notice the groups of permissions at the left side of the listing. These are provided in three sets, as mentioned above — for the user who owns the file, for the group that owns the file, and for everyone else. The user owner is root and the group owner is the root group. The user owner has read and write access to the file. Anyone in the group root can only read the file. And finally, anyone else can also only read the file. (The dash at the far left shows this is a regular file.)
By the way, you’ll commonly find this set of permissions on many (but not all) system configuration files. They are only meant to be changed by the system administrator, not regular users. Often regular users need to read the content as well.
Folder (directory) permissions
For folders, the permissions have slightly different meaning:
Read (r): the folder contents can be read (such as the ls command)
Write (w): the folder contents can be changed (files can be created or erased in this folder)
Execute (x): the folder can be searched, although its contents cannot be read. (This may sound strange, but the explanation requires more complex details of file systems outside the scope of this article. So just roll with it for now.)
Take a look at the /etc/grub.d folder for example:
$ ls -ld /etc/grub.d drwx------. 2 root root 4096 May 23 16:28 /etc/grub.d
Note the d at the far left. It shows this is a directory, or folder. The permissions show the user owner (root) can read, change, and cd into this folder. However, no one else can do so — whether they’re a member of the root group or not. Notice you can’t cd into the folder, either:
$ cd /etc/grub.d bash: cd: /etc/grub.d: Permission denied
Notice how your own home directory is setup:
$ ls -ld $HOME drwx------. 221 paul paul 28672 Jul 3 14:03 /home/paul
Now, notice how no one, other than you as the owner, can access anything in this folder. This is intentional! You wouldn’t want others to be able to read your private content on a shared system.
Making a shared folder
You can exploit this permissions capability to easily make a folder to share within a group. Imagine you have a group called finance with several members who need to share documents. Because these are user documents, it’s a good idea to store them within the /home folder hierarchy.
To get started, use sudo to make a folder for sharing, and set it to be owned by the finance group:
By default the new folder has these permissions. Notice how it can be read or searched by anyone, even if they can’t create or erase files in it:
drwxr-xr-x. 2 root root 4096 Jul 6 15:35 finance
That doesn’t seem like a good idea for financial data. Next, use the chmod command to change the mode (permissions) of the shared folder. Note the use of g to change the owning group’s permissions, and o to change other users’ permissions. Similarly, u would change the user owner’s permissions:
$ sudo chmod g+w,o-rx /home/shared/finance
The resulting permissions look better. Now, anyone in the finance group (or the user owner root) have total access to the folder and its contents:
drwxrwx---. 2 root root 4096 Jul 6 15:35 finance
If any other user tries to access the shared folder, they won’t be able to do so. Great! Now our finance group can put documents in a shared place.
Other notes
There are additional ways to manipulate these permissions. For example, you may want any files in this folder to be set as owned by the group finance. This requires additional settings not covered in this article, but stay tuned to the Magazine for more on that topic soon.
Some time ago, the Fedora Magazine has published an article introducing ZSH — an alternative shell to Fedora’s default, bash. This time, we’re going to look into customizing it to use it in a more effective way. All of the concepts shown in this article also work in other shells such as bash.
Alias
Aliases are shortcuts for commands. This is useful for creating short commands for actions that are performed often, but require a long command that would take too much time to type. The syntax is:
$ alias yourAlias='complex command with arguments'
They don’t always need to be used for shortening long commands. Important is that you use them for tasks that you do often. An example could be:
$ alias dnfUpgrade='dnf -y upgrade'
That way, to do a system upgrade, I just type dnfUpgrade instead of the whole dnf command.
The problem of setting aliases right in the console is that once the terminal session is closed, the alias would be lost. To set them permanently, resource files are used.
Resource Files
Resource files (or rc files) are configuration files that are loaded per user in the beginning of a session or a process (when a new terminal window is opened, or a new program like vim is started). In the case of ZSH, the resource file is .zshrc, and for bash it’s .bashrc.
To make the aliases permanent, you can either put them in your resource. You can edit your resource file with a text editor of your choice. This example uses vim:
$ vim $HOME/.zshrc
Or for bash:
$ vim $HOME/.bashrc
Note that the location of the resource file is specified relatively to a home directory — and that’s where ZSH (or bash) are going to look for the file by default for each user.
Other option is to put your configuration in any other file, and then source it:
$ source /path/to/your/rc/file
Again, sourcing it right in your session will only apply it to the session, so to make it permanent, add the source command to your resource file. The advantage of having your source file in a different location is that you can source it any time. Or anywhere which is especially useful in shared environments.
Environment Variables
Environment variables are values assigned to a specific name which can be then called in scripts and commands. They start with the $ dollar sign. One of the most common is $HOME that references the home directory.
As the name suggests, environment variables are a part of your environment. Set a variable using the following syntax:
$ http_proxy="http://your.proxy"
And to make it an environment variable, export it with the following command:
$ export $http_proxy
To see all the environment variables that are currently set, use the env command:
$ env
The command outputs all the variables available in your session. To demonstrate how to use them in a command, try running the following echo commands:
$ echo $PWD /home/fedora $ echo $USER fedora
What happens here is variable expansion — the value stored in the variable is used in your command.
Another useful variable is $PATH, that defines directories that your shell uses to look for binaries.
The $PATH variable
There are many directories, or folders (the way they are called in graphical environments) that are important to the OS. Some directories are set to hold binaries you can use directly in your shell. And these directories are defined in the $PATH variable.
The Fedora Workstation edition is a fabulous operating system that includes everything a developer needs. But it’s also a perfect solution for anyone who wants to be productive online with their desktop or laptop computer. It features a sleek interface and an enormous catalog of ready-to-install software. Recently, Christian Schaller shared information about what’s coming in the Workstation for Fedora 31.
Fedora 31 is currently scheduled for release in late October 2019. With it, as usual, will come an assortment of new and refreshed free and open source software. This includes the GNOME desktop which is planned to be updated to the latest 3.34.
Under the hood of the desktop, many intrepid open source developers have been toiling away. They’ve been working on things like:
The Wayland desktop compositor
Working with NVidia to provide better driver support
PipeWire, for better audio and video handling
Expanded Flatpak support and features
A container toolbox
…and much more!
Long-time and keen readers of the Magazine probably know that Christian is deeply involved in the Workstation effort. He heads up the desktop engineering groups at Red Hat. But he’s also involved heavily in the community Workstation Working Group, which guides these efforts as well. As an experienced developer himself, he brings his expertise to the open source community every day to build a better desktop.
For all the details, check out Christian’s detailed and informative blog post on Fedora 31 Workstation. And stay tuned to the Magazine for more about the upcoming release in the next few months!
Perhaps the best known way the Fedora community pursues its mission of promoting free and open source software and content is by developing the Fedora software distribution. So it’s not a surprise at all that a very large proportion of our community resources are spent on this task. This post summarizes how this software is “packaged” and the underlying tools such as rpm that make it all possible.
RPM: the smallest unit of software
The editions and flavors (spins/labs/silverblue) that users get to choose from are all very similar. They’re all composed of various software that is mixed and matched to work well together. What differs between them is the exact list of tools that goes into each. That choice depends on the use case that they target. The basic unit of all of these is an RPM package file.
RPM files are archives that are similar to ZIP files or tarballs. In fact, they uses compression to reduce the size of the archive. However, along with files, RPM archives also contain metadata about the package. This can be queried using the rpm tool:
$ rpm -q fpaste
fpaste-0.3.9.2-2.fc30.noarch
$ rpm -qi fpaste
Name : fpaste
Version : 0.3.9.2
Release : 2.fc30
Architecture: noarch
Install Date: Tue 26 Mar 2019 08:49:10 GMT
Group : Unspecified
Size : 64144
License : GPLv3+
Signature : RSA/SHA256, Thu 07 Feb 2019 15:46:11 GMT, Key ID ef3c111fcfc659b9
Source RPM : fpaste-0.3.9.2-2.fc30.src.rpm
Build Date : Thu 31 Jan 2019 20:06:01 GMT
Build Host : buildhw-07.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : https://pagure.io/fpaste
Bug URL : https://bugz.fedoraproject.org/fpaste
Summary : A simple tool for pasting info onto sticky notes instances
Description :
It is often useful to be able to easily paste text to the Fedora
Pastebin at http://paste.fedoraproject.org and this simple script
will do that and return the resulting URL so that people may
examine the output. This can hopefully help folks who are for
some reason stuck without X, working remotely, or any other
reason they may be unable to paste something into the pastebin
When an RPM package is installed, the rpm tools know exactly what files were added to the system. So, removing a package also removes these files, and leaves the system in a consistent state. This is why installing software using rpm is preferred over installing software from source whenever possible.
Dependencies
Nowadays, it is quite rare for software to be completely self-contained. Even fpaste, a simple one file Python script, requires that the Python interpreter be installed. So, if the system does not have Python installed (highly unlikely, but possible), fpaste cannot be used. In packager jargon, we say that “Python is a run-time dependency of fpaste“.
When RPM packages are built (the process of building RPMs is not discussed in this post), the generated archive includes all of this metadata. That way, the tools interacting with the RPM package archive know what else must must be installed so that fpaste works correctly:
$ rpm -qi python3
Name : python3
Version : 3.7.3
Release : 3.fc30
Architecture: x86_64
Install Date: Thu 16 May 2019 18:51:41 BST
Group : Unspecified
Size : 46139
License : Python
Signature : RSA/SHA256, Sat 11 May 2019 17:02:44 BST, Key ID ef3c111fcfc659b9
Source RPM : python3-3.7.3-3.fc30.src.rpm
Build Date : Sat 11 May 2019 01:47:35 BST
Build Host : buildhw-05.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : https://www.python.org/
Bug URL : https://bugz.fedoraproject.org/python3
Summary : Interpreter of the Python programming language
Description :
Python is an accessible, high-level, dynamically typed, interpreted programming
language, designed with an emphasis on code readability.
It includes an extensive standard library, and has a vast ecosystem of
third-party libraries.
The python3 package provides the "python3" executable: the reference
interpreter for the Python language, version 3.
The majority of its standard library is provided in the python3-libs package,
which should be installed automatically along with python3.
The remaining parts of the Python standard library are broken out into the
python3-tkinter and python3-test packages, which may need to be installed
separately.
Documentation for Python is provided in the python3-docs package.
Packages containing additional libraries for Python are generally named with
the "python3-" prefix.
While rpm knows the required dependencies for each archive, it does not know where to find them. This is by design: rpm only works on local files and must be told exactly where they are. So, if you try to install a single RPM package, you get an error if rpm cannot find the package’s run-time dependencies. This example tries to install a package downloaded from the Fedora package set:
$ ls
python3-elephant-0.6.2-3.fc30.noarch.rpm
$ rpm -qpi python3-elephant-0.6.2-3.fc30.noarch.rpm
Name : python3-elephant
Version : 0.6.2
Release : 3.fc30
Architecture: noarch
Install Date: (not installed)
Group : Unspecified
Size : 2574456
License : BSD
Signature : (none)
Source RPM : python-elephant-0.6.2-3.fc30.src.rpm
Build Date : Fri 14 Jun 2019 17:23:48 BST
Build Host : buildhw-02.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
URL : http://neuralensemble.org/elephant
Bug URL : https://bugz.fedoraproject.org/python-elephant
Summary : Elephant is a package for analysis of electrophysiology data in Python
Description :
Elephant - Electrophysiology Analysis Toolkit Elephant is a package for the
analysis of neurophysiology data, based on Neo.
$ sudo rpm -i ./python3-elephant-0.6.2-3.fc30.noarch.rpm
error: Failed dependencies:
python3.7dist(neo) >= 0.7.1 is needed by python3-elephant-0.6.2-3.fc30.noarch
python3.7dist(quantities) >= 0.10.1 is needed by python3-elephant-0.6.2-3.fc30.noarch
In theory, one could download all the packages that are required for python3-elephant, and tell rpm where they all are, but that isn’t convenient. What if python3-neo and python3-quantities have other run-time requirements and so on? Very quickly, the dependency chain can get quite complicated.
Repositories
Luckily, dnf and friends exist to help with this issue. Unlike rpm, dnf is aware of repositories. Repositories are collections of packages, with metadata that tells dnf what these repositories contain. All Fedora systems come with the default Fedora repositories enabled by default:
dnf can be used to query repositories for information on the packages they contain. It can also search them for software, or install/uninstall/upgrade packages from them:
$ sudo dnf search elephant
Last metadata expiration check: 0:05:21 ago on Sun 23 Jun 2019 14:33:38 BST.
============================================================================== Name & Summary Matched: elephant ==============================================================================
python3-elephant.noarch : Elephant is a package for analysis of electrophysiology data in Python
python3-elephant.noarch : Elephant is a package for analysis of electrophysiology data in Python
$ sudo dnf list \*elephant\*
Last metadata expiration check: 0:05:26 ago on Sun 23 Jun 2019 14:33:38 BST.
Available Packages
python3-elephant.noarch 0.6.2-3.fc30 updates-testing
python3-elephant.noarch 0.6.2-3.fc30 updates
Installing dependencies
When installing the package using dnf now, it resolves all the required dependencies, then calls rpm to carry out the transaction:
$ sudo dnf install python3-elephant
Last metadata expiration check: 0:06:17 ago on Sun 23 Jun 2019 14:33:38 BST.
Dependencies resolved.
==============================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================
Installing:
python3-elephant noarch 0.6.2-3.fc30 updates-testing 456 k
Installing dependencies:
python3-neo noarch 0.8.0-0.1.20190215git49b6041.fc30 fedora 753 k
python3-quantities noarch 0.12.2-4.fc30 fedora 163 k
Installing weak dependencies:
python3-igor noarch 0.3-5.20150408git2c2a79d.fc30 fedora 63 k
Notice how dnf even installed python3-igor, which isn’t a direct dependency of python3-elephant.
DnfDragora: a graphical interface to DNF
While technical users may find dnf straightforward to use, it isn’t for everyone. Dnfdragora addresses this issue by providing a graphical front end to dnf.
dnfdragora (version 1.1.1-2 on Fedora 30) listing all the packages installed on a system.
From a quick look, dnfdragora appears to provide all of dnf‘s main functions.
There are other tools in Fedora that also manage packages. GNOME Software, and Discover are two examples. GNOME Software is focused on graphical applications only. You can’t use the graphical front end to install command line or terminal tools such as htop or weechat. However, GNOME Software does support the installation of Flatpaks and Snap applications which dnf does not. So, they are different tools with different target audiences, and so provide different functions.
This post only touches the tip of the iceberg that is the life cycle of software in Fedora. This article explained what RPM packages are, and the main differences between using rpm and using dnf.
In future posts, we’ll speak more about:
The processes that are needed to create these packages
How the community tests them to ensure that they are built correctly
The infrastructure that the community uses to get them to community users in future posts.
Are you using multiple monitors with your Linux workstation? Seeing many things at once might be beneficial. But there are often much more windows in our workflows than physical monitors — and that’s a good thing, because seeing too many things at once might be distracting. So being able to switch what we see on individual monitors seems crucial.
Let’s talk about i3 — a popular tiling window manager that works great with multiple monitors. And there is one handy feature that many other window managers don’t have — the ability to switch workspaces on individual monitors independently.
Quick introduction to i3
The Fedora Magazine has already covered i3 about three years ago. And it was one of the most popular articles ever published! Even though that’s not always the case, i3 is pretty stable and that article is still very accurate today. So — not to repeat ourselves too much — this article only covers the very minimum to get i3 up and running, and you’re welcome to go ahead and read it if you’re new to i3 and want to learn more about the basics.
To install i3 on your system, run the following command:
$ sudo dnf install i3
When that’s done, log out, and on the log in screen choose i3 as your window manager and log back in again.
When you run i3 for the first time, you’ll be asked if you wish to proceed with automatic configuration — answer yes here. After that, you’ll be asked to choose a “mod key”. If you’re not sure here, just accept the default which sets you Windows/Super key as the mod key. You’ll use this key for mostly all the shortcuts within the window manager.
At this point, you should see a little bar at the bottom and an empty screen. Let’s have a look at some of the basic shortcuts.
Open a terminal using:
$mod + enter
Switch to a second workspace using:
$mod + 2
Open firefox in two steps, first by:
$mod + d
… and then by typing “firefox” and pressing enter.
Move it to the first workspace by:
$mod + shift + 1
… and switch to the first workspace by:
$mod + 1
At this point, you’ll see a terminal and a firefox window side by side. To close a window, press:
$mod + shift + q
There are more shortcuts, but these should give you the minimum to get started with i3.
Ah! And to exit i3 (to log out) press:
$mod + shift + e
… and then confirm using your mouse at the top-right corner.
Getting multiple screens to work
Now that we have i3 up and running, let’s put all those screens to work!
To do that, we’ll need to use the command line as i3 is very lightweight and doesn’t have gui to manage additional screens. But don’t worry if that sounds difficult — it’s actually quite starighforward!
The command we’ll use is called xrandr. If you don’t have xrandr on your system, install it by running:
$ sudo dnf install xrandr
When that’s installed, let’s just go ahead and run it:
$ xrandr
The output lists all the available outputs, and also indicated which have a screen attached to them (a monitor connedted with a cable) by showing supported resolutions. Good news is that we don’t need to really care about the specific resolutions to make the them work.
This specific example shows a primary screen of a laptop (named eDP1), and a second monitor connected to the HDMI-2 output, physically positionned right of the laptop. To turn it on, run the following command:
$ xrandr --output HDMI-2 --auto --right-of eDP1
And that’s it! Your screen is now active.
Second screen active. The commands shown on this screenshot are slightly different than in the article, as they set a smaller resolution to make the screenshots more readable.
Managing workspaces on multiple screens
Switching workspaces and creating new ones on multiple screens is very similar to having just one screen. New workspaces get created on the screen that’s currently active — the one that has your mouse cursor on it.
So, to switch to a specific workspace (or to create a new one in case it doesn’t exist), press:
$mod + NUMBER
And you can switch workspaces on individual monitors independently!
Workspace 2 on the left screen, workspace 4 on the right screen.Left screen switched to workspace 3, right screen still showing workspace 4.Right screen switched to workspace 4, left screen still showing workspace 3.
Moving workspaces between monitors
The same way we can move windows to differnet workspaces by the following command:
$mod + shift + NUMBER
… we can move workspaces to different screens as well. However, there is no default shortcut for this action — so we have to create it first.
To create a custom shortcut, you’ll need to open the configuration file in a text editor of your choice (this article uses vim):
$ vim ~/.config/i3/config
And add the following lines to the very bottom of the configuration file:
# Moving workspaces between screens bindsym $mod+p move workspace to output right
Save, close, and to reload and apply the configuration, press:
$mod + shift + r
Now you’ll be able to move your active workspace to the second monitor by:
$mod + p
Workspace 2 with Firefox on the left screenWorkspace 2 with Firefox moved to the second screen
And that’s it! Enjoy your new multi-monitor experience, and to learn more about i3, you’re welcome to read the previous article about i3 on the Fedora Magazine, or consult the official i3 documentation.
What does it take to make a Linux distribution like Fedora 30? As you might expect, it’s not a simple process.
Changes in Fedora 30
Although Fedora 29 released on October 30, 2018, work on Fedora 30 began long before that. The first change proposal was submitted in late August. By my count, contributors made nine separate change proposals for Fedora 30 before Fedora 29 shipped.
Some of these proposals come early because they have a big impact, like mass removal of Python 2 packages. By the time the proposal deadline arrived in early January, the community had submitted 50 change proposals.
Of course, not all change proposals make it into the shipped release. Some of them are more focused on how we build the release instead of what we release. Others don’t get done in time. System-wide changes must have a contingency plan. These changes are generally evaluated at one of three points in the schedule: when packages branch from Rawhide, at the beginning of the Beta freeze, and at the beginning of the Final freeze. For Fedora 30, 45 Change proposals were still active for the release.
Fedora has a calendar-based release schedule, but that doesn’t mean we ship whatever exists on a given date. We have a set of release criteria that we test against, and we don’t put out a release until all the blockers are resolved. This sometimes means a release is delayed, but it’s important that we ship reliable software.
For the Fedora 30 development cycle, we accepted 22 proposed blocker bugs and rejected 6. We also granted 33 freeze exceptions — bugs that can be fixed during the freeze because they impact the released artifacts or are otherwise important enough to include in the release.
Other contributions
Of course, there’s more to making a release than writing or packaging the code, testing it, and building the images. As with every release, the Fedora Design team created a new desktop background along with several supplemental wallpapers. The Fedora Marketing team wrote release announcements and put together talking points for the Ambassadors and Advocates to use when talking to the broader community.
If you’ve looked at our new website, that was the work of the Websites team in preparation for the Fedora 30 release:
The Documentation Team wrote Release Notes and updated other documentation. Translators provided translations to dozens of languages.
Many other people made contributions to the release of Fedora 30 in some way. It’s not easy to count everyone who has a hand in producing a Linux distribution, but we appreciate every one of our contributors. If you would like to join the Fedora Community but aren’t sure where to start, check out What Can I Do For Fedora?
On Friday, Mozilla issued a security advisory for Firefox, the default web browser in Fedora. This advisory concerns a CVE for a vulnerability based on type confusion that can happen when JavaScript objects are being manipulated. It can be used to crash your browser. There are apparently already attacks in the wild that exploit the issue. Read on for more information, and how to protect your system against this flaw.
Firefox 67.0.3 (with the security fixes) has already been pushed to the stable Fedora repositories. The security fix will be applied to your system with your next update. You can also update the firefox package only by running the following command:
$ sudo dnf update firefox
This command requires you to have sudo setup. Note that not every Fedora mirrors syncs at the same rate. Community sites graciously donate space and bandwidth these mirrors to carry Fedora content. You may need to try again later if your selected mirror is still awaiting the latest update.
Ansible is one of the most popular automation engines in the world. It lets you automate virtually anything, from setup of a local system to huge groups of platforms and apps. It’s cross platform, so you can use it with all sorts of operating systems. Read on for more information on how to get the latest Ansible in Fedora, some of its changes and improvements, and how to put it to use.
Releases and features
Ansible 2.8 was recently released with many fixes, features, and enhancements. It was available in Fedora mere days afterward as an official update in Fedora 29 and 30, as well as EPEL. The follow-on version 2.8.1 released two weeks ago. Again, the new release was available within a few days in Fedora.
Installation is, of course, easy to do from the official Fedora repositories using sudo:
$ sudo dnf -y install ansible
The 2.8 release has a long list of changes, and you can read them in the Porting Guide for 2.8. But they include some goodies, such as Python interpreter discovery. Ansible 2.8 now tries to figure out which Python is preferred by the platform it runs on. In cases where that fails, Ansible uses a fallback list. However, you can still use a variable ansible_python_interpreter to set the Python interpreter.
Another change makes Ansible more consistent across platforms. Since sudo is more exclusive to UNIX/Linux, and other platforms don’t have it, become is now used in more places. This includes command line switches. For example, –ask-sudo-pass has become –ask-become-pass, and the prompt is now BECOME password: instead.
There are many more features in the 2.8 and 2.8.1 releases. Do check out the official changelog on GitHub for all the details.
Using Ansible
Maybe you’re not sure if Ansible is something you could really use. Don’t worry, you might not be alone in thinking that, because it’s so powerful. But it turns out that it’s not hard to use it even for simple or individual setups like a home with a couple computers (or even just one!).
We covered this topic earlier in the Fedora magazine as well:
Modularity enables Fedora to provide alternative versions of RPM packages in the repositories. Several different applications, language runtimes, and tools are available in multiple versions, build natively for each Fedora release.
The Fedora Magazine has already covered Modularity in Fedora 28 Server Edition about a year ago. Back then, it was just an optional repository with additional content, and as the title hints, only available to the Server Edition. A lot has changed since then, and now Modularity is a core part of the Fedora distribution. And some packages have moved to modules completely. At the time of writing — out of the 49,464 binary RPM packages in Fedora 30 — 1,119 (2.26%) come from a module (more about the numbers).
Modularity basics
Because having too many packages in multiple versions could feel overwhelming (and hard to manage), packages are grouped into modules that represent an application, a language runtime, or any other sensible group.
Modules often come in multiple streams — usually representing a major version of the software. Available in parallel, but only one stream of each module can be installed on a given system.
And not to overwhelm users with too many choices, each Fedora release comes with a set of defaults — so decisions only need to be made when desired.
Finally, to simplify installation, modules can be optionally installed using pre-defined profiles based on a use case. A database module, for example, could be installed as a client, a server, or both.
Modularity in practice
When you install an RPM package on your Fedora system, chances are it comes from a module stream. The reason why you might not have noticed is one of the core principles of Modularity — remaining invisible until there is a reason to know about it.
Let’s compare the following two situations. First, installing the popular i3 tiling window manager, and second, installing the minimalist dwm window manager:
$ sudo dnf install i3 ... Done!
As expected, the above command installs the i3 package and its dependencies on the system. Nothing else happened here. But what about the other one?
It feels the same, but something happened in the background — the default dwm module stream (6.1) got enabled, and the dwm package from the module got installed.
To be transparent, there is a message about the module auto-enablement in the output. But other than that, the user doesn’t need to know anything about Modularity in order to use their system the way they always did.
But what if they do? Let’s see how a different version of dwm could have been installed instead.
Use the following command to see what module streams are available:
The output shows there are four streams of the dwm module, 6.1 being the default.
To install the dwm package in a different version — from the 6.2 stream for example — enable the stream and then install the package by using the two following commands:
Finally, let’s have a look at profiles, with PostgreSQL as an example.
$ sudo dnf module list ... postgresql 9.6 client, server ... postgresql 10 client, server ... postgresql 11 client, server ... ...
To install PostgreSQL 11 as a server, use the following command:
$ sudo dnf module install postgresql:11/server
Note that — apart from enabling — modules can be installed with a single command when a profile is specified.
It is possible to install multiple profiles at once. To add the client tools, use the following command:
$ sudo dnf module install postgresql:11/client
There are many other modules with multiple streams available to choose from. At the time of writing, there were 83 module streams in Fedora 30. That includes two versions of MariaDB, three versions of Node.js, two versions of Ruby, and many more.
Markdown is a lightweight markup language that is useful for adding formatting while still maintaining readability when viewing as plain text. Markdown (and Markdown derivatives) are used extensively as the priumary form of markup of documents on services like GitHub and pagure. By design, Markdown is easily created and edited in a text editor, however, there are a multitude of editors available that provide a formatted preview of Markdown markup, and / or provide a text editor that highlights the markdown syntax.
This article covers 3 desktop applications for Fedora Workstation that help out when editing Markdown.
UberWriter
UberWriter is a minimal Markdown editor and previewer that allows you to edit in text, and preview the rendered document.
The editor itself has inline previews built in, so text marked up as bold is displayed bold. The editor also provides inline previews for images, formulas, footnotes, and more. Ctrl-clicking one of these items in the markup provides an instant preview of that element to appear.
In addition to the editor features, UberWriter also features a full screen mode and a focus mode to help minimise distractions. Focus mode greys out all but the current paragraph to help you focus on that element in your document
Marker is a Markdown editor that provides a simple text editor to write Markdown in, and provides a live preview of the rendered document. The interface is designed with a split screen layout with the editor on the left, and the live preview on the right.
Additionally, Marker allows you to export you document in a range of different formats, including HTML, PDF, and the Open Document Format (ODF).
Where the previous editors are more focussed on a minimal user experice, Ghostwriter provides many more features and options to play with. Ghostwriter provides a text editor that is partially styled as you write in Markdown format. Bold text is bold, and headings are in a larger font to assist in writing the markup.
It also provides a split screen with a live updating preview of the rendered document.
Ghostwriter also includes a range of other features, including the ability to choose the Markdown flavour that the preview is rendered in, as well as the stylesheet used to render the preview too.
Additionally, it provides a format menu (and keyboard shortcuts) to insert some of the frequent markdown ‘tags’ like bold, bullets, and italics.