Skip to content

Instantly share code, notes, and snippets.

@Bengt
Last active November 7, 2020 01:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bengt/2937539 to your computer and use it in GitHub Desktop.
Save Bengt/2937539 to your computer and use it in GitHub Desktop.

FedoraSetup

This installation guide documents my standard procedure of a system setup with Fedora. Naturally, everyone will not agree at some point on my way of doing this. Please take this with a grain of salt and use it as a guide to avoid forgetting things, as I do myself.

Rationale

I use my computer all day everyday. After a while I used every application I will ever use and configured upon first usage. The configuration disrupts but the workflow leading to using the application first. To avoid configuration induced disruptions, the configuration could be done upfront. This is a collection of configurations and other steps involved in setting up a new system with Fedora.

Problem Statement

In order to be usable for productive work, a computer has to meet three software-sided requirements:

  • Software that is required needs to be installed.
  • Software that is required needs to be configured.
  • Data that is required needs to be present.

Each of these three components are needed, because each of them would keep the user from productive work:

  • If there is a lack of installed software, the user needs to install that software first, before being productive.
  • If there is a lack of configuration, the user needs to configure the needed software first, before being productive.
  • If there is a lack of data, the user has to acquire that data, before being productive.

Each of these steps can take considerably amounts of time and effort.

  • Installing software might take long, since it is big (think 200 MB of LibreOffice), fragmented (think 1.6 k LaTeX Packages) or takes long to install (think compiling 3 MB of Haskell for Pandoc).
  • Configuration might take long, since it takes experimentation (think choosing a color scheme), investigation (think building a .bashrc) or is plain tedious (think configuring GNOME on your 10th system).
  • Acquiring data might take long, because it is big (think that long grown company repo at work), distributed (think of the repos for your GNOME-shell extensions) or comes from slow sources (think data from an API).

Approach

The Fedora distribution comes with a reasonable set of software and sane preconfiguration, but without any user data. That narrows the need to install, configure software down somewhat and leaves downloading data open as follows:

  • Building upon the Fedora installation

    • software needs to be kept (nothing to do)
    • software needs to be removed (uninstall)
    • software need to be added (installed)
      • from the official Fedora repos
      • from additional repos
      • from other sources
  • Building upon the packaged configuration

    • configuration needs to be kept (nothing to do)
    • configuration needs to be altered when already present or added to overwrite defaults
      • on the user level (dotfiles, dconf)
      • on the system level (files under /etc/)
  • Building upon an empty user directory

    • data needs to be added
      • from Backups (in scope via installation and configuration of backup software)
      • from repos (TODO)
      • other sources (out of scope for now)

Creating Installation Media

On the old system.

Installing Fedora

Note: Anaconda uses displays seemingly at random. Make sure to turn on all connected displays.

In the minimal graphical installer.

  • Mount /boot of the SATA-SDD

  • Unlock LVM of M.2 NVMe SSD

  • Create a user that is an administrator and does not require a password

  • GPT works for me.

  • Resizing will work in anaconda with LVM as a partition type.

Fedora Setup

On the new system.

GDM uses whatever display is connected to DVI-0, so make sure to turn on all connected displays.

Network

  • Get yourself some fast WLAN or even better LAN connectivity. You will install/upgrade thousands of packages, weighing several GB, this will pay off.
  • Create a profile with a static IPv4 address, gateway, subnet mask and DNS servers.

DNF

Make DNF work yes-less by adding assumeyes=1 to the end of /etc/dnf.conf:

sudo xdg-open /etc/dnf/dnf.conf

RPM Fusion

Install free

sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-23.noarch.rpm

Google Chrome

sudo dnf install --nogpgcheck https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

Chrome is about 45 MB to download, so this may take some time.

sudo ln /usr/bin/google-chrome /usr/bin/chrome

Java plugin

sudo dnf install icedtea-web

Programming Languages

Javascript/NodeJS

sudo dnf install nodejs npm

Python 2 / Python 3

sudo dnf install python python3 python-virtualenv python-devel python3-devel python-setuptools python3-setuptools

Python Linting

sudo dnf install python-flake8 python3-flake8 python-pep8 python-autopep8 python-pytest-pep8 python3-pytest-pep8 python-pep8 python3-pep8 python3-mccabe pyflakes python-pytest-flakes python3-pyflakes python3-pytest-flakes pylint python3-pylint

Python pypy

sudo dnf install pypy

Installations

Android

Fastboot and ADB for easy installations and complete backups:

sudo dnf install android-tools

Version Control Systems

sudo dnf install git gitg gitk bzr mercurial subversion git-svn

Various Tools

sudo dnf install htop gnome-tweak-tool nautilus-open-terminal inkscape hunspell-de hunspell-en maven gparted gimp inotify-tools meld pwgen hdparm nmap

Build Stuff

sudo dnf groupinstall "Development Tools" "Legacy Software Development"

VirtualBox

sudo dnf install VirtualBox akmod-VirtualBox

WINE

sudo dnf install wine
sudo dnf install mesa-dri-drivers
sudo dnf install mesa-dri-drivers.i686

sudo dnf install libpng15.i686

Steam

Steam is now in RPM fusion, so there is no need to have a special purpose repository for it, anymore. However, the repo is development, so just install the steam client directly and let it udate itself:

sudo dnf install http://download1.rpmfusion.org/nonfree/fedora/development/23/x86_64/os/steam-1.0.0.50-2.fc22.i686.rpm
rm ~/Steam
steam

Kerbal Space Program

To get the x64 version running under Fedora, install the its dependencies:

sudo dnf install SDL2_image rpm-build ttmkfdir cabextract popt-devel pavucontrol

And add set its launch options in Steam to use the 64-bit binary with the opengl renderer:

%command%_64 -force-glcore

Transmission

sudo dnf install transmission
sudo ln /usr/bin/transmission-gtk /usr/bin/transmission

Work

sudo dnf install xournal

Pandoc

sudo dnf install pandoc

Trash CLI

sudo dnf install trash-cli

lm-sensors

sudo dnf install lm_sensors
sudo sensors-detect

(Un-)packing Tools

sudo dnf install unzip unar

Deinstallations

I do not use these:

sudo dnf remove rhythmbox evolution gnome-games

I do not have Intel hardware:

sudo dnf remove xorg-x11-drv-intel

Configurations

The following tools need to be configured manually, if one does not do the dotfiles, as I do.

GNOME-Shell

gnome-control-center
gnome-tweak-tool

GNOME-Tools

  • Gnome-Terminal
  • Empathy (Click the application name on the top bar)

Nautilus

Edit ~/.gtk-bookmarks to your linking and restart the session (not only the GNOME Shell):

nano ~/.gtk-bookmarks

XDG User Directories

Edit .config/user-dirs.dirs to your liking and remove or rename folders under ~/ accordingly:

nano `.config/user-dirs.dirs`

Note: If you delete lines, they will be replaced with defaults at startup, if you do not want to use an XDG-Dir, set it to $(HOME).

Afterwards, run:

xdg-user-dirs-update

Finally remove the unwanted dirs:

rm -rf ~/Arbeitsfläche/
...

Automatic Login Keyring Unlock

Yes, there is a way to use autologin and have the login keyring unlocked automatically: Set an empty password. In seahorse, click view and enable By Keyring, then in the left column under Passwords on Login right click and select Change Password.

Source: Me

Git

Automatic merging of the remote tracking branch as recommended by git ready

git config --global branch.autosetupmerge true

Always rebase when pulling:

git config --global branch.autosetuprebase always

Setup author information:

git config --global user.name "Bengt Lüers"
git config --global user.email bengt.lueers@gmail.com

Assume to merge with master (for push/pull/merge)

git config --global branch.master.merge refs/heads/master

Assume origin to be the remote

git config --global branch.master.remote origin

Assume equivalent remote branch

push the current branch to its upstream branch, but refuse to push if the upstream branch's name is different from the local one.

git config --global push.default simple

Use meld as mergetool to handle merges:

git config --global merge.tool meld

Use nano for commit messages:

git config --global core.editor "nano"

Use UTF-8 diretory names:

git config --global core.quotepath false

Aliases in .gitconfig

[alias]
br = branch
ci = commit
co = commit
df = diff
lg = log -p
rb = rebase
st = status

pl = pull
pu = pull
uppl = pull
pllu = pull
plul = pull
ppull = pull
upll = pull
pll = pull

ps = push
psh = push
upsh = push
psuh = push
psh = push

Hub

hub makes Git GitHub-aware.

git clone git://github.com/defunkt/hub.git defunkt/hub
cd defunkt/hub
sudo rake install prefix=/usr/local

icdiff

$ curl -s https://raw.githubusercontent.com/jeffkaufman/icdiff/release-1.3.1/icdiff \

| sudo tee /usr/local/bin/icdiff > /dev/null
&& sudo chmod ugo+rx /usr/local/bin/icdiff

BASH

alias g="LANG=en_US hub"
alias git="LANG=en_US hub"

SSH

Create host aliases like this in your .ssh/config:

host myVPS
  hostname example.org
  user bengt
  port 3241

Or use strom:

$ storm add --port 3241 myVPS example.org bengt

Subversion

To set the editor, in ~/.subversion/config replace

# editor-cmd = editor (vi, emacs, notepad, etc.)

with

editor-cmd = nano

Telnet

sudo dnf install telnet

Hostname

Fedora does not set the hostname during setup, anymore

sudo hostname <username>-<device>

to make that permanent, edit /etc/hostname:

sudo nano /etc/hostname

to something like this

Bengt-Laptop

and add your hostname to the /etc/hosts

127.0.0.1  Bengt-Laptop localhost.localdomain localhost
::1        Bengt-Laptop localhost6.localdomain6 localhost6

MySQL

Set root password

mysqladmin -u root password "newpwd"

to reset

mysqladmin -u root -pnewpwd password "betterpwd"

Natural scrolling

Set org.gnome.settings-daemon.peripherals.touchpad.natural-scroll to enabled using dconf-editor.

Horizontal Scrolling

Set org.gnome.settings-daemon.peripherals.touchpad.horiz-scroll to enabled using dconf-editor.

SELinux

Set SELinux' to SELINUX to permissive or disabled and SELINUXTYPE to minimum to avoid unecessary trouble.

sudo nano /etc/selinux/config

TexStudio

Set Options -> Configure TexStudio -> Editor dictionary path to /usr/bin to /usr/share/myspell and choose en_US.

Setze unter Optionen TexStudio konfigurieren ... Allgemein das Wörterbuch-Verzeichnis auf /usr/share/myspell und wähle de_DEaus. (Ja, HunSpell hat sich zwar von MySpell umbenannt, aber den Ordnernamen nicht geändert. FacePalm)

Tools

gedit

WLAN

  • USB-Stick .. Bengts_WLAN.key

Known Issues

  • realcrypt returns Gtk-Message: Failed to load module "pk-gtk-module" seems harmless, though.

TODO

  • auto upgrade
  • mass-download user data from repos / other sources

FIDO U2F

lsusb
sudo gedit /etc/udev/rules.d/70-u2f.rules

SUBSYSTEM=="hidraw",
MODE="0666",
ATTRS{idVendor}=="2581",
ATTRS{idProduct}=="f1d0   

sudo udevadm trigger

Overclock Displays

Radeon HD4850 -- DVI Dual-Link -- Benq BL2410PT

[bengt@bengt-desktop umc-0.2]$ umc 1920 1080 71 --rbt

    # 1920x1080x70.91 @ 79.207kHz
    Modeline "1920x1080x70.91"  164.750000  1920 1968 2000 2080  1080 1083 1087 1117  +HSync -VSync

xrandr --newmode "1920x1080x70.91"  164.750000  1920 1968 2000 2080  1080 1083 1087 1117  +HSync -VSync | true
xrandr --addmode DVI-1 1920x1080x70.91 | true
xrandr --output DVI-1 --mode 1920x1080x70.91 | true

Radeon HD4850 -- HDMI -- Samsung UE40H5090AS

[bengt@bengt-desktop umc-0.2]$ umc 1920 1080 71 --rbt

    # 1920x1080x70.91 @ 79.207kHz
    Modeline "1920x1080x70.91"  164.750000  1920 1968 2000 2080  1080 1083 1087 1117  +HSync -VSync

xrandr --newmode "1920x1080x70.91"  164.750000  1920 1968 2000 2080  1080 1083 1087 1117  +HSync -VSync | true
xrandr --addmode DVI-1 1920x1080x70.91 | true
xrandr --output DVI-1 --mode 1920x1080x70.91 | true

Vino

Deactivate TLS Diffie-Hellmann for Andoird >= 6.0

$ gsettings set org.gnome.Vino require-encryption false
@craigbarnes
Copy link

I had the exact same problem. I tried to automate the whole thing into a few commands. Maybe it's of interest to you:

@Bengt
Copy link
Author

Bengt commented Apr 6, 2013

Thanks for the input, @craigbarnes! dotfiles only address configuration on the user-level, but I needed/wanted to configure stuff on the system-level, too. If I understand correctly, kickstart only handles the setup with a focus on the things performed "during a typical installation". I need/want to install custom packages from various sources, not just the Fedora or other repos. Thinking about this, I notice that there is a third component, I ignored till now: user data. I elaborated a problem statement reflecting these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment