For more desktop-y stuff. See RHEL/CentOS page for server-y stuff.

Installing programs with dnf

Use dnf to install packages from official and non-official repos.

Cookbook

Some things about dnf:

Install something:

$ dnf install <spec> # Where spec can be a package-spec, @module-spec or @group-spec

List all repos:

$ dnf repolist

List all installed software:

$ dnf list --installed
$ dnf list --installed mypackage

Install something from an RPM file:

$ dnf localinstall myrpmfile.rpm

Get the current Fedora version:

$ rpm -E %fedora

Groups

Groups are virtual collections of packages, e.g.:

  • @c-development - group containing C Development stuff including gcc-c++.

List all groups:

$ dnf group list

List all installed groups:

$ dnf group list --installed

Install a group:

$ dnf group install <group-spec>

Display package lists of a group:

$ dnf group info <group-spec>

Find which groups contain a package (e.g. gcc-c++):

$ dnf group info '*' | less +/gcc-c++

Non-Fedora repos

rpmfusion: a place for packages which can’t be distributed in the main Fedora repos, for example:

  • Open Broadcaster Software
  • VLC media player
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

[unitedrpms][https://unitedrpms.github.io/]: multimedia codecs and addons not available in official Fedora repositories.

sudo rpm --import https://raw.githubusercontent.com/UnitedRPMs/unitedrpms/master/URPMS-GPG-PUBLICKEY-Fedora
sudo dnf -y install https://github.com/UnitedRPMs/unitedrpms/releases/download/15/unitedrpms-$(rpm -E %fedora)-15.fc$(rpm -E %fedora).noarch.rpm

Installing things manually.

Good practice to put some things in /opt.

For example, installing an early GraalVM build and adding a relative symlink in /opt/java/graalvm:

sudo mkdir -p /opt/java
sudo chown -R tdonohue:tdonohue /opt/java
tar -C /opt/java -xvf graalvm-ce-1.0.0-rc15-linux-amd64.tar.gz
ln -s ln -r -s graalvm-ce-1.0.0-rc15 /opt/java/graalvm

Tools/apps

Fonts

Search for fonts:

$ dnf search fonts

Manually install a font:

$ tar xvf the-font-archive.tgz
$ sudo mkdir -p /usr/share/fonts/the-font-name
$ sudo cp *.otf /usr/share/fonts/the-font-name
$ fc-cache -v

Reset the font cache:

$ fc-cache

Resizing images

In Software app, add the image resizer feature to the Nautilus file browser:

$ dnf install nautilus-image-converter
$ nautilus -q

Compressing images

Try Trimage. Installing Trimage on Fedora 29:

$ sudo dnf install jpegoptim pngcrush advancecomp
$ git clone https://github.com/Kilian/Trimage && cd Trimage
$ chmod u+x setup.py
$ ./setup.py build
$ sudo ./setup.py install

gnome-software

gnome-software provides the GUI application Software for installing updates:

Problem: “Unable to download firmware updates from ‘fwupd’ … failed to download https://cdn.fwupd.org/downloads/firmware.xml.gz.asc: Cannot resolve hostname”

$ dnf update gnome-software

Cookbook

What application or command is file <x> used for? Which package put it there?

$ rpm -qf /path/to/some/file

Troubleshooting

tracker-miner-fs seems to consume 100% CPU:

  • Seems to be a process which indexes files and puts the results in ~/.local/share/tracker
  • Check overall status of the tracker using tracker status
  • See what each individual daemon is doing by using tracker daemon
  • If necessary, delete the files/folders which are causing the daemon to go out of control