Fedora 21 on an HP z420 Workstation

Having started with Fedora 17 and then upgrading to Fedora 19, I decided that a clean install of Fedora 21 would be in order.

I backed up all of my old partitions to an encrypted partition on a USB drive.  You know the old procedure
cryptsetup luksOpen /dev/sdc1 seagate
mount /dev/dm-5 /mnt/seagate

Next, I booted a Fedora 21 live image (workstation) and fdisk'ed the main drive which was operating under RAID-0 through the HP device and deleted the Linux partitions but kept the winblows 7 partition (there are newer games that use DirectX > 9 that I need to be able to run occasionally and Wine/Codeweavers have not yet gotten to that level.)

At this  point I hit a ton of problems with the hardware fakeraid device.  Anaconda could not handle the devices correctly.  I tried a thousand different hacks but eventually decided that I was taking too much time.  I broke the RAID-0 stripe in the Bios settings and proceeded to install Fedora 21 on 2 separate hard drives.  This killed the Winblows partition I was trying to save -- oh well -- have to dig up the install CD sometime and re-install.

With separate partitions Fedora 21 installed very easily.  One thing that I should have RTFM was the differences between the Fedora products and the non-product installs.  I just went with "Workstation" which installed Gnome since I figured I could just install the XFCE group through yum after.  Turns out that Workstation == Gnome and doesn't like mingling with the non-product groups.  So to install XFCE, I had to use the workaround:
yum groupinstall "Xfce Desktop" "LXDE Desktop" "MATE Desktop" "Cinnamon Desktop" --exclude fedora-release\*

I like the old school control-alt-backspace short cut to kill an X server, so I re-enabled that by adding:
Option          "XkbOptions"    "terminate:ctrl_alt_bksp,"
to:
/etc/X11/xorg.conf.d/00-keyboard

I have 3 monitors configured in Portrait mode across my desk.  I haven't worked out a perfect GDM configuration but at least I can get the user menu to appear correctly by adding this:
(sleep 5;    /usr/bin/xrandr                     \
      --fb 3600x1920                    \
      --output DVI-I-1                  \
        --primary                       \
        --auto                          \
        --panning 1200x1920+0+0         \
        --rotate left                   \
      --output DP-1                     \
        --right-of DVI-I-1              \
        --auto                          \
        --panning 1200x1920+1200+0      \
        --rotate left                   \
      --output DVI-D-0                  \
        --right-of DP-1                 \
        --auto                          \
        --panning 1200x1600+2400+0      \
        --rotate left > /dev/null 2>&1 ) &
to the end of:
/etc/gdm/Init/Default
and restarting gdm:
systemctl restart gdm.service

Jetbrain's Rubymine wants more inotify handles so created:
/etc/sysctl.d/00-intellij.conf
with content:
fs.inotify.max_user_watches = 131072

sudoedit virtualbox.repo
[virtualbox]
# name=Fedora $releasever - $basearch - VirtualBox
# baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
name=Fedora 21 - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/20/$basearch
enabled=1
gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

sudo chmod 0644 virtualbox.repo
(umask 022; sudo yum install VirtualBox-4.3 kernel-devel)
(cd && sudo /etc/init.d/vboxdrv setup)

(umask 022; sudo yum install xfce4-cpufreq-plugin xfce4-dict xfce4-embed-plugin xfce4-genmon-plugin xfce4-quicklauncher-plugin xfce4-systemload-plugin xfce4-time-out-plugin xfce4-wmdock-plugin elementary-xfce-icon-theme xfce-theme-manager xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-diskperf-plugin xfce4-mixer xfce4-netload-plugin xfce4-notifyd xfce4-screenshooter beefy-miracle-backgrounds-xfce f21-backgrounds-xfce fedora-jam-backgrounds-xfce heisenbug-backgrounds-extras-xfce heisenbug-backgrounds-xfce mousepad parole ristretto schroedinger-cat-backgrounds-extras-xfce schroedinger-cat-backgrounds-xfce spherical-cow-backgrounds-extras-xfce spherical-cow-backgrounds-xfce verne-backgrounds-extras-xfce verne-backgrounds-xfce xfburn xfce4-about xfwm4-themes )

# to install different ruby's through rvm
(umask 022; sudo yum install -y libyaml-devel libffi-devel autoconf gcc-c++ readline-devel zlib-devel openssl-devel automake libtool bison sqlite-devel)

# mysql command line utilities
(umask 022; sudo yum install mariadb)





So I had to start over since installing winblows back on the hard drive killed my Linux partitions.  This time I used the XFCE Spin of Fedora 21.

After installation, update to the latest RPMs:
yum clean all; yum makecache fast; yum -y update; yum clean all; yum makecache fast

I like the old school control-alt-backspace short cut to kill an X server, so I re-enabled that by adding:
Option          "XkbOptions"    "terminate:ctrl_alt_bksp,"
to:
/etc/X11/xorg.conf.d/00-keyboard


Jetbrain's Rubymine wants more inotify handles so created:
/etc/sysctl.d/00-intellij.conf
with content:
fs.inotify.max_user_watches = 131072


yum install xlockmore

yum install yum-plugin-{fastestmirror,keys,remove-with-leaves,show-leaves,verify}
yum groupinstall "Xfce Desktop" "LXDE Desktop" "MATE Desktop" "Cinnamon Desktop"
yum install wget

cp /scratch/restore/root/etc/yum.repos.d/atlassian-hipchat.repo .
cp /scratch/restore/root/etc/yum.repos.d/google-chrome.repo .
cp /scratch/restore/root/etc/yum.repos.d/google.repo .
wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-21.noarch.rpm
wget http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-21.noarch.rpm
wget -q https://www.virtualbox.org/download/oracle_vbox.asc
rpm --import oracle_vbox.asc
yum localinstall /root/rpmfusion-free-release-21.noarch.rpm /root/rpmfusion-nonfree-release-21.noarch.rpm
yum install kmod-nvidia nvidia-texture-tools{,-devel}
sed -i.backup -e's/rhgb quiet/verbose nomodeset nouveau.modeset=0 rd.driver.blacklist=nouveau/' /etc/default/grub 
grub2-mkconfig -o /boot/grub2/grub.cfg 
yum install mrxvt rxvt rxvt-unicode-256color
yum install hipchat
yum install google-chrome-beta
yum install pulseaudio-equalizer
yum install pidgin
yum install workrave nedit screen
yum localinstall crossover-14.0.3-1.rpm
yum install krb5-workstation
yum  install mesa-dri-drivers.i686 mesa-filesystem.i686 mesa-libGLU.i686 mesa-libOSMesa.i686 mesa-libOSMesa-devel.i686
yum -y install xorg-x11-drv-nvidia-343.36-1.fc21.i686 xorg-x11-drv-nvidia-libs-343.36-1.fc21.i686
yum -y install nvidia-texture-tools-devel.i686 nvidia-texture-tools-devel.x86_64 xorg-x11-drv-nvidia-devel.i686 xorg-x11-drv-nvidia-devel.x86_64

yum install VirtualBox-4.3
yum install xfce4-cpufreq-plugin.x86_64 xfce4-dict.x86_64 xfce4-embed-plugin.x86_64 xfce4-genmon-plugin.x86_64 xfce4-quicklauncher-plugin.x86_64 xfce4-systemload-plugin.x86_64 xfce4-time-out-plugin.x86_64 xfce4-wmdock-plugin.x86_64 elementary-xfce-icon-theme.noarch xfce-theme-manager.x86_64 xfce4-cpugraph-plugin.x86_64 xfce4-datetime-plugin.x86_64 xfce4-diskperf-plugin.x86_64 xfce4-mixer.x86_64 xfce4-netload-plugin.x86_64 xfce4-notifyd.x86_64 xfce4-screenshooter.x86_64 beefy-miracle-backgrounds-xfce.noarch f21-backgrounds-extras-xfce.noarch f21-backgrounds-xfce.noarch fedora-jam-backgrounds-xfce.noarch heisenbug-backgrounds-xfce.noarch heisenbug-backgrounds-extras-xfce.noarch mousepad.x86_64 parole.x86_64 ristretto.x86_64 schroedinger-cat-backgrounds-extras-xfce.noarch schroedinger-cat-backgrounds-xfce.noarch spherical-cow-backgrounds-extras-xfce.noarch spherical-cow-backgrounds-xfce.noarch verne-backgrounds-extras-xfce.noarch verne-backgrounds-xfce.noarch xfburn.x86_64 xfwm4-themes.noarch
yum install libyaml-devel libffi-devel autoconf gcc-c++ readline-devel zlib-devel openssl-devel automake libtool bison
yum install gdm system-switch-displaymanager
system-switch-displaymanager gdm

## configure Perforce
# download latest from http://www.perforce.com/downloads/Perforce/Customer
# install
cd /usr/local
(umask 022; tar zxvf /tmp/p4v.tgz )
mv /tmp/p4 p4v-2014.2.973065/bin/
chown -R root:root p4v-2014.2.973065
chmod -R o-w p4v-2014.2.973065
chmod 0755 p4v-2014.2.973065/bin/p4
alternatives --install /usr/bin/p4 p4 /usr/local/p4v-2014.2.973065/bin/p4 1
alternatives --install /usr/bin/p4v p4v /usr/local/p4v-2014.2.973065/bin/p4v 1

alternatives --display p4
alternatives --display p4v

I have 3 monitors configured in Portrait mode across my desk.  I haven't worked out a perfect GDM configuration but at least I can get the user menu to appear correctly by adding this:
(sleep 5;    /usr/bin/xrandr                     \
      --fb 3600x1920                    \
      --output DVI-I-1                  \
        --primary                       \
        --auto                          \
        --panning 1200x1920+0+0         \
        --rotate left                   \
      --output DP-1                     \
        --right-of DVI-I-1              \
        --auto                          \
        --panning 1200x1920+1200+0      \
        --rotate left                   \
      --output DVI-D-0                  \
        --right-of DP-1                 \
        --auto                          \
        --panning 1200x1600+2400+0      \
        --rotate left > /dev/null 2>&1 ) &
to the end of:
/etc/gdm/Init/Default
and restarting gdm:
systemctl restart gdm.service

(umask 022; sudo yum install mariadb mariadb-devel)

(umask 022; sudo yum install fontconfig.i686 fontconfig.x86_64 gnutls.i686 gnutls.x86_64 gsm.i686 gsm.x86_64 gstreamer-plugins-base.i686 gstreamer-plugins-base.x86_64 gstreamer.i686 gstreamer.x86_64 isdn4k-utils.i686 lcms2.i686 lcms2.x86_64 libXcomposite.i686 libXcomposite.x86_64 libXinerama.i686 libXinerama.x86_64 libgphoto2.i686 libgphoto2.x86_64 libv4l1.i686 libv4l1.x86_64 libxml2.i686 libxml2.x86_64 libxslt.i686 libxslt.x86_64 openal-soft.i686 openal-soft.x86_64 openldap.i686 openldap.x86_64 sane-backends-libs.i686 sane-backends-libs.x86_64)

sudo systemctl enable sshd.service
sudo systemctl start sshd.service

 (umask 022; sudo yum install tigervnc)

# for borderlands 2 and the pre-sequel don't you know?
 (umask 022; sudo yum install steam)

# perforce visual client is annoyingly starting on my 3rd monitor and every sub-window must be moved to the primary window and closed before subsequent windows will work.  Now, I'm thinking, maybe I can run an Xnest and run p4v in there.
 (umask 022; sudo yum install xorg-x11-server-Xnest)
 (umask 022; sudo yum install lesstif-mwm)
Xnest -geometry 1920x1080 :1 &
mwm -display :1 &
(export DISPLAY=:1; p4v) &
# not sure if it is Xnest or mwm, but rolling up the Xnest window and then rolling it back  down is not causing p4v to repaint.  Going to try another window manager, twm.
(umask 022; sudo yum install twm)
# twm didn't fix it, but its iconify and de-iconify are more convenient than mwm's so going  to stick with twm.  Replaced my original p4v start script with this

> cat bin/generic/run-p4v
#!/bin/bash
PATH=${HOME}/bin/generic:${PATH}
export PATH
function startXnest ()
{
  /usr/bin/Xnest -name P4V-Xnest -geometry 1920x1080+0+80 :1 &
  sleep 2
  /usr/bin/twm -display :1 &
  /bin/true
}
function startP4v ()
{
  export DISPLAY=:1
  ( /etc/alternatives/p4v $@ )&
  sleep 2
  /bin/true
}
if ! ncat -4 -i 1 -l localhost 6001 2>&1 | grep -q "already in use"; then
  startXnest
  startP4v
else
  startP4v
fi
#( /etc/alternatives/p4v $@ )&
#sleep 2
exit 0

# that didn't last long, going to try fvwm
(umask 022; sudo yum install fvwm)

# twm is a better friend, back to that and my late '90s .twmrc
# need some additional fonts to cut down on the errors coming out of twm though
 (umask 022; sudo yum install xorg-x11-fonts-100dpi.noarch xorg-x11-fonts-75dpi.noarch xorg-x11-fonts-ISO8859-1-100dpi.noarch xorg-x11-fonts-ISO8859-1-75dpi.noarch xorg-x11-fonts-Type1.noarch xorg-x11-fonts-misc.noarch)

# need something to open winblows documents
(umask 022; sudo yum groupinstall LibreOffice)

# ended up having problems with Audio in a VirtualBox running windoze 7.  Though, I really haven't entirely had great audio with the main linux box.  I assumed that I didn't install enough packages. After some tracing today, and output from pulseaudio:
> /usr/bin/pulseaudio
E: [pulseaudio] ltdl-bind-now.c: Failed to open module mbeq_1197.so: mbeq_1197.so: cannot open shared object file: No such file or directory
E: [pulseaudio] module-ladspa-sink.c: Failed to load LADSPA plugin: file not found
E: [pulseaudio] module.c: Failed to load module "module-ladspa-sink" (argument: "sink_name=ladspa_output.mbeq_1197.mbeq master=alsa_output.pci-0000_00_1b.0.analog-stereo plugin=mbeq_1197 label=mbeq control=3.0,3.0,7.3,7.0,3.0,-1.0,-6.6,-6.3,-4.5,-4.0,1.1,1.2,5.8,7.9,8.8"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

# I installed a few more packages:
 (umask 022; sudo yum install ladspa ladspa-devel ladspa-swh-plugins)
# now starting the vm doesn't cause error messages

# install java's sun jdk
(umask 022; sudo yum localinstall jdk-8u31-linux-x64.rpm)
# update alternatives to point to the new jdk
gzip -9v /usr/java/latest/man/man1/*
export LINKDIR=/usr/bin
export MANLINK=/usr/share/man/man1
export JRELINK=/usr/lib/jvm
export JHOME=/usr/java/latest
export JREDIR=$JHOME/jre/bin
export JDKDIR=$JHOME/bin
export MANDIR=$JHOME/man
alternatives --install $LINKDIR/java java $JREDIR/java 20000                        \
  --slave $JRELINK/jre              jre                 $JREDIR/jre                 \
  --slave $LINKDIR/jjs              jjs                 $JREDIR/jjs                 \
  --slave $LINKDIR/policytool       policytool          $JREDIR/policytool          \
  --slave $LINKDIR/keytool          keytool             $JREDIR/keytool             \
  --slave $LINKDIR/orbd             orbd                $JREDIR/orbd                \
  --slave $LINKDIR/pack200          pack200             $JREDIR/pack200             \
  --slave $LINKDIR/rmid             rmid                $JREDIR/rmid                \
  --slave $LINKDIR/rmiregistry      rmiregistry         $JREDIR/rmiregistry         \
  --slave $LINKDIR/servertool       servertool          $JREDIR/servertool          \
  --slave $LINKDIR/tnameserv        tnameserv           $JREDIR/tnameserv           \
  --slave $LINKDIR/unpack200        unpack200           $JREDIR/unpack200           \
  --slave $LINKDIR/jcontrol         jcontrol            $JREDIR/jcontrol            \
  --slave $LINKDIR/javaws           javaws              $JREDIR/javaws              \
  --slave $MANLINK/java.1.gz        java.1.gz           $MANDIR/java.1.gz           \
  --slave $MANLINK/jjs.1.gz         jjs.1.gz            $MANDIR/jjs.1.gz            \
  --slave $MANLINK/keytool.1.gz     keytool.1.gz        $MANDIR/keytool.1.gz        \
  --slave $MANLINK/orbd.1.gz        orbd.1.gz           $MANDIR/orbd.1.gz           \
  --slave $MANLINK/pack200.1.gz     pack200.1.gz        $MANDIR/pack200.1.gz        \
  --slave $MANLINK/rmid.1.gz        rmid.1.gz           $MANDIR/rmid.1.gz           \
  --slave $MANLINK/rmiregistry.1.gz rmiregistry.1.gz    $MANDIR/rmiregistry.1.gz    \
  --slave $MANLINK/servertool.1.gz  servertool.1.gz     $MANDIR/servertool.1.gz     \
  --slave $MANLINK/tnameserv.1.gz   tnameserv.1.gz      $MANDIR/tnameserv.1.gz      \
  --slave $MANLINK/unpack200.1.gz   unpack200.1.gz      $MANDIR/unpack200.1.gz

alternatives --config java

(umask 022; sudo yum install reptyr)

# add more pulseaudio rpms
(umask 022; sudo yum install paman paprefs pavucontrol volumeicon)


# trouble building 2.9.1 version of mysql gem
(umask 022; sudo yum groupinstall "Development Tools")

(umask 022; sudo yum install ntp)
sudoedit /etc/ntp.conf
sudo systemctl enable ntpd.service
sudo systemctl start ntpd.service

# investigating how to deal with the fact that OWA opens each new browser window at +0+0 with a tiny geometry.  found some interesting links on devils pie (https://wiki.gnome.org/action/show/Projects/DevilsPie?action=show&redirect=DevilsPie)
(umask 022; sudo yum install devilspie2)

## devilspie2 uses a different language Lua to script in.  Configured a script in ~/.config/devilspie2/firefox.lua
-- debug_print command does only print anything to stdout
-- if devilspie2 is run using the --debug option
debug_print("Window Name: " .. get_window_name());
debug_print("Application name: " .. get_application_name());
debug_print("get_window_geometry(): " .. get_window_geometry());
debug_print("get_window_type(): " .. get_window_type());
debug_print("get_class_instance_name(): " .. get_class_instance_name());
debug_print("get_window_role: " .. get_window_role());
debug_print("get_window_xid: " .. get_window_xid());
debug_print("get_window_class: " .. get_window_class());
if (get_window_geometry()==0) then
    if (get_application_name()=="Firefox") then
        set_window_geometry2(2234,929,1280,720);
    end
end
# now when OWA opens a reply window, it overlays my Firefox window; I'm so happy :) :) :)

## I am really starting to love devilspie2...  I have a 4k monitor (personal) that I use at work and 2 much smaller monitors at home.   Resizing and moving windows is a bit of a pain to do when I switch so I update my devilspie2 configuration to get my windows right.
## cat ~/.config/devilspie2/web.lua
-- debug_print command does only print anything to stdout-- if devilspie2 is run using the --debug optiondebug_print("Window Name: " .. get_window_name());debug_print("Application name: " .. get_application_name());debug_print("get_window_geometry(): " .. get_window_geometry());debug_print("get_window_type(): " .. get_window_type());debug_print("get_class_instance_name(): " .. get_class_instance_name());debug_print("get_window_role: " .. get_window_role());debug_print("get_window_xid: " .. get_window_xid());debug_print("get_window_class: " .. get_window_class());
if (get_window_geometry()==0) then    if (get_application_name()=="Firefox") then        set_window_geometry2(2234,929,1280,720);    endelseif (get_window_class()=="Google-chrome") then    if (get_class_instance_name() == "Google-chrome (.config/google-chrome-alt)") then        set_window_geometry2(2482,0,1350,800);    elseif (get_class_instance_name() == "Google-chrome (.config/google-chrome-alt2)") then        set_window_geometry2(0,0,1800,1200);    endelseif (get_application_name()=="Firefox") then    set_window_geometry2(2230,855,1600,1275);end
## pretty sweet.

## skype on linux, yeah I know
## rpmfusion has lpf-skype so I'm going to give that shot.

=============================================================================================== Package            Arch    Version                                   Repository          Size===============================================================================================Installing: lpf-skype          i686    4.3.0.37-2.fc21                           rpmfusion-nonfree   14 kInstalling for dependencies: dwz                x86_64  0.11-4.fc21                               fedora             103 k fakeroot           x86_64  1.18.4-4.fc21                             fedora              87 k fakeroot-libs      x86_64  1.18.4-4.fc21                             fedora              28 k ghc-srpm-macros    noarch  1.3-2.fc21                                fedora             3.9 k gnat-srpm-macros   noarch  1-1.fc21                                  fedora             8.4 k inotify-tools      x86_64  3.14-8.fc21                               fedora              54 k lpf                noarch  0.1-8.36e5aa0.fc21                        updates             66 k ocaml-srpm-macros  noarch  2-2.fc21                                  fedora             3.9 k perl-generators    noarch  1.03-1.fc21                               updates             14 k perl-srpm-macros   noarch  1-12.fc21                                 fedora             5.1 k redhat-rpm-config  noarch  27-1.fc21                                 updates             58 k rpm-build          x86_64  4.12.0.1-4.fc21                           updates            135 k rpmdevtools        noarch  8.5-1.fc21                                fedora             102 k xemacs-filesystem  noarch  21.5.34-8.20140605hgacf1c26e3019.fc21     fedora              20 k
Transaction Summary===============================================================================================
sudoedit /etc/group   ## add to pkg-build
lpf state
lpf build
lpf install skype
## and fail.  Remove these packages

## having trouble authenticating to Shift in Borderlands2 with the Steam Linux client
## installing additional software based on the output of
/home/guest/.local/share/Steam
find . -type f -exec ldd {} \; 2> /dev/null | grep -i "not found" | sort | uniq

(umask 022; sudo yum install pulseaudio-libs.i686 alsa-plugins-pulseaudio.i686 libXtst.i686 libXtst.x86_64 compiz.i686 compiz.x86_64 libXdmcp.i686 libXdmcp.x86_64 GConf2.i686 GConf2.x86_64 openssl-libs.i686 openssl-devel.i686 libindicator.i686 libindicator libdbusmenu.i686 libdbusmenu.x86_64 libdbusmenu-devel.i686 libdbusmenu-devel.x86_64 libdbusmenu-gtk2.i686 libdbusmenu-gtk2.x86_64 libdbusmenu-gtk3.i686 libdbusmenu-gtk3.x86_64 tbb.i686 tbb  pango.i686 pango heimdal-libs.i686 libgcrypt.i686 libgcrypt bzip2-libs.i686 libcanberra.i686 gnutls.x86_64 gnutls.i686 openssl-libs.i686)


## still a fail, trying instructions from http://www.fedoranow.com/howto-install-steam-on-fedora-21/

(umask 022; sudo yum-config-manager --add-repo=http://negativo17.org/repos/fedora-steam.repo)
(umask 022; sudo yum remove steam )  ##rpmfusion non fedora steam


(umask 022; sudo yum install steam)

## for aws cli
(umask 022; sudo yum install python-pip)

sudoedit /etc/pulse/daemon.conf
; flat-volumes = yes
flat-volumes = no

flat-volumesflat-volumes scales the device-volume with the volume of the "loudest" application. For example, raising the VoIP call volume will raise the hardware volume and adjust the music-player volume so it stays where it was, without having to lower the volume of the music-player manually. Defaults to yes.
Warning: The default behavior can sometimes be confusing and some applications, unaware of this feature, can set their volume to 100% at startup, potentially blowing your speakers or your ears. To restore the classic (ALSA) behavior set this to no.


update:
need node.js installed
    (umask 022; sudo yum -y install nodejs npm)








Comments

Popular posts from this blog

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Installing Fedora 21 on a (late 2014) Mac Mini