Feodra – Setup Desktop Environment

In a recent turn of events I’ve been asked to setup a proof of concept (POC) UNIX desktop environment for a work location.

Below I will work through some of the process.

First I chose to start with Fedora KDE Spin available at https://spins.fedoraproject.org/kde/ as the users will be coming from a Windows world KDE is a fair match.

NOTE: In most cases the dnf commands below can be replaced with yum if you want to try to use similar setup on Red Hat or CentOS

  1. Setup Fedora using the DVD image
  2. For support purposes enable SSH
    sudo systemctl start sshd.service
    sudo systemctl enable sshd.service
    
  3. OPTIONAL But suggested: Modify SELinux
    clear
    sudo cp /etc/selinux/config /etc/selinux/config.bk
    sudo sed -i '/^#/d' /etc/selinux/config
    sudo sed -i '/^$/d' /etc/selinux/config
    SELinuxStatus=$(cat /etc/selinux/config | grep SELINUX=|cut -d'=' -f2)
    echo Current Status: $SELinuxStatus
    sudo sed -i "s|SELINUX=$SELinuxStatus|SELINUX=permissive|" /etc/selinux/config
    SELinuxStatus=$(cat /etc/selinux/config | grep SELINUX=|cut -d'=' -f2)
    echo New Status: $SELinuxStatus
    sudo reboot
    
  4. Set the hostname
    sudo -s
    echo -e "\033[01m\e[4mType your desired hostname for the server, followed by [ENTER]:\e[0m\033[0m"
    read hostname
    sudo hostnamectl set-hostname --static "$hostname"
    sudo hostnamectl set-hostname "$hostname"
    hostnamectl status
    #sudo restorecon -v /etc/hostname
    
  5. Run Update
    sudo dnf update -y
    # OR
    # sudo yum update -y
    

    Note: If you get an error like “Error: Failed to synchronize cache for repo ‘updates'” you may need to disable SSL validation in your yum repositories.
    Some companies like to decrypt SSL traffic to analyze it and then repackage the SSL certificate, in these cases some repositories may have problems.

    # Remove SSL Verify
    # Archive the original config
    sudo cp /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.orig
    sudo cp /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.orig
    sudo cp /etc/yum.repos.d/fedora-updates-testing.repo /etc/yum.repos.d/fedora-updates-testing.repo.orig
    # Add sslverify=false
    sudo sed -i 's|failovermethod=priority|failovermethod=priority\nsslverify=false|' /etc/yum.repos.d/fedora.repo
    sudo sed -i 's|failovermethod=priority|failovermethod=priority\nsslverify=false|' /etc/yum.repos.d/fedora-updates.repo
    sudo sed -i 's|failovermethod=priority|failovermethod=priority\nsslverify=false|' /etc/yum.repos.d/fedora-updates-testing.repo
    
  6. Install additional tools
    echo -e "\033[32mInstalling Needed Applications\033[0m"
    sudo dnf -y install net-tools bind-utils nano wget tcl unzip bzip2 ed gcc make libstdc++.so.6 telnet
    sudo dnf -y install --best dbus-python nss-mdns.i686 nss-mdns.x86_64 pygtk2
    
  7. Set Timezone
    # Set Timezone
    sudo timedatectl set-timezone America/Detroit
    

    Note: If you’re not sure what timezone to set you can look them up with this

    	
    ls /usr/share/zoneinfo/
    ls /usr/share/zoneinfo/America/
    
  8. Remove Preloaded Applications That Are Not Needed
    # Remove Preloaded Applications That Are Not Needed
    # rpm -qa | grep '^qt5'
    sudo dnf remove -y qt5-qdbusviewer-5.7.1-5.fc26.x86_64 kmahjongg-16.12.3-1.fc26.x86_64 kpat-16.12.3-1.fc26.x86_64 kmines-16.12.3-1.fc26.x86_64 ktorrent-5.0.1-3.fc26.x86_64 ktorrent-libs-5.0.1-3.fc26.x86_64 akregator-17.04.1-1.fc26.x86_64 akregator-libs-17.04.1-1.fc26.x86_64 konversation-1.7.2-3.fc26.x86_64 knode-4.14.10-31.fc26.x86_64 knode-libs-4.14.10-31.fc26.x86_64 firefox-56.0-5.fc26.x86_64 konqueror-libs-17.04.1-1.fc26.x86_64 konqueror-17.04.1-1.fc26.x86_64 qupzilla-2.1.2-4.fc26.x86_64 kf5-ktnef-17.04.1-1.fc26.x86_64 kf5-ktnef-17.04.1-1.fc26.x86_64 kget-libs-16.12.3-1.fc26.x86_64 kget-16.12.3-1.fc26.x86_64 kolourpaint-16.12.3-1.fc26.x86_64 kolourpaint-libs-16.12.3-1.fc26.x86_64 kruler-16.12.3-1.fc26.x86_64
    
  9. Install Java
    # Install Java Plugins
    #   icedtea-web java-openjdk
    sudo dnf install -y icedtea-web java-openjdk
    
  10. Install Adobe Reader
    # Install Adobe Reader
    sudo dnf install -y ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm
    
  11. Install Google Chrome
    # Install Google Chrome
    sudo dnf install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
    
    # OR
    cd ~/
    wget --no-check-certificate https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
    sudo dnf install -y google-chrome-stable_current_x86_64.rpm
    
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.