RSS Feed

RSS

Comments RSS

I use Linux Mint

I have just realized that I have not done an Ubuntu install in … well … a long time.   And it seems that the last time there was this crazy user interface called Unity that completely, utterly, turned me off to that distribution.   With all the very many things I do like about Ubuntu, the simple fact is that if I hate the interface I simply won’t use it or recommend it to others.   So, what to do?   I did do something.   I switched to Linux Mint.  Being basically build on top of the Ubuntu repositories, but with many improvements and the with the basic understanding that the application centric interface systems (like you see on the iPhone) are NOT suitable for use as a desktop environment.   All I really want is a normal desktop environment.   I did not need or WANT a new computer interface paradigm forced upon me.   I am convinced that most Linux users feel the same way.  Not only that, but I am very certain that Unity is also not the way to introduce new users to Linux.   Linux Mint has everything in it that I wanted and liked about Ubuntu, but without the terrible monstrosity of a non-dekstop called Unity and without the arrogance of thinking they know what is best for all us.  The Linux Mint developers have been committed to the needs and sensibilities of the users and that has won my loyalty.   I now tell folks that I use Linux Mint,  and I recommend it to others.

Linux Mint

Linux Mint, 2 thumbs up!

more about Unity badness…

 

Voting ABO in 2012

I have been asked by quite a few people who I intend to vote for President in 2012.   I tell them all that I am voting ABO, that is Anyone But Obama.   I am really at the point that I do not believe that we can do much worse that this would be despot that now occupies the White House.  He is a Marxist, a liar and a demagogue.  So, I will vote for anyone running against him.   That means I will vote for a Republican, any Republican.   That does not mean that the eventual Republican candidate will necessarily be my all-time favorite candidate.   Likely far from it, but any of them will be vastly superior to Obama.  At this time, my favorite of the Republican candidates is Newt Gingrich.  While he does have some baggage, he is clearly the smartest and best prepared person for the office of the Presidency.   So, GO NEWT!

http://www.newt.org

Steve Jobs passes away

Steve Jobs, the Thomas Edison of our day, has passed away.  He dreamed of bringing computing to the masses, and he succeeded.  But he did much, much more than that.  He brought to us a revolution.  From the Apple computer, to the Mac, to the IPod, and then the IPhone and IPad all the other the great gadgets he and his company created,  our lives have been more fun and more productive.   He founded the company, Apple, in a garage then stepped aside for a time to pursue other technical interests, such as the NeXT systems and OS.  But then he returned to Apple to rescue and revive a company that has lost its way.  Oh, but he did much more that just revive Apple.  He had the vision to embrace other technologies and put his unique touch to them.  He spearheaded the creation of wonderful personal entertainment and communications devices and then married those to computing technologies, advanced operating systems and Internet content delivery; which turned Apple into a computing, communications and internet Juggernaut.  Steve Jobs was an inventor, businessman and visionary.  Most of all, he was a great man who gave his all, and even the last of his health, in pursuit of his dreams which have enriched all our lives.

Steve Jobs, RIP

February 24, 1955 – October 5, 2011.     

http://en.wikipedia.org/wiki/Steve_jobs

Getting aquainted with the M1911

This is a different sort of blog post for me.  No code snippets or anything like that.   I have recently become the owner of a handgun, a M1911-A1 CS, .45 cal.  It is the short barrel, 3.5″, version of the classic M1911-A1.  While I have had other types of firearms all my life:  shotguns and riffles, this is the first time I have owned a handgun.   I guess I was waiting for the kids to grow up and basically be out of the house?  Not sure if that was really the reason, but I do know that I really like this gun!  It feels great in my hand and is a size that will simplify concealed carry capabilities.  Today I went out shooting with friends who who are quite a bit more experienced with handguns than I am, one of which is a veteran with combat experience.  I sure appreciated the opportunity to learn and improve my shooting.   It was also a lot of fun!  I am going to have to do more of this.

Python, watermark a PDF

This blog entry shows how to use Python and two third party modules (pyPdf and ReportLab) to watermark a PDF.

#This sample uses two third part modules for Python, 
#pyPdf & ReportLab to achieve creating and placing 
#watermark text at angle on an existing PDF file. 
#This example was produced with Python 2.7 
#See http://pybrary.net/pyPdf for more informaton about pyPdf. 
#See http://www.reportlab.com for more information about ReportLab. 

#Import the needed external modules and functions from pyPdf and reportlab.
from pyPdf import PdfFileWriter, PdfFileReader 
from reportlab.pdfgen import canvas

#Use reportlab to create a PDF that will be used 
#as a watermark on another PDF.
c= canvas.Canvas("watermark.pdf") 
c.setFont("Courier", 60)
#This next setting with make the text of our 
#watermark gray, nice touch for a watermark.
c.setFillGray(0.5,0.5)
#Set up our watermark document. Our watermark 
#will be rotated 45 degrees from the direction 
#of our underlying document.
c.saveState() 
c.translate(500,100) 
c.rotate(45) 
c.drawCentredString(0, 0, "A WATERMARK!") 
c.drawCentredString(0, 300, "A WATERMARK!") 
c.drawCentredString(0, 600, "A WATERMARK!") 
c.restoreState() 
c.save() 

#Read in the PDF that will have the PDF applied to it.
output = PdfFileWriter() 
input1 = PdfFileReader(file("original_pdf.pdf", "rb")) 

#Just to demo this function from pyPdf. 
#If the PDF has a title, this will print it out.
print "title = %s" % (input1.getDocumentInfo().title)

#Open up the orgininal PDF.
page1 = input1.getPage(0)

#Read in the file created above by ReportLab for our watermark.
watermark = PdfFileReader(file("watermark.pdf", "rb"))
#Apply the watermark by merging the two PDF files.
page1.mergePage(watermark.getPage(0))
#Send the resultant PDF to the output stream.
output.addPage(page1)

#Just to demo this function from pyPdf. 
#Return the number of pages in the watermarked PDF.
print "watermarked_pdf.pdf has %s pages." % input1.getNumPages()

#write the output of our new, watermarked PDF.
outputStream = file("watermarked_pdf.pdf", "wb") 
output.write(outputStream) 
outputStream.close()

Python & SQLite3, demonstrating parameters

Python affords a great opportunity for one to learn basic SQL commands and operations by having SQLite3 built into its standard library.   To learn more, here are some links for Python’s implementation of the API and also the SQLite3 website.

http://docs.python.org/library/sqlite3.html

http://www.sqlite.org/index.html

Here is a brief example of  creating a simple SQLite3 database in Python, performing a query against it with parameters.  The use of parameters is demonstrated in 3 ways.

>>> import sqlite3
>>> conn = sqlite3.connect(‘c:\sqlite3\example’)
>>> c = conn.cursor()
>>> c.execute(“””create table contacts(client_id integer primary key, first_name text, last_name text, email text)”””)
>>> c.execute(“””insert into contacts values(NULL, ‘Bob’, ‘Dole’, ‘bob.dole@gmail.com’)”””)
>>> conn.commit()
>>> c.execute(“””insert into contacts values(NULL, ‘Tom’, ‘Cruz’, ‘tom.cruz@xenu.com’)”””)
>>> conn.commit()

First parameters are passed using the ? placeholder.  The values are supplied by a collection, a list in this example.  A tuple could also be used.

>>>params = [‘Tom’,’Bob’]

>>> c.execute(“””select client_id, first_name, last_name, email from contacts where first_name in (?,?)”””, params)
>>> for i in c:
print(i)

Second, a mapping object (dictionary) is used to supply the parameters via its keys.   This allows the parameters to be named.

names = {“name1”: ‘Bob’, “name2”:’Tom’}

>>> c.execute(“””select client_id, first_name, last_name, email from contacts where first_name in (name1,name2)”””, names)
>>> for i in c:
print(i)

Third, we use the built in mapping that stores information about local program variables to supply the parameters.  The locals() function is used to return the mapping information.  This allows the parameters to be simple variables, rather than members of a collection or keys in a mapping.

name1 = ‘Bob’; name2 = ‘Tom’

>>> c.execute(“””select client_id, first_name, last_name, email from contacts where first_name in (name1,name2)”””, locals())
>>> for i in c:
print(i)

All three methods produce the very same result of the query on the database:

(1, ‘Bob’, ‘Dole’, ‘bob.dole@gmail.com’)
(2, ‘Tom’, ‘Cruz’, ‘tom.cruz@xenu.com’)
>>> c.close()

Additionally, remember the parameter needs to be passed to the execute() function by a collection or mapping type variable.   So, if you would like to loop through the database, say by the indices, and are using a simple integer variable in the loop, you can take that and convert it to a list variable on the fly (a list containing one element) and use that.    Like this:

out_list = []
for x in range(1,4):
    y = [x]        #here we take the integer x and use it to create the single element list y for use in c.execute()
    c.execute("""select client_id, first_name, last_name, email from contacts where client_id = :y""", y)
    for i in c:
        out_list.append(i)
print(out_list)

The Mystery of Godliness

The Mystery of Godliness

by Bill Allen on Friday, July 22, 2011 at 11:58pm

1 Tim. 3:16 And without controversy great is the mystery of godliness: God was manifest in the flesh, justified in the Spirit, seen of angels, preached unto the Gentiles, believed on in the world, received up into glory.

In this text, the source of godliness is examined. Godliness, true inner spiritual piety, awe and reverence towards God, which would be truely mysterious to those who do not posess it and which are only concerned with outward religious forms or those who fear not God, and also mysterious to those who do posses it but are uninformed from the gospel as to its source and therefore mysterious to both groups, is revealed to be the One who is God manifest in the flesh, who was justified in the Spirit, was seen of angels of both the heavenly and earthly kinds but particularly the earthly kind as they then preached it unto the Gentiles who then believed in this same One who was also received up into glory. The solution to the mystery godliness is none other that Jesus Christ who dwells within us, giving us a new heart and mind and is the source of true inner piety, love and devotion to God in all fear and reverence.

LFS 6.8 not ready for prime time!

I was in an experimenting mood today and decided to give LFS (Linux From Scratch) 6.8 a try.  It is intended to be a from the ground up Linux build system that is primarily aimed at being an educational tool.   The goal is excellent!  Sadly, LFS 6.8 is not.  I did not get very far into the book before I began finding evidence that this version, suposedly the “stable” version, needs serious sanity checking.   More than once I found that the directions left me in the wrong directory.   Worse yet, the heart of the build, the GCC compiler build, fails outrageously.   I tried correcting the instructions but found that even with the paths to the files, etc. corrected it still fails.   I have sent note to the developers with what I have found and hope for some good help and feedback.   It is not beyond possibility that I made some bad mistake along the way, but I believe I was following the directions very, very carefully.   I hope the LSF effort continues and a corrected or updated version is released as it would be a wonderful teaching tool.   However, a teaching tool needs to work flawlessly if it is going to succeed in educating rather than confusing or frustrating the student.

ArchLinux, install file compression packages

With a base install of ArchLinux completed, you may find you still do not have all the file compression utilities installed to handle most commpression types.  Run the following to install the most common file compression packages.   Some may already be installed.   This is ok, they will just be refreshed.

pacman -S tar gzip bzip2 zip unzip unrar p7zip arj lha lzma-utils lzop

Xfce 4.8 missing trashcan

If you install Xfce 4.8, you may find the desktop trashcan icon is missing, even though it is selected in the desktop properties visible icons selection.   To get the trashcan icon back, install the gvfs package.

ArchLinux Reviewed

The Linux Action Show guys review ArchLinux. The ArchLinux review is about 30 minutes into the show.

An ArchLinux DVD tweak

This is just a quick tweak for ArchLinux. Many apps, such as VLC Player, that need to read the DVD device default to a setting of /dev/dvd. I found that ArchLinux does not have the DVD device listed in the /dev directory as such. Instead they are using /dev/sr0. You have a couple of choices. Once you know this fact, you can adjust the configuration of every app you use that needs to read the DVD drive to look to /dev/sr0. In my opinion, it is more straight forward to adjust the ArchLinux system to accomodate the use of /dev/dvd by creating an entry for it. Put the following in your /etc/rc.local system startup script and everytime you start the system the /dev/dvd device entry will be created for you automatically.

cp -l /dev/sr0 /dev/dvd

Intro to Linux

Distro Review: ArchLinux

ArchLinux, when old becomes new again

There is an old saying about old things becoming new again.   That is what I thought about as I did an ArchLinux install for the first time this weekend.   The process took me way, way back into the ’90s when I first became involved with Linux.   Back then, it was Slackware and a pre version 1 kernel.   The process was boot from the disk and very carefully follow the directions.   No GUI install back then and you configured your system as you went.   When the install finished, you were were presented with a shell login prompt to logon as root.   Very much the same thing when doing an ArchLinux install today.   I chose to use the net install CD, which is only about 160MB in size, the rest of the distribution is pulled down from mirror sites on the Internet.   The main appeal, to me, was that it was a return to a more technical DIY type of install with every little detail under my control, as opposed to a GUI install that lets you choose the language, time zone and keyboard and all the rest is done for you.   Now, I am not at all complaining about the modern, easy, GUI Linux installs.   These are in fact WONDERFUL!   Without easy installs like these that very nearly garantee a successful install, Linux would have very little chance to spread and be as widely adopted as it is becoming.    However, sometimes us geeks need more.   We need to satisfy that urge to take a look under the hood and tinker.   Sometimes we just need to geek out and do it ‘the hard way’.   So, I jumped in and did an ArchLinux install to satisfy this need.   One thing that I found is that while is very much a lower level install, it is also a very structured and GOOD install process.   You encounter much more detail along the way, but the process is very tightly controlled.  It is also what I would consider a very educational install with the internals exposed to view.   However, one thing it is not is undocumented.   Back in the old days, the install was sparsely documented and you really had to hunt and search to find out what you need to know to get everything right and running.  The documentation on the ArchLinux site, and also provided on the install CD itself, is supperb!   For instance, after I got the base install done, I wanted to do two more things – Get XWindows up so I could have some GUI if and when I wanted it, and get my wireless card going.   Both of these processes were extreemly well documented and I got both accomplished with just the documentation on the ArchLinux site.   I highly recommend ArchLinux to anyone wanting to dig in deeper and learn more of what makes Linux tick by getting back to the basics and doing a more basic install and then building your system, the way you want it, from there.   ArchLinux——– A review of ArchLinux

Linux Desktops, Xfce 4.8

Being able to select a desktop for your computer is a concept that is unfamiliar to the typical Windows user. Windows users can, of course, make a fairly wide selection of themes and configurations to their current desktop, but changing it out wholesale for a completely different desktop with its own set of default applications and functionalities is not part of their operating system experience. This is not true for users of Linux, or any of the other Unix-like operating systems. From the very beginning of the availability of graphical windowing systems in the Unix world with advent of X windowing system, development of new and innovative desktop environmnets has been the name of the game. Some of the available systems have been X11, CDE, GNOME, KDE, Fluxbox, WindowMaker, Englightenment, LXDE, and Xfce. There are many others, and surely I have inadvertantly omitted somebody’s favorite desktop environment. The main point here is that once you leave the world of Microsoft Windows, you enter a world full of choice when it comes to your operating system environment and particularly your graphical desktop environment. Today I would like to point out the Xfce dekstop, which recently came out with its latest release Xfce 4.8

Linux.com has a nice “weekend project” article about Xfce:  http://www.linux.com/learn/tutorials/456623-weekend-project-find-hidden-treasures-in-xfce-48

Linux Celebrating 20 Years

Linux Mint, 2 thumbs up!

After facing so many frustrations with Ubuntu 11.04 and uncertainties as to where Ubuntu is going in the future, I finally decided to bite the bullet and try different distributions.  The latest two that I have tried I can give 2 big thumbs up.   These were Linux Mint 11 and Linux Mint Xfce.

Linux Mint 11 is based on Ubuntu 11.04, but the Linux Mint team chose to not include the Unity desktop.   This distribution is everything that I would have hoped Ubuntu 11.04 could have been.   In fact, the level of polish and completness in Linux Mint 11 exceeds that typical of most Ubuntu releases.   This is saying a lot, because most Ubuntu releases are quite good.   However, one thing still worries me – GNOME.   Linux Mint kept the GNOME 2.3x desktop, which I prefer, but I must wonder if they will it be forced into GNOME3 in the next release?  I like GNOME2 and am not looking for wholesale changes of my desktop.   This type of uncertainty about the future of the desktop has given me enough pause to cause me to explore other desktops, which leads me to my next big thumbs up.

Linux Mint Xfce is NOT based on the Ubuntu upstream package sources.   Instead, it is based on the upstream Debian Testing packages.   This is also a “rolling” distribution as it is continuously taking updates from Debian Testing rather than being locked in until the next big release.   In essence, there will not be a next big release, or need for a reinstall, or a major “upgrade”.   It will simply update right along with the Debian updates.    I like this!   Also, it is not a GNOME based distribution, it is Xfce.   I have long been a fan of Xfce as an alternative to GNOME.   Like GNOME, it is based on the GTK+ libraries, but is lighterweight in its resource usage.   This is turning out to be what I would consider to be an ideal Debian based distro and may be where I call home for a while.  Were there any issues?  Yes, but only a minor one.   Linux Mint Xfce does not include the jockey-gtk package that the GNOME based distribution does.   This package makes for easier installation of restricted hardware packages, such as the Broadcom STA wireless driver.   I would strongly urge the Linux Mint team to consider its inclusion in the future or provide their own alternative.   However, this was easily overcome once I found the instruction on the Debian site for installation and configuration of the WL package.  This was straightforward and simple.   Here is the link. Debian WL driver install. Also, this distribution came configured with the Linux 2.6.32 kernel.   This is understandable since it was the kernel used in Linux Mint 10, which this is essentially a continuous update of.   I chose to update the Linux 2.6.38 kernel and did so via the Synaptic Package Manager.   This upgraded flawlessly.  I do not know if the update system would have eventually provided the kernel update to me, but it was reported my system as up to date so I am guessing it was not going to do so.

I would recommend either of these offerings from Linux Mint as an alternative to Ubuntu.   For those simply wanting a good GNOME desktop experience with no hickups, go for Linux Mint 11.   For those wanting to try a different desktop altogether, but one similar to GNOME2, give Linux Mint Xfce a try.   I think you will enjoy either of these.   Remember, Linux is all about CHOICE.   You are not locked into any distribution or desktop system.   Don’t be afraid to try out new things.   If enough folks decide not to adopt Ubuntu 11.04 or its Unity desktop, they will get the message.

Ubuntu 11.04, another annoying “feature”

Yes, I am going to harsh on Ubuntu 11.04 some more.  Even once you have turned off Unity and returned to a classic Gnome desktop, all is not back to “normal”.  Ubuntu 11.04 introduces a really stupid feature know as the “overlay” scrollbar.   Basically, it is a scrollbar tab that replaces the traditional scrollbar found on a windowed item.   It hides when not in use and pops back up into view when the mouse is moved into its area at the edge of the window.   HOW STUPID!  Who really wants to be playing hide and seek with windowing elements on their screen?  Even worse, this “feature” is found by default in all the Ubuntu derivatives also based on 11.04 such as Xubuntu and Linux Mint.   I would encourage the providers of derivatives to NOT accept every new feature that might be foisted upon us by the Ubuntu developers.   Fortunately, there is a way to turn the overlay scrollbar off and return to a normal scrollbar.

  1. Go to a terminal.
  2. sudo to get administrative privs
  3. paste the following into the command line and hit enter (then reboot for the change to take effect)
  • echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars

I found this great tip here: http://www.webupd8.org/2011/04/how-to-disable-overlay-scrollbars-in.html

Another good article that addresses this issue and others in Ubuntu Unity.

http://www.pcpro.co.uk/blogs/2011/05/03/ubuntu-unity-the-great-divider/

 

 

Stephenville Lions Spooktacular Half Marathon

Attentions all you running enthusiasts! Please come out to the Stephenville Lions Club 5k-10k-Half Marathon race fund raiser on Oct. 22, 2011. It is a great and fun race. All proceeds go to fund the charitable endeavors of the Stephenville, TX Lions Club.

www.active.com

Stephenville Lions Halloween Spooktacular Half~10K~5K | Stephenville, Texas 76401 | Saturday, October 22, 2011 @ 8:00 AM


Stephenville Lions Club