[root@rhce-ryanrudolf]# rm -rf / 2> /dev/null

things I break/fix for fun and learning

Mar 13, 2019 - 4 minute read - Comments

Linux Cheat Sheet for Thinkpad T420s

This is my cheat sheet / guide when reinstalling Fedora 29 on my Thinkpad T420s and Thinkpad X220. Enjoy! (this is a WIP. i have my linux system up and running the way i want it, now i just need to document the steps i did)

  • Download the Fedora Mate Live USB ISO from here.

  • Burn to USB using Fedora Media Writer (available in Linux / Windows).

  • Boot using the LiveUSB. Install to disk with the following partition layout -

    /boot - 300MB
    / - 15GB (root partition, not to be confused with /root)
    swap - 8GB (even though I have 16GB RAM, this swap space is sufficient for hibernation)
    /home - remaining space on the disk

  • Remove unneeded packages, install needed packages and configure as needed!

Remove Unneeded Packages

  • GUI programs that I dont’ use - yum remove exaile parole xfburn cockpit gnote engrampa pluma filezilla hexchat pidgin transmission transmission-gtk tigervnc firewalld-applet compiz

  • xorg drivers that are not applicable to T420s / X220 - yum remove xorg-x11-drv-ati xorg-x11-drv-nouveau xorg-x11-drv-wacom xorg-x11-drv-qxl xorg-x11-drv-openchrome

  • virtualization add-ons for guest machines - yum remove open-vm-tools qemu-guest-agent virtualbox-guest-additions xorg-x11-drv-vmware

  • Intel WiFi firmware that are not applicable - yum remove iwl100-firmware iwl105-firmware iwl1000-firmware iwl2000-firmware iwl135-firmware iwl2030-firmware iwl3160-firmware iwl3945-firmware iwl4965-firmware iwl5000-firmware iwl5150-firmware iwl6000-firmware iwl6050-firmware ipw2100-firmware ipw22-firmware

  • Various firmware files not in use - yum remove atmel-firmware zd1211-firmware

Install Fedora 29 Packages

  • RPM Fusion free repo - yum install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

  • RPM Fusion non-free repo - yum install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

  • TLP repo - yum install http://repo.linrunner.de/fedora/tlp/repos/releases/tlp-release.fc$(rpm -E %fedora).noarch.rpm

  • sublime repo - dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo

  • i3 tiling window manager - yum install i3

  • standalone compositor - yum install compton

  • command line comicbook viewer (cbr cbz support) - yum install zathura-cb

  • for cloning git repos - yum install git

  • for decompiling / recompiling DSDT - yum install iasl

  • command line text editor - yum install vim

  • GUI text editor - yum install sublime-text

  • ftp server, ftp client and several network tools - yum install vsftpd ncftp ftp whois telnet nmap

  • image manipulation - yum install gimp

  • static site generator - yum install hugo

  • for compiling vmware workstation modules - yum install elfutils-libelf-devel

  • command line movie player and music player - yum install mpv mpd mcp ncmpcpp

  • command line file compression tools - yum install p7zip unzip unrar

  • browser and codecs - yum install chromium chromium-libs-media-freeworld compat-ffmpeg28 ffmpeg-libs

  • command line image tools, torrent client and system info tools - yum install feh scrot rtorrent neofetch screenfetch

  • command line tool for mounting and accessing android devices - yum install simple-mtpfs android-tools

  • thinkfan and powermanagement using tlp - yum install lshw acpi powertop thinkfan lm_sensors tlp tlp-rdw akmod-tp_smapi akmod-acpi_call dkms

  • for hardware video acceleration - yum install libva-intel-driver libva-vdpau-driver libvdpau-va-gl libva-utils

Some packages are not in the repo, for tihs we have to manually download / install them from manufacturer website or via github. For the github repos, read the README.md for instructions on how to install the package!

  • For VMware workstation, download the 64bit binary here. Once downloaded, perform chmod +x and install the package`

  • dark theme - git clone https://github.com/vinceliuice/matcha.git

  • i3block scripts - git clone https://github.com/vivien/i3blocks.git

  • exfat no-fuse for psvita - git clone https://github.com/barrybingo/exfat-nofuse.git

Configure sudo

  • Edit the sudoers file as root - visudo

  • Remove the # on the item that says wheel. It should read %wheel ALL=(ALL) ALL

  • Add local username to the wheel group - usermod -aG wheel *username*

  • Logout / login for the changes to take effect.

FTP Server Configuration

  • install the ftp server - yum install vsftpd

  • enable ftp server at startup - systemctl enable vsftpd

  • start the ftp server - systemctl start vsftpd

  • allow the ftp service in the firewall - firewall-cmd --permanent --add-service=ftp

  • reload firewall configuration - firewall-cmd --reload

MPD Server Configuration for PulseAudio

  • Install mpd (music player daemon) server - yum install mpd

  • Enable the mpd server - systemctl enable mpd

  • Edit the file - vi /etc/pulse/client.conf and change autospawn to yes

  • Edit the file - vi /etc/mpd.conf and under pulse audio_output, change the server to localhost or 127.0.0.1

  • Edit the file - vi /etc/pulse/defaul.pa and add the following items load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

  • Add local user to the mpd group - usermod -aG mpd *username*

  • Reboot!

MATE, compton and i3 Window Manager

  • Install compton - yum install compton

  • Install i3 window manager - yum install i3

  • Launch dconf-editor. Navigate to org > mate > desktop > session > required-components

  • Change marco to i3

  • Navigate to org > mate > desktop > session > required-components. In the required-component-list delete filemanager and panel

  • Optional - Delete / rename /usr/share/xsessions/i3.desktop and /usr/share/xsessions/i3-with-shmlod.desktop

  • Logout / reboot!

Thinkfan configuration

  • Install thinkfan for CPU fan control - yum install thinkfan

  • Find the sensors of the system, execute as root - for i in $(find /sys/devices -type f -name "temp*_input"); do echo hwmon $i; done >> /etc/thinkfan.conf

  • Edit the config file vi /etc/thinkfan.conf and enter the following values

    (0,     0,      42)
    (1,     40,     47)
    (2,     45,     52)
    (3,     50,     57)
    (4,     55,     62)
    (5,     60,     77)
    (7,     73,     93)
    (127,   85,     32767)
    
  • Enable thinkfan service - systemctl enable thinkfan

  • Reboot!

comments powered by Disqus