How to use a post-install script to simplify Fedora desktop set up

If you need to deploy multiple Fedora-based machines, this script makes the process considerably easier.

A post-install script that simplifies setting up Fedora desktop If you need to deploy multiple Fedora-based machines, this script makes that process considerably easier.

As an admin, you know how exhausting it can be to get desktops set up and ready for users. Unless you've already automated the process, you need to install the operating system, install the necessary applications, and do any other post-install configurations. That can take a good deal of your time, time which could be better served doing more important things (like securing your network).

If you deploy Fedora desktops, a Fedora admin by the name of Tobias has created a post-install script that takes care of much of the work for you. What does this script do?

  • Refreshes available packages from the repositories.
  • Adds free and (optionally) non-free RPM Fusion repositories.
  • Updates the system.
  • Installs a large number of software packages.

SEE: Choosing your Windows 7 exit strategy: Four options (Tech Pro Research)

Even better, because this is open source, you can download and edit the script to fit your needs.

I'm going to walk you through the process of using this script on Fedora 29.

Note: With a bit of work, you can make this same script work on Fedora Server.

What you need

The only things you need to make this work is a running instance of Fedora 29 and a user account with sudo privileges.

Getting the script

The thing to do is download the necessary script. To do that, you must first install wget and nano. Open a terminal window and issue the command:

sudo dnf install wget nano -y

Once wget installs, download the script with the command:


With the script saved, open it for viewing/editing with the command:


The most important section for you to check is under the sudo dnf install \ line (Figure A).

Figure A

Figure A: The package installation section.

Edit this section as needed (adding or removing applications to fit your needs). Under that section, you'll also find the Developer Niceties and advanced dev sub-sections. If you're not deploying for developers, you can comment these entire sections out.

To include an application for installation, you simply add the name of the application under the dnf install section of the script. Say you want to include Thunderbird to the mix. For this, add thunderbird under transmission (Figure B).

Figure B

Figure B: Adding an application to the install section.

Running the script

After picking through the script (and editing as needed), save the file and give it executable permissions with the command:

chmod u+x

There are two ways to run the script:

  • Only installing free, open source software.
  • Including non-free software.

To install only free software, the command is:


To include the non-free software options, the command is:

./ --nonfree

Because this script isn't run as root (using sudo), you will be prompted for the users' sudo password a number of times. One way around this is to run a command using sudo right before issuing one of the ./ commands, which would cache the password for a brief enough period to complete the script. You could simply issue the command sudo ls and then, when prompted, type your sudo password. As soon as that ls command completes, run the installation command, and you won't be prompted for the user's sudo password during the run.

When the script completes, you can reboot your desktop, and it's ready to go. If you've customized the script to fit your company needs, that desktop is all set up for a user to log in and start working. You might also want to configure the desktop to authenticate against an LDAP server (which isn't covered in that script) so that any user could log in to that machine. (See: How to authenticate a Linux client with LDAP server.)

Congratulations. Getting those Fedora desktop machines prepped for users is now considerably more efficient.

Also see

Image: Fedora

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website