Post Linux installation customisations

After installation of Fedora (or CentOS), there's a few things that I like to set up that aren't done by default.

I wrote this summary after installing Fedora 26, but I've been going through this routine for a long time before then.

Adding extra software repositories

Fedora only comes with free and unfettered software.  If you need to use something else, you need to get it from some other place.  There are any number of places you can get software from, but if you want to be able to easily install and update it, and not suffer horrible conflicts with other software on your system, there are a few extra repos which can provide precompiled software that doesn't cause those problems.

Adding SMPlayer and VLC media players

Mplayer is a command line tool for playing back many types of audio and video media, and SMPlayer provides a GUI for it.  There are other front ends, but I'm familiar with this one, and found other ones to be very crashy when I tried them many years ago.  And there are other media players, but I usually find them too CPU intensive, though I'll install VLC as an alternative player (some players are better at handling some media files than others).  If you want to play encumbered media formats, you'll need to add extra media players than the ones that Fedora provides by default.

Once the RPM Fusion repo has been added, these media players can be installed using this command:

sudo dnf install vlc smplayer

Adding GVim

The default graphical text editors are often too fancy for my likely, or too dumb, or too CPU-heavy for some situations.  I've got used to using Vim in a basic way, which is useful to learn for those situations when you must edit a file using only the command line, and it's handy to be able to carry on using the same editor using a GUI.

sudo dnf install vim-X11

Now you can call it up from the command line as “gvim,” and it's in the menus (well it is for me using Gnome or Mate desktop interfaces).

Adding autofs

Auto file system is a useful thing to have.  Remote file systems will be mounted on demand, then demounted after some expiry period of idleness.  As opposed to putting permanent mount entries into /etc/fstab (which gives you grief when you try to boot up a system and those mounts were not available at the time, which gives you grief when you have a lot of network mounts always mounted, etc.).

sudo dnf install autofs
sudo mkdir /net
sudo systemctl enable autofs
sudo systemctl start autofs

Now, anytime that you access /net/servername/exportname it will be automatically mounted.  You could choose a different prefix than /net, but the autofs package comes preconfigured to use that, and you'd need to modify its configuration files to use something else.

I use it to auto-mount NFS exports, it supposedly can be used to mount other things, but I've never tried to use it in any other way.

Modifying XDG user-directory defaults

These days, Fedora pre-configures your homespace with some directories for you to store your files in an organised manner:

Desktop
A directory holding files that will be displayed on your desktop background.
Documents
A directory for you to store documents in, and many programs that create documents will default to saving and opening files in this location (likewise with some of the other categories listed below).
Downloads
A directory for you to store downloaded files in, and many programs that download files will default to saving in this location.
Music
A directory for you to store music files in.
Pictures
A directory for you to store pictures in.
Public
A directory set up for sharing files between other users on the same computer, or LAN.
Templates
A directory that various programs will consult for when you create new files, and they offer to load up a template file to begin with (such as a virtually blank HTML webpage, or a form letter, etc).
Videos
A directory for you to store video files in.

While promoting the idea of storing your files in a an organised manner is laudible, I don't like the defaults.  Linux uses a case-sensitive file system, and it's annoying to have to type in capital letters when working on the command line, so I change all the directory names to all-lower-case words.  Some of the directory names may be inaccurate for some users (e.g. if you store non-musical sound files, as well as musical ones, you may wish to rename the music directory to be called something with a more encompassing name, like audio).  And for users that have local and networked directories in your homespace, you may wish to make all of these locations a sub-directory inside a descriptively named directory (so you might have /home/johndoe/local/desktop, home/johndoe/local/music, etc., with a corresponding /home/johndoe/server/documents and /home/johndoe/server/pictures).

Changing them in the /etc/xdg/user-dirs.defaults file will automatically set up the desired set of directories, and the programs that use these default directories will consult that file to find out what they're actually called (unless they're stupidly hard-coded to expect particular directory names).

If you simply rename the existing directories, you may find that programs that were going to to save to ~/Downloads will create a Downloads directory when they go to save a file (leaving you with a clutter of extra directories), or may save straight to the desktop or homespace, instead.  If you delete some of these directories, because you don't use them, you may find them getting automatically created again, later on.  So changing the user-dirs.defaults file is organised way to deal with them (the file comes commented with some examples, and is easily understandable).

Configuring CUPS for auto printer discovery

When you have just one computer, configuring it to use your printer is a simple-enough task, and an unavoidable one.

But when you have many computers on a LAN, having to configure each one individually for your available printers turns into an annoying repetitive chore of having to install the printer, sort out the right driver, configure all the settings, on each and every client.  It doesn't have to be done in that tedious way (and seriously annoying if you change printers, then have to modify every client computer's settings, again).

Once there's a computer (or other gadget) acting as a printer server, it publishes that information onto your LAN (that's an option you set on the server), and every client can automatically display a list of those printers when you go to print a file.  You configure the server with the specifics for that printer (types of paper, sizes, printing modes), and every client uses that configuration.  All the clients have to do is pick which printer to print to, and any variations you want from the default settings (e.g. some jobs may be double-sided).

On the server, you set up your printer as you're used to doing, then share it's printers (which is often easiest done by browsing to http://localhost:631/ on the server, itself, and using the CUPS webpage-based configurator).  And you open up the IPP server setting on its firewall (that's port 631 for TCP and UDP).  And make sure that the CUPS server is running.  (It would have to have been running to load up that localhost:631 service.  If you couldn't load that page, then enable and start the service, and try again.)

sudo systemctl enable cups
sudo systemctl start cups

If the server handles multiple printers, then be sure to configure them in understandable ways.  When you're filling in the details, pick a printer name that clearly identifies each printer (Canon 7760, printer 12, etc), use the description to provide useful information about what that printer is for (invoice printer, general printing, letterhead, labeller, etc) or something else that distinguishes it from other printers (such as if you have several identical models of printers), use the location description to say where the printer is physically sitting (upstairs, front counter, workshop, etc).  Some of the clients may display some, or all, of that information, making it easy to choose the right printer.

On the clients, you open up the IPP-client setting on their firewall (that's port 631), and enable and start the cups and cups-browsed services:

sudo systemctl enable cups
sudo systemctl start cups
sudo systemctl enable cups-browsed
sudo systemctl start cups-browsed

And that's all you have to do on the clients.  You can, in addition, set individual printer settings on the clients (you might like one client to always use economy print modes, another to always used best printing modes), and you can select a particular printer to be the default one on each client.

Increase the number of kernels kept installed when updating

When the system installs updates, most of the updated packages replace their older versions, but new kernels are installed in addition to the old kernels.  This allows you to boot up using a prior kernel, should a new one have a problem with it.  And so that you don't have a drive full of kernels, it automatically removes the oldest kernel, keeping just a small number of the later versions.  I like to increase the number of kernels kept installed, so I've got more options available to me when debugging a problem.  It's quite likely that some bugs mightn't get noticed for a while, if they affect things that you don't usually do.  You might have gone through several kernel updates before you notice the problem.

Change the installonly_limit=3 in the /etc/dnf.conf file to whatever number of versions you want to keep installed.  Though bare in mind that keeping an excessive number may present problems in itself.  I usually opt to keep five.


Contents
Main sections:
homepage
contact details
business info
personal info
eBay & trading
“sales” ads
“wanted” ads
electronics
video production
photography
computing
reviews
misc info
website info/help
links
index
search
Computing
Introduction
my computers
Linux
Windows
general info
desktop publishing
typing skills
WWW authoring
internet primer
turn it off?
electrical safety
Linux
Introduction
why use Linux
why I use Linux
compatible hardware
feeling lucky?
Evolution signatures
installing software
auto NTPD restart
local DNS serving
restoring GRUB
overzealous HDD parking
Post-install customising
NFS serving
SMTP settings for Yahoo
time serving