Showing posts with label xscreensaver. Show all posts
Showing posts with label xscreensaver. Show all posts

Friday, September 12, 2014

CentOS 7 - xscreensaver

I really hate this Gnome interface - badly.  It requires so much clicky-clacky/mouse-moving work that I instantly feel like I'm in Microsoft Windows again.  I prefer a nice, simple Window Manager that is simply that - a window manager.

I have a laptop that I have installed CentOS 7 to - after completely forgetting with a desktop installation - that doesn't have a viable screen saver (unless I choose to go with that abomination called "Gnome").  See, I can't deal with Gnome.  I tried KDE for a week, and half of the time, I couldn't unlock the KDE/plasma screen because it never presented the unlock on it.  I realized that CentOS was not going to make a good desktop/laptop operating system unless I could get to a decent Window Manager and screen saver.

So, I did what every intelligent, awesome, amazing, and brilliant individual would do.  I went down the rabbit hole.  Seriously, I should have taken the blue pill and pretended that Gnome was just awesome - but I don't think I could get beyond comparing it to slicing my wrists and doing pushups in salt water with a hint of lemon juice in it.  I grabbed Xfce (nice - this one came in packages from the Fedora Project epel repository).  However, the EPEL Fedora Project repository still did not have xscreensaver.  That's a serious risk to me.  The last thing I wanted was someone coming by, finding the laptop unlocked, and me returning to find Justin Beiber as my wall paper.

So, I knew I had to compile xscreensaver from scratch.  I ran out and downloaded it from http://www.jwz.org/xscreensaver/download.html and extracted it.  I found a couple of missing packages (aside from the development packages I'd installed previously), and found those in yum :
    yum --enablerepo=base --enablerepo=updates --enablerepo=extras --enablerepo=epel --enablerepo=rpmforge install xorg-x11-server-devel.x86_64 libXt-devel libXpm-devel motif-devel
    
Then..., I tried to compile it :
    make distclean
    ./configure --with-motif
    make
    
I kept running into undefined functions for pthread_join and pthread_create, and thought I was missing a library - but I wasn't.  Down that rabbit hole, I realized I had to patch it.  I tracked down (from the error message) that it was trying to assemble the bsod screensaver and getting those functions, so I opened up the Makefile and started checking it to see how the -pthread was being passed.  After tracking it down, I created the following patch :
    diff -rupN xscreensaver-5.30-base/hacks/Makefile.in xscreensaver-5.30/hacks/Makefile.in
    --- xscreensaver-5.30-base/hacks/Makefile.in    2014-09-11 11:07:53.000000000 -0600
    +++ xscreensaver-5.30/hacks/Makefile.in 2014-09-12 09:48:05.017172709 -0600
    @@ -671,7 +671,7 @@ truchet:     truchet.o      $(HACK_OBJS) $(COL)
            $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
     
     bsod:          bsod.o          $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM)
    -       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(XPM_LIBS)
    +       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(XPM_LIBS) $(THRL)
     
     apple2:                apple2.o apple2-main.o  $(HACK_OBJS) $(ATV) $(GRAB) $(TEXT)
            $(CC_HACK) -o $@ $@.o   apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) $(TEXT) $(XPM_LIBS) $(TEXT_LIBS) $(THRL)
    
Simply put - the bsod compile instructions missed having the THRL (pthread library) environment variable passed to it.  That was the ONLY patching I had to do.  It still didn't compile because of the xscreensaver-demo until I symlinked the following Directory :

 cd /usr/include/
 ln -s gdk-pixbuf-2.0 gdk-pixbuf

Compiled just fine!


Tuesday, October 8, 2013

CentOS 6 and Standard X ScreenSavers

I use CentOS as a desktop, primarily because I need to be able to work on scripts and ensure they work on the servers before I throw the things over to the servers for production runs.  However, the default number (and style) of screensavers for Gnome are pitiful.  Popart, the insecure "photos", and some weird "gnome feet" screen saver.  Because of this, I needed to have the original X screen savers.

I'm using CentOS 6.4, and due to previous histories, I knew I needed packages named with the following :
    gnome-screensaver (already installed)
    xscreensaver-base
    xscreensaver-extras
    xscreensaver-extras-gss
    xscreensaver-gl-base
    xscreensaver-gl-extras
    xscreensaver-gl-extras-gss
    
I loaded up http://rpm.pbone.net/ (way better than http://rpmfind.net/), and tracked down RedHat EL6 RPM URL's.  Then threw them into the following command :
    yum install ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-base-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-extras-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-base-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-extras-gss-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-extras-gss-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-extras-5.11-7.el6.respin1.x86_64.rpm
    
This gave me a requirement for a package that was missing with the following error :
    Error: Package: 1:xscreensaver-base-5.11-7.el6.respin1.x86_64 (/xscreensaver-base-5.11-7.el6.respin1.x86_64)
               Requires: xorg-x11-resutils
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    

I found the missing package that was required (news to me), and fired off the command :

    yum install ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-base-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-extras-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-base-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-gl-extras-gss-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-extras-gss-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xscreensaver-extras-5.11-7.el6.respin1.x86_64.rpm \
    ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/xorg-x11-resutils-7.1-10.el6.x86_64.rpm
    

Success!  Note that you will have TWO screen saver options.  If you use gnome-screen saver and hot keys to lock your workstation, you should continue to use that one (your new screensavers will show up in it's configuration pane).  If you open the first one and it says it needs to stop the gnome screen saver, cancel that, close that preferences pane, and open the other one.