World Gone Mad

They are crazy. Even here in my own state, good old fly-over country. We are not overrun with Muslim terrorists. The only terrorists we have to worry about receive government paychecks. Granted, there are a few sensible cops out there, but what little trust they build with the community is destroyed by the bad ones. I’m a former LEO; the last person on earth you want to trust is someone wearing a badge. Let them purge their own ranks, then we can talk about trust.

Whatever happened to the notion people are people, and we should attempt to live and let live? Here in America, oppression was born from the Sociology movement, which itself was born among radical English clergymen who tossed their Bibles in the trash. Historically, we refer to the Progressive Movement, but from that comes all the worst evils in US government today.

[T]he educated class’s religious fervor turned to social reform: they were sure that because man is a mere part of evolutionary nature, man could be improved, and that they, the most highly evolved of all, were the improvers…

Margaret Sanger and her Pro-Nazi racist abortion policies? A card-carrying member of the Progressive elite. The Roosevelt presidents and their massive power-grabbing, snotty, prissy middle class materialism? Yeah. In so many words, they both declared themselves the recipients of some divine right to decide for the rest of us what was decent and right, and more than once ordered thugs to murder people who didn’t want to play along.

It’s not the question of whether folks should promote good morals; I do that. It’s the methods. These are godless, Satanic children of Hell using the Devil’s own methods to accomplish their ends. “He will not cry out in the streets… A bent reed He will not tear off; a smoking wick He will not extinguish.” Matthew quotes this regarding Jesus, taking it from Isaiah 42:1-3. The ancient Hebrew symbolism was a man who didn’t come to change politics, particularly by exercising any sort of earthly authority. Ruling was for the goats, not the sheep of His pasture. And where did the goats end up, in Matthew 25? The desire to rule is a moral disqualification for rule. We convince humans to make better choices by teaching it, demonstrating it, by sacrificing life itself if necessary — but our own lives, not theirs.

Posted in sanity | Tagged , , , | 2 Comments

Motives, Objectives, Imperatives

I want you to be free.

There probably isn’t much I can do for you, simply because freedom cannot be a matter of me doing for you. Freedom is you taking hold of the choices we deny ourselves. Most of the time, we don’t realize they are ours to make, or that they are within our reach.

All good theory, but the best way to explain it is to demonstrate it.

My recent two week exploration of RHEL 6 was a demonstration. It’s one of the few things in this world I understand well enough to write at length. I wanted people to realize it was there, and how accessible it could be. I didn’t call it “for the clueless” just to amuse myself and insult others. If you take yourself too seriously, there is nothing I can do to help you. But if you know you don’t have a clue and want one, there it is.

By no means can I transmit 12 years of Linux experience in just a few short lessons. What I can do is ask you to take a closer look at it and maybe think it’s worth a shot, so you can learn your own set of experiences. Don’t think I didn’t learn plenty while doing the research for the series. I’m still working on my own knowledge.

Right now, this blog is running between 50-100+ hits per day. That’s not why I set out to write the series. Most of those readers are nothing at all like me, aside from an interest in the topic of discussion. I’ll bet precious few stay around to get to know as much of me as can be known from a blog. The hit count should begin tapering off quickly. Who knows? Maybe I drove off my few regulars for awhile.

Doesn’t matter. People can only do what moves them. I did it because it moved me, as an expression of my choice to be free. I wrote it because it was my imperative. Freedom is accepting your own imperatives. Whatever results feed back into my consciousness are consequences, not objectives. All I really want to know is if some folks used it to chase their own brand of freedom. It doesn’t even have to be about computers; just some little thing I wrote which made the light come on inside your head, and you found one more hindrance fall away.

Be free.

Posted in sanity | Tagged , | Comments Off on Motives, Objectives, Imperatives

RHEL 6 for the Clueless: More Servers

Because RHEL is essentialy an industrial grade commercial product, you’d have to expect it can run more types of server than most people would ever need.

We covered the Samba server in a previous lesson as the most common need for small or home operations. As long as you have to accommodate Windows clients, Samba is the simplest way to go, since even Linux clients can use it. However, if all you need to worry about is sharing files with other Linux/Unix clients, the NFS (network file system) is really better. It’s not covered in the Deployment Guide, and the only simplified guide I’ve seen is this one. There really isn’t that much to it. Windows can use NFS, and Microsoft offers the software to use it, but they assume you are migrating away from Unix, and will demand some information from you. At that, it only works on the Pro versions of their OS. You could also search for some third party software packages, but it I don’t know whom I would trust for that.

The majority of my computer ministry clients have no use for an FTP server. On top of that, the RHEL Deployment Guide hardly mentions it. However there are already some good, short tutorials on how to get it working. This one is fairly generic, but rather complete. And here’s one which covers the SELinux aspects of configuring your FTP server. RHEL uses the Vsftp (Very Secure FTP) server. The CentOS HOWTO Wiki on Vsftp actually hands it to you with scripts to set it all up. It centers on using a feature called “chroot” — a sort of controlled sandbox which makes it exceedingly difficult for those using your FTP server having any chance of cracking the machine itself. I recommend the TSL script for setup.

Much more popular is the Apache webserver. The Deployment Guide covers it, but in a good bit more detail than you might find useful. Again, some enterprising writers have already given us a head start. This one is short and sweet, covering the bare essentials. Then there is this one which addresses the details of SELinux protections, how to configure for a server which hosts multiple sites, and much more. If you need to enable the secure protocol (https) I really like this one from CentOS Wiki.

But if you are going to go that far, you should consider using the well known LAMP stack (Linux, Apache, MySQL and PHP). It’s almost trivial adding the MySQL server and PHP. What isn’t trivial is the knowledge necessary to use them. Here is a good generic setup tutorial, but be aware a few of the package names may have changed for RHEL 6. However, cnce you get Webmin installed, you are limited only by what you know about webmaster and system administrator tasks in general. It’s the easiest way to go for the clueless, with some documentation, and for more than just the LAMP server itself. However, I recommend you download the Webmin Manual (PDF). It can make a wide range of system administration tasks much simpler, and people are running entire ISPs this way.

Of course, the big thing with RHEL 6 is the kernel-base virtual machine (KVM), the computer within a computer. It requires some rather powerful hardware. Frankly, I can’t imagine needing it for my clients or myself. Still, the Techtopia series starting with section 33, gives you the shortest path, I think, using Windows 7 as the client OS. You can always plow through the Deployment Guide, of course, but it’s harder to follow. It’s written for well-trained technicians with some experience in that sort of heavy duty server work.

One of the most useful things RHEL can do in an organization is serve as the firewalled gateway. This can be easily combined with other tasks on the same machine. Naturally, it requires your RHEL box to have at least two hardware ports, since one becomes the internal trusted interface, and the other an untrusted interface. Then a standard multi-port LAN switch can feed into the RHEL box if you have a significant number of computers. This is well covered in the Deployment Guide, but you probably would find this page a lot simpler. To do anything special requires you understand firewalls and policies. There simply is no shortcut there, however, the defaults configurable from the RHEL GUI firewall manager are pretty good for most uses.

As with the mail server, most of this is pretty hard to test from a home LAN with a broadband connection. If your ISP permits running a server, but can’t offer a static IP address, you should consider connecting through an external DNS service such as OpenDNS, DynDNS, and number of other free services. They keep track of resolving your domain name to whatever IP address you have at the time. It’s pretty rare when you’ll need to run your own DNS service internally, except perhaps a simple name caching. However, even that is becoming almost pointless, as these external free services are quite reliable compared to even the larger broadband ISPs.

The possibilities of RHEL 6 will quickly outrun all but the most obscure server needs.

Posted in Uncategorized | Tagged , , , , | 1 Comment

Keeping RHEL Alive: Hplip Update

In trying to keep RHEL 6 up to date without support, I am sometimes both amazed and disappointed at the way Red Hat keeps some of the SRPMs out of reach.

The RHSA notice presents a minor security warning about the Hplip libraries. But if you attempt to build from the SRPM, you’ll find a dependency almost impossible to fulfill. In order to build Hplip, you need sane-backends-devel. But that one is not normally installed, and if you lose your access to RHN, you’ll have to build it from source. That, in turn has a dependency on gphoto2-devel.

There is no source for that. I scoured the freely accessible repositories in both RHEL (including the Beta sources) and Fedora, and there is nothing close. Remember, a partial requirement is keeping the versions consistent. The version for gphoto2 is 2.4.7-4. The closest you’ll get is the FC12 package, which is 2.4.7-1. Even if you cheat and edit the SPEC file in the SRPM to call itself “-4” it won’t built the devel package. I have no idea why it’s excluded, but it won’t produce. Thus, you end up with something totally orphaned here. Then you end up wondering how the Red Hat developers built it themselves in the first place, except they simply aren’t being honest in releasing all the applicable SRPMs.

The CentOS developers noted this often enough in their developers mailing list. There are times you simply can’t replicate Red Hat’s work because they hold stuff back. I lack their expertise in recreating the missing SRPMs from sources, chasing down the peculiar collection of patches, etc. At any rate, the work-around is simply installing the sane-backends-devel RPM from the Beta repositories, because it’s the same version. But I’m still left without any source for gphoto2. I can get the dependency for it (libgphoto2) but not the item itself.

Posted in computers | Tagged , , | Comments Off on Keeping RHEL Alive: Hplip Update

RHEL 6 for the Clueless: Mail Server

If you are running RHEL, you are already running a mail server. It’s installed by default and setup to run. Of course, it only delivers mail locally, and only from sources within your own machine. Right now, there are no sources, so there is no mail. But the server is running.

The original Unix way of things was to use the mail server as the primary internal message system. RHEL is old fashioned in this respect, though by default, nothing is turned on which sends any messages to the root account. If you want to learn more about what’s going on in your system, install the logwatch package with Yum and you’ll start getting daily email messages to your root account with standard notifications of newly installed packages, who logged in when, and other significant events most system administrators track. You can adjust what sorts of things logwatch tells you about, but the defaults are pretty good.

The problem is, you’d have to figure out how to read that mail. By default the simplest way to do that is to install something called Mutt — as you might expect, the package name is in lower case. Yum will take care of it easily. Then, you could login as root every day and fire up Mutt, and read the logwatch messages. Or, you could tell the mail server to give root’s mail to someone else, such as your own user account. All you have to do is login as root, and:

gedit /etc/aliases

At the very bottom of the file, simply add a line which says:

root: username

The file itself explains the format; use a TAB between the colon and your username. Then close Gedit and run the command newaliases. Then you only have to open a Terminal window every day and run Mutt yourself. Mutt is not user friendly, particularly for folks moving from Windows. I don’t like it either; I use something called Alpine. I’ll give you a hint that any email client you use, including the default Evolution on RHEL, can be set up to read mail directly from the internal mail server.

My habit is to use the commandline environment (AKA the console) for as much as possible — all my email accounts, a lot of Internet surfing, most of my editing, and so forth. If you get tired of Gedit, try nano from the commandline for editing. It’s included in RHEL by default. Most of the keystrokes you learned in Windows tend to work the same, plus the window displays several important commands at the bottom.

Unless you are setting up a commercial grade operation, you really don’t have much chance to play with mail server administration. There was a time when most ISPs and such would tolerate a Linux user running their own mail server from home. That is, you could have your machine fetch mail from your accounts and pass it internally to your mail server. Then you could send mail from your server through the official servers where your accounts resided. Those days are gone. Very few mail servers out there will accept server connections from you, typically because your IP address is listed as non-server territory. They will only talk to your email client, not your server.

If you do have a genuine server connection to the Net, and you need to run a mail server operation, it’s hard for me to rewrite the instructions provided by Red Hat in their Deployment Guide. If you know what a mail server is supposed to do, it’s not that hard to plug in the values for the configuration files.

What I do want to explain is how RHEL lays out this operation. There are three programs you’ll be running in most contexts: Postfix, Dovecot and Procmail. Dovecot is the POP and IMAP server, what allows your users and clients to get their mail from your machine. Incoming mail is caught by Postfix, which passes it to Procmail for sorting. Procmail decides who gets what. You can also have Procmail filter for spam, by plugging in SpamAssassin. You’ll need to tell your mail system the various domains for which mail is accepted and handled, and where it goes. Postfix also handles your outgoing mail. As the system administrator, you would set up all the accounts for your users. Again, the RHEL Deployment Guide is not that hard to follow.

While the current crop of CentOS HOWTOs are somewhat dated, most of the details are still accurate. If you are serious about running a mail server, it’s a good place to start. You may want to consider using their Postfix and Dovecot with SASL for running the now standard secure login features for an organizational mail server.

There are some good tutorials from other sources, though some of them a little dated. One of the simplest, and missing instructions for Procmail, is at the CentOS website. Each of the three programs have their own website with more information than you can absorb: Postfix, Dovecot has a wiki, and Procmail has links at the bottom of their page to various tutorials.

Posted in Uncategorized | Tagged , , , , | 2 Comments

RHEL 6 for the Clueless: Samba Server (Updated)

If you intend using your RHEL machine as a server among Windows machines, one of the first things you should consider is using Samba. This is the Open Source implementation of Windows’ SMB. Samba allows your RHEL box to provide a compatibility layer so a Windows computer on the same network, such as your home LAN, can read portions of the Linux file system natively. It is also the only way I know you can have Linux operate as a print server for Windows sharing. That is, if you have a printer connected to your RHEL box and working, Samba allows you to provide a Windows computer access, provided that Windows box has its own driver for it.

There seems to be no documentation from Red Hat, and Samba itself offers a huge documentation library because there are too many options for any sane person to examine. There are some items you’ll need to prepare before starting: username (so the Windows user can login from their machine), password, and the network IP address on your LAN for the other computer(s), and a shared directory with world write permissions. If a printer is involved, make sure it’s setup to share.

RHEL provides a GUI tool for printer setup. If your printer is connected via USB, it should be recognized immediately if RHEL knows what it is. This is the place to check. There isn’t space here to chase down all the various problems you might encounter, so if it doesn’t pretty much work, and you can’t get it recognized and configured through the Administration menu, you’ll need to engage your favorite search engine using your printer model with the keyword “linux”, or terms “RHEL” and “Fedora” and make the most of it. In the menu system for the printer configuration tool is a place to checkmark some boxes to share the printer.

I’ve found a couple of tutorials on Samba, but neither one had all the right information. After fighting with it a bit, this is what I did to get it working.

Install Samba by logging into a Terminal as root:

yum install samba

Create shared directory; I used /home/shared:

mkdir /home/shared
chmod a+w /home/shared
chcon -t samba_share_t /home/shared

That last line insures the SELinux security system knows to allow outside systems to poke around in that folder. Now anyone using this computer can move files in and out of the folder, as well as the Samba users.

Add a Samba user. This is a different task than simply adding a user account. There is a GUI tool for adding Linux user accounts to the machine for them to use the computer itself. However, Samba users must be handled differently, so that the system forces them to use the Samba server.

useradd -c "Real Name" -d /home/samba-username -s /sbin/nologin samba-username

That’s all one line. As usual, substitute the actual Real Name and samba-username in the command above. Then create the Samba password. Remember what we said about coming up with good passwords:

smbpasswd -a samba-username

It will prompt for the password, which you type in blindly:

New SMB password:
Retype new SMB password:
Added user username.

Edit smbusers:

gedit /etc/samba/smbusers

This will open the default text editor. Scan down the file until you see something like this:

root = administrator admin
nobody = guest pcguest smbguest

Immediately below this, add a line with this format:

username = samba-username

so RHEL recognizes the person logging in from the Winbox by their samba-username. Close this file by saving it, then open a file in the same place: /etc/samba/lmhosts. The first line should show: 127.0.0.1 localhost. Add another line below that: 192.168.1.102 hostname.

That is, the IP address on your network of the Windows box, and it’s hostname in lower case. If you don’t know how to find the IP address on Windows, use these instructions. To get the hostname, try this page from the same site. Save that file.

Then open: /etc/samba/smb.conf. Find the section headed [global]. Change the workgroup name to whatever your Windows computer will be seeking. Default is workgroup in lower case letters. You’ll need to remove the semicolon in front of the next line and provide a proper hostname for the netbios name, which would be the name you gave your RHEL computer during installation, again in lower case. Remove the semicolon from the next line and the IP address numbers from the sample; all we need are the two interfaces lo eth0. Below that is a line with hostsallow as a model. Below that, start a new line with the same indentation:

hosts allow = 127. 192.168.1.

The “127.” is the IP address for everything on your own machine. The other (192.168.1.) is the private LAN network I use for my home router; by leaving off the last section after the dot, it automatically includes every computer with that prefix, which is reserved for LANs.

Go all the way to the bottom of the file and add some lines. I named my shared directory “shared”. Thus, the section heading should be named the same:

[shared]
path = /home/shared
writeable = yes
browseable = yes
read only = No
guest ok = Yes
public = Yes
valid users = username1 username2
create mask = 0666
directory mask = 0777

Now change the firewall to allow Samba to get through. You can use the tool in System > Administration > Firewall. Simply scan down the list to Samba and checkmark the box. Optionally checkmark IPP printer sharing. Then hit “Apply”. Now we start the service manually; it’s actually two services:

/sbin/service smb start
/sbin/service nmb start

Test whether your Windows box can find the server. In Win7 and Vista, that’s via your file manager window. On the left hand side look for the Network icon. Double click to open and the computer should search for other machines. Your RHEL box should eventually show up by it’s hostname. Double click and see if you can login from there. If successful, your shared folder and any printer you’ve permitted will also show.

For XP and Win2K, it’s a similar idea using the file manager. The simplest way is to right-click on “My Computer” and select “Explore” so that the left pane shows the various drives, and should display a network connection to the RHEL server.

If it works and you don’t have to cry for help, you’ll want to make it a normal service always running. System > Administration > Services — find “nmb” and “smb” and click the “Enable” button. From now on, upon boot the system will start the two services automatically.

Posted in Uncategorized | Tagged , , , , | 28 Comments

RHEL 6 for the Clueless: Sun Java

The bundled Open Java on RHEL is okay. It’s also painfully slow, particularly compared to the competition. Most people still call it Sun Java, though it’s now owned by Oracle. Because we have installed the development packages, we have the Open JDK (Java Development Kit) so we’ll have to replace it with Oracle’s JDK for Linux. This is so much faster, there simply is no comparison, at least on desktop applications. That would be things like Jedit (a java-based text editor), the Bible Desktop or “JSword” (java version of Crosswire’s Sword Project) and any number of java games.

Get the RPM for the Java Development Kit (JDK) from Oracle. On that page, scan downward from the big fancy icons and in the first box, you’ll see a button for “Download JDK” — click that. Use the drop-down list button to select “Linux.” Checkmark the box agreeing to the license, accept their cookies and click the red “Continue” button. From there is should be another page with two options. We are going to use the first one, which ends in “rpm.bin.” It’s a rather large package, so it may take awhile. Don’t try to install from your browser; it won’t work.

(Update: Please note there are significant problems with the latest version 1.7 from Oracle. It creates conflicts with almost every Java application currently in use, breaking Libre Office, for example. Stick with the latest update for 1.6 until the conflicts are fixed.)

Here we go with the commandline again — open Terminal and login as root. This is not a typical situation with RPM files. Once you are logged in as root, you’ll probably be in your user account Home, and the file is in Downloads, so go there:

cd Downloads

There is no reason you can’t install it from here, but you may eventually want to start moving stuff out of Downloads to reduce the clutter. You can create another folder inside your Home directory and name it whatever you like.

We’ll probably need to change the permissions on this file, but it almost never downloads as an executable binary, which it is. If you run ls -l and don’t see X’s in the file permissions, you’ll need to change them:

chmod u+x jdk-6u23-linux-i586-rpm.bin

Next, we install it:

sh jdk-6u23-linux-i586-rpm.bin

That sh command is simply an older and very standard terminal shell (environment), and the bin file has a wrapper around it written in a script which expects you to use that shell. You may or may not see a bunch of text about licensing, but if it comes up, simply hit the SPACE bar a few times until it runs out and type “yes” at the question prompt. It should install automatically from there. It will create a bunch of RPMs and other files, but the wrapper is supposed to run RPM for you.

Now let’s tell RHEL to start using this faster java. The command is rather obscure, and you’ll probably never see it again after we take care of this and the next item. It tells RHEL you want to switch among the alternative java environments on the system.

/usr/sbin/alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000

Finally, we want Mozilla and any other browser in the system to use this new java. We use that “alternative” command one more time:

/usr/sbin/alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/default/jre/lib/i386/libnpjp2.so 20000

That’s all one line. Restart Mozilla and it should now be using your new java. Maybe someday the Open Java project will catch up and provide something closer to Oracle’s product. This particular process continues to be overly complicated to make it work right, and it shouldn’t be necessary.

As a final item before we close out the desktop portion of this series, I need to mention I found one critical package missing which did not get installed by default. Chances are you haven’t missed it yet, but you will later. The default system spelling checker is something called “hunspell” and the default dictionary for English didn’t get installed on my system. So while your Terminal window is still open, you need to do this:

yum install hunspell-en

If English is not your preferred language, you can always ask Yum what else is available:

yum search hunspell

Among the items listed should be something there you can recognize and use.

Posted in Uncategorized | Tagged , , | 6 Comments

RHEL 6 for the Clueless: Generic Software Build

For our last desktop oriented article, I promised we would build one item using the generic Open Source scripted building process. For this project, I chose something only slightly complicated, and likely to be favored by most users: PySolFC, the Python Solitaire Fan Club Edition. It’s not just a collection of card games, but more card games than you’ve ever seen, along with a wide array of Mahjongg based games. It also comes with background music. (It also comes in a Windows package.)

Written in the Python scripting language, PySol has been around for a long time, then almost died. It was revived by a few fans, but they haven’t gotten around to putting the background music into the Linux/Unix version by default. The Windows and Mac versions do have the music, but for Linux you’ll have to work a bit.

On RHEL 6 (and clones) you’ll need to add a few packages, so open your Terminal and login as root, then:

yum install tkinter pysol-devel SDL

First, we need to build the sound player. The package is called smpeg, and it’s an SRPM from Fedora 11. Realize this part is still messing with RPM and we’ve covered that in previous lessons. You’ll need to install it manually and build it with RPMbuild. Once you’ve done that, install everything except the debug package.

Now we get PySolFC. Click on the link for PySolFC on that page. On the next page select the latest version 2.0; on the page after that, click PySolFC-2.0.tar.bz2. I’ve just shown you the basic layout of most Sourceforge projects, where a lot of generic build source packages are found. That next link will open a page with some advertising, then an auto-download process.This time root will build the package in another location. First, let’s navigate in the file system to the generic source building place:

cd /usr/local/src

Then move the package there:

mv /home/username/Downloads/PySolFC-2.0.tar.bz2 ./

That’s the move command (mv) pulling the package from where it downloaded to the current working directory (./). Now let’s open it:

tar -xvfj PySol [hit TAB]

This is a one step process for handling the standard Unix tar bundles, with switches to make it exract (x) with some visual feedback (v) on the file we name (f) and using the bzip2 compression (j) because that’s the package format (ending in bz2). You should now have in front of you a folder labeled PySolFC-2.0. Move inside that:

cd PysolFC-2.0

Go ahead and run ls to see what’s there. One of the first things you want to look for in building from source is README and INSTALL. In this case, we have at least the README, which is simply plain text. We use less to read that, and the SPACE bar to scroll down, along with the arrow keys, PGUP, PGDN all working as you might expect. The instructions are pretty sparse, and assume a level of experience our series assumes you don’t have.

Aside from the PySol-Sound-Server, which we get later, you already have all the basic requirements for this, so skip down to the installation section. This one is really quite simple, since it’s Python. I want you to notice farther down, where the last section lists places where you can get extra features. It includes the location for default music files. We’ll be getting those before we are finished.

Close the reader using the “q” command. Now, let’s build it:

python pysol.py

This is very well done, because it installs everything where it should be, and even creates a link in your GNOME menu system. That was the easy part. Let’s back out of this folder:

cd ../

We still need the sound server, which is still kept at the old PySol website. It’s another bz2 file, and you’ll need to move it and open it the same way as we did above. Now move down into the folder created. This time I will warn you the README is out of date. That is, it’s still valid for building, but the links are likely to have changed since it was written in 2004. Open Source projects come and go, and their websites, too. This is why I took the time to chase down the smpeg file above.

Let’s build this. Below are a stack of commands you need to execute one at a time, and wait for the prompt to return before you execute the next. It’s a common notation in Open Source instructions. If you read the README, you’ll notice I’ve trimmed off the standard prompt symbol ($) for the standard user account, or (#) for the root prompt. By the way, at the point of “make test” you can stop the music test by hitting CTRL-c. This kills most running processes which grab the commandline prompt.

cd src
./configure
make
make strip [optional]
make test
make install

We are almost done. Let’s get the music files. We don’t need root to do this, since the music goes in your user account files. Log out the root account (exit) and you’ll find yourself as the user in your Home directory. Move down into the Downloads folder — cd Downloads — and let’s open that package. Since it’s in the gzip format, we change the tar command just a bit:

tar -xvfz pysol-music-4.40.tar.gz

You’ll need to create your own user account music cache. PySol will be looking in your Home directory for a hidden folder — .PySolFC — and a music folder inside that. We get both with this single command:

mkdir ~/.PySolFC/music

Now we move the music files where they belong. These files are several layers deep in the subdirectory you just created from the gzip package.

cd pysol-music-4.40/data/music

Run the ls command and you’ll see a license file with each music file, and, while they are all various types of “mod” files, they have different format tags, either .mod or .it. Don’t get too confused about that; if you want to know about this offbeat music format, you can find thousands of of them all over the web, an art form in itself. Just search for “mod music.” We will move them one at a time so you get used to how it works:

mv Astral_Dreams.it ~/PySolFC/music/
mv Past_and_Future.it ~/PySolFC/music/
mv Subsequential.mod ~/PySolFC/music/

You can close your Terminal window. Check the Applications menu, and under Games you should now find PySol Fan Club Edition. If we got everything right, you should hear background music every time you play the games. The fellow who wrote this music, Carl Larsson (aka Nightbeat), is regarded among mod music fans as a master of the ambiance style. While you can chase down his work and others, you’ll find not all of them will play properly using the PySol music server. You’ll have to experiment and see what works and what you like.

Posted in Uncategorized | Tagged , , | 2 Comments

RHEL 6 and Trial Subscription: Keeping It Alive

This is just a side note on my series RHEL 6 for the Clueless.

I obtained my copy of RHEL 6 using the free trial offer from Red Hat. For a month, you could continue getting Yum updates for free. At the end of that period, Yum complains you have no access to the Red Hat Network (RHN) repository. I know, because mine ran out before I could allocate the money for the fee. I live on a tight budget and I hope to afford it soon.

It is possible to keep it alive without support. As part of Red Hat’s commitment to the Open Source principle, they continue to allow open access to their SRPMs. That’s the easiest way for them to fulfill their obligations to the GPL copyright system. Thus, I can download and build updates using the RPMbuild dependency chase outlined in my previous post. The only thing left is keeping track of the relevant update notices. You can subscribe for email notices, but I simply check the archives daily by clicking on the thread link for the latest month and year.

For example, a few days ago there was a notice of a kernel update. I downloaded the SRPM and started to build it. However, I noticed in the SPEC file the build would not create the necessary kernel-firmware package unless you edited the file to turn on that build feature. I’m not an RPM hacker, and I just barely understand the file format for SPEC. But I understand it just enough to make it work for me.

If you open that file in an editor, you can scan down until you see list of features with three columns of code about how the features are handled (the lines are not so tightly wrapped as you see here on my WordPress blog when you view the file itself):

# What parts do we want to build? We must build at least one kernel.
# These are the kernels that are built IF the architecture allows it.
# All should default to 1 (enabled) and be flipped to 0 (disabled)
# by later arch-specific checks.

What I did was change the line about firmware to read like this:

# kernel-firmware
%define with_firmware %{?_with_firmware: 0} %{?!_with_firmware: 1}

Frankly I didn’t really know if that would fix it, but when I ran the rpmbuild command, it did produce the firmware file, which I knew from experience would be missing by default if I didn’t do something. I’m sure I’ll stumble across other surprises as I try to keep up with my home-built updates, and I’ll share them if it seems pertinent. I’d much rather pay for the RHN membership, but I can’t promise it will happen. This does not happen with CentOS or Scientific Linux.

Posted in computers | Tagged , | 2 Comments

RHEL 6 for the Clueless: More RPM

With a little less hand-holding this time, I am going to outline for you building a bigger SRPM project which had lots of dependencies. When you run that rpmbuild command on a spec file, one of the first things to happen is checking to see if all the other stuff it needs is already in place. Quite often, you’ll get a message about unsatisfied dependencies, followed by a nice indented list of what’s missing.

Sometimes you can Yum the missing stuff. Often not. So you chase down the SRPM for that thing, try to build it, and it too spits out its own list of unsatisfied dependencies. It can quickly go four layers deep, and more. It happened when I decided to build Pidgin from the SRPM. That’s an older and still popular instant messaging client for the GNOME desktop. Most of the time, if you have any IM client installed at all, it’s going to be called Empathy. I prefer Pidgin.

Let’s recall some important pointers. You’ll need to check in this order for sources:

  1. yum
  2. RHEL SRPMs
  3. FC13 Update SRPMs
  4. FC13 Everything SRPMs

So you install the Pidgin SRPM and attempt to run rpmbuild on the SPEC file. You see a list something like this:

avahi-glib-devel
farsight2-devel
gtkspell-devel
meanwhile-devel
NetworkManager-glib-devel

Until you know better, you can try to Yum each one and see what happens (yum install package). When I checked, none were available. In some cases I had the base package, but not the development (“-devel”) version. That meant if I built the SRPM, I had to decide whether it was an upgrade and install both the base and devel, or if it was the same and install only the devel, or something else it might produce, such as libs or utils or something with a name which didn’t match the SRPM at all. By trial and error I got it done.

I’m going to outline the order and depth in which I proceeded. The number of asterisks increase as they go deeper. After each item is the repo where I found it. An indentation below something indicates what I found required before I could proceed, until I got the item(s) farthest indented, and worked my way back up. Then I moved to the next item on the same level. Remember, most of the time the SRPM will be named for the base file, but will include any number of libs, devel, and assorted other files.

pidgin (RHEL)

* gtkspell-devel (RHEL)

* NetworkManager-glib-devel (RHEL)
** wireless-tools-devel (RHEL Server)
** libnl-devel (yum)
** ppp-devel (RHEL)
*** libpcap-devel (RHEL)
**** bluez-libs-devel (RHEL)
***** gstreamer-plugins-base-devel (yum)
***** libsndfile-devel (FC13)
****** flac-devel (build broken, pulled from Beta Optional)
****** jack-audio-connection-kit-devel (yum)
***** libudev-devel (yum)
** libuuid-devel (yum)
** libgudev1-devel (yum)
** gnome-bluetooth-libs-devel (RHEL from gnome-bluetooth)
*** unique-devel (yum)

* avahi-glib-devel (RHEL)
** libdaemon-devel (RHEL)
*** libcap-devel (yum)

* meanwhile-devel (RHEL)

* farsight2-devel (with base & python, RHEL)
** gstreamer-python-devel (RHEL)
** libnice-devel (RHEL)
*** gupnp-igd-devel (RHEL)
**** gupnp-devel (RHEL)
***** gssdp-devel (RHEL)

You’ll notice one item in particular — flac-devel — which would not build properly for me. I took a chance and checked the RHEL 6 Beta repository and found the package was the right version and didn’t have to build from source. I simply installed that one as is. It may be the one and only time I can pull that stunt. You can find that repository here. Notice it is for the 32-bit version, so if you are running the 64-bit, you’ll need to work your way back up the URL a few levels until you find the x86_64 stuff.

The sources I used will probably look different if you are working from CentOS or Scientific Linux. The obvious would be to replace RHEL with the source for your distro.

I once did something similar on the RHEL 6-Beta in order to gather all the stuff needed for full multimedia players and such. On the Beta-2 it didn’t work so well. On the full release, it didn’t work at all. The issue is all the exotic codecs I could only find at RPMFusion, and some of their SRPMs didn’t match versions for dependencies. I’m not sure how they got out of sync, but it makes me uncomfortable using their repository any more.

For those of you running nVidia or Radeon video chipsets new enough that you don’t have built-in full 3D acceleration on the display, you can use the above method for building something available, but not provided, in the RHEL RPM system. It’s not necessary to go through the detailed and risky procedure for installing the special drivers provided by the chip manufacturers for Linux. When you use those drivers, some things don’t quite work right because those drivers aren’t properly integrated into the display server. Instead, you can install a package which is derived from the “mesa” SRPM.

Obtain the SRPM from the RHEL repositories, and go through the chase for dependencies for RPMbuild. One of the packages produced will be “mesa-dri-drivers-experimental,” which will boost the acceleration for most Radeon and nVidia displays without nearly as much hassle. Just install that one package from the build. You don’t have to kill Kernel Mode Setting (KMS) nor worry about minor display glitches showing up in some software. In the two beta releases for RHEL 6, this package was rickety and offered only a slight acceleration. In the full release, I got my Radeon HD 4350 to run plenty fast for everything I do on my system.

Posted in Uncategorized | Tagged , , , , , | 1 Comment