Saturday, September 24, 2005

Where Old RPMs Go to Die

Here's a post from Fedorazine expanding on the XWindows problem that plagued those of us with integrated Intel Video this week. It tells you how to find the RPM files for the old, working version of Xorg-X11 and reinstall them. It also notes that the problem has been fixed.

What's not told is how a novice user will:

  • Figure out that the problem was in X,
  • Figure out how to get into a machine that won't boot and change the /etc/inittab file so that it will boot to console mode (Answer: Knoppix), and
  • Figure out that there are text browsers such as lynx which will let you access the information you need.

That seems to be a pretty tall order, I'm afraid.

Note that call L&T in the middle of the night is not an option.

Actually, the useful thing about this article for me is that it tells you where the update utility yum saves the RPM files it installs. They go in

/var/cache/yum/updates-released/packages

Saturday, August 27, 2005

Finding the Right Lights to Turn Off

A few weeks ago, we did a bit on how to Turn Out Lights under FC4, i.e., shut off programs that start on a default system on boot-up, but you don't need. But which programs can you safely turn off? Fedora Weekly News has tells us in Which Services Can I Disable? This goes through many of the programs you see with the command

system-config-services

It doesn't cover all of the commands I found, and it has some that don't appear on my computer, but it's useful none-the-less.

Hey Windows Users! You undoubtedly have some programs running that you don't need, as well. Check those running in your Startup menu for starters. You can also disable lots of other useless programs. (I'd say Windows is a useless program, but then, you know, I'm not entirely rational on the subject.) Run Google and search for "remove useless Windows programs" or similar strings. You'll find a bunch of stuff.

Monday, August 08, 2005

Turning Off the Lights

Sometimes, after you set up your computer, you find that the default installation is running things that you don't really need. For instance, this computer is currently running some kind of Bluetooth server. I don't own a bluetooth device, so that's useless.

I got a reminder about how to fix these kind of things from this Boot Fedora Faster Howto article. OK, there are things in there that I'm not going to do, since I don't plan to recompile the kernel any time soon. (Thanks, Dave. Don't mention it, Hal) However, you can "turn off the lights" in rooms that you aren't occupying at the time. In Gnome, according to the article, you click on Desktop->System Tools->Server Settings->Services. If you work from an Xterm, the corresponding command is

system-config-services

You'll be asked for your root password, and then you'll get a menu of system services. A check-mark indicates that the given service will start on boot, so uncheck those you don't need. To stop a service right now, right-click on it and select "Stop" from the menu.

Doing this increases system security, since you aren't running things you don't need, and should speed up your computer, since you don't need to start up useless programs on boot.

Wednesday, July 06, 2005

Ripping Direct to MP3

Of course, the main purpose of previous entry was to convert ogg formatted sound files to mp3 so that I could burn them to a CD and play them in my car. Why did I need the conversion? Because I was using sound-juicer to rip files from CDs, the juice defaults to ogg for compressed files, and anyway in FC4 there is no support for MP3s in there.

I thought that maybe, just maybe, I could use the same trick on sound-juicer as we did on SoX, but that turns out to be rather difficult. So the best thing to do is follow the advice in that link and use Grip to burn CDs. As long as the lame package is present, Grip will rip CDs to MP3 format if you ask. There is a small bit of configuring required, but it works very well.

Now I just have to re-rip all those CDs.

Putting MP3s into SoX

I mentioned previously that one of the things I wanted to do with Fedora Core 4 was to find an MP3-enabled version of SoX, "the Swiss Army Knife" of sound processing programs. In FC3 I found a SoX+MP3 RPM file online. I still haven't found one for FC4. Fortunately, however, I found a hint for creating such an RPM online (search for "sox").

The procedure is rather simple, if you're willing to rebuild RPM files:

  1. Set up your account so that you can build RPM files.
  2. Find a copy of sox-*.src.rpm, where the "*" is the version number. The current version is 12.17.7-3, so you'll look for sox-12.17.7-3.src.rpm. This is available in any mirror of Fedora Core 4, I found it in
    ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/4/SRPMS/
  3. Copy sox-12.17.7-3.src.rpm to ~/rpmbuild/SRPMS.
  4. Make sure the packages lame, lame-devel, libmad, and libmad-devel are installed. If not, you'll need to install them. Assuming you followed Fedora Core Tips & Tricks to enable the freshrpms repository, you can do:
    sudo yum install libmad libmad-devel lame lame-devel
    where sudo allows selected users to run root commands. If you these packages are already installed, yum will let you know about it.
  5. Now create the RPM. From a terminal window:
    $ cd ~/rpmbuild/SRPMS
    $ sudo rpmbuild --rebuild sox*

    and wait awhile.
  6. When the program is finished,
    $ cd ~/rpmbuild/RPMS/i386
    $ ls sox*

    There should be three files with RPM extensions: sox*, sox-devel*, and sox-debuginfo*, where "*" hides all the version numbers and stuff. Since these RPMs were compiled with the lame and mad libraries, they contain an MP3 enabled version of SoX.
  7. Now for the tricky part: we have to get the non-MP3 version of SoX off the system and replace it with the MP3-enabled version. This is difficult because a) the version of SoX on your system is probably the same as the one you just complied, so the rpm database won't recognize your version as an upgrade; and b) some programs depend on SoX to run, so the dependency checker in rpm will generate an error. To get rid of the old SoX, then, we must force the uninstall:
    $ rpm -e --nodeps sox sox-devel
    assuming that you had sox-devel on your system.
  8. Now we can install the brand-new version of SoX:
    $ sudo rpm -i sox-12.17.7-3.i386.rpm sox-devel-12.17.7-3.i386.rpm
  9. Now test the program. Run
    $ sox -h
    At the bottom of the output is a list of supported file formats. If you see "mp3", then SoX works.
  10. Use SoX as before.

Note that if freshrpms ever updates SoX, you'll lose the MP3 capability and will have to repeat all of this stuff again. :-(

Wednesday, May 11, 2005

Making a Linux Computer Talk

I'm back from the trip. I've got a lot of topics I want to post, but first, today I read an article from this month's issue of Linux Gazette (.net), titled, Shelling your Linux box with Festival, which tells you about a Linux speech synthesis program, Festival.

The article has some neat tricks, such as having your computer read the headlines from the BBC News Feed.

However, what I want to talk about isn't in the article. What I want to do is to create a greeting which can be heard online, such as this one.

It's not too hard. In the Festival distribution is a program called text2wav, which seems to create .wav files. Anyway, this works:

$ echo "Please reed Linux and Things" | text2wav > plsrd.wav

where we have to say "reed" rather than "read", since Festival wants to put the latter in the past tense.

OK, that's a .wav file, which is 66498 bytes. I can compress it into an MP3 file using the MP3-enabled version of sox:

$ sox plsrd.wav plsrd.mp3

which comes in at 6588 bytes. Of course, I should use a politically correct format such as Ogg, but this way more of you can hear the voice.

Festival has other tricks, including a British accent, but I haven't figured out how to use them yet.

Wednesday, February 09, 2005

Couldn't Resist

Yes, of course, the new version of ical compiles and runs on Fedora Core 3.

More ical

When we last left Sanjay Ghemawat's ical calendar program, I was trying to get it to run on a SUSE Linux machine, without much success. The problem seems to be the various versions of Tcl and Tk that are to be found in different implementations of Linux.

Fortunately, a new version, ical-2.3.1, is out. This site has bandwidth problems, though. Fortunately, I found John Heidmann's site, which has source RPMs for Fedora Core 2 and 3. After extracting the source, and looking closely at the spec file, I was able to get ical up and running on the SUSE machine, meaning that now I can get notified before every seminar.

Dare I try compling the Fedora Core 3 RPM on this machine? Not tonight, but maybe over the weekend.

Monday, February 07, 2005

Digging into RPM files

RedHat based Linux systems, and others, use the RPM Package Manager (yes, it's recursive) to package files for the computer. RPMs can come in binary or source (SRPM) versions. We've covered how to compile an SRPM into an RPM. But what if we just want to get at the files in an RPM or SRPM file? Today I was trying to compile ical on a SUSE Linux machine. In order to do that, I had to pull the files out of an ical*.src.rpm file. But how?

Comes the Web to the rescue, in the form of a Bill Kearney article. I'll summarize it here:

Get the RPM or SRPM file to your computer. Then run the command:

rpm2cpio package.rpm | cpio -iv --make-directories

where package.rpm is the name of your file. The contents of the RPM file will be placed in the current directory.

I never did get ical to compile on SUSE. More on that later.

Saturday, February 05, 2005

Does Anybody Really Know What Day It Is?

Over on Slashdot they're having a discussion of Sunbird, Mozilla's new stand alone calendar program. I downloaded it, tried it, and found:

It can't be programmed to accept the fact that the fourth Thursday of the eleventh month is a holiday.

It also can't figure out when Easter is, either, but I've given up on finding a calendar which will do that. emacs has calendars for every religion and culture known to man, but hey, put that in a modern calendar program? What do you want, anyway?

My favorite calendar program for X was called ical. No, not the ical you're thinking of, this is a different one. It was originally on Sanjay Ghemawat's page, but as you'll see, that page ain't there anymore. Fortunately, Tom Bennet has updated the old RedHat RPMs for ical, and released them to the public. I took the Fedora Core 2 SRPM and got it to install. Of course, first I had to install the tcl-devel and tk-devel packages, but that was easy, as they're in the original Fedora Core 3 installaton and so accessible via yum. Once I did that, the program worked just as I remembered it from old versions of RedHat.

If you need a relatively lightweight calendar program, don't mind that it's format isn't very compatible with anything else, and like the fact that it can figure out that the third Monday in February is President's Day (US), then try this version of ical.

Now could someone come up with a 100-year file of the dates of Easter and the related moveable feasts? You could start here. Or maybe pilfer the code from emacs.

Friday, January 07, 2005

Ogg Like MP3

For various reasons, I needed to be able to convert sound files from Ogg Vorbis (.ogg) to MP3. The default method to do this is via SoX (Sound eXchange), "the swiss army knife of sound processing programs." Say, for example, I had a copy of the Beatle's "Yesterday" in Ogg format. Then I should be able to do this:

$ sox yesterday.ogg yesterday.mp3

Funny thing, though, is that because of some fears about copyright, Fedora Core doesn't ship with any MP3 libraries. So, in this case, we'd get the message:

$ sox: Unknown output file format for 'yesterday.mp3': File type 'mp3' is not known

It didn't take long for Google (TM) to find a solution, in the form of this thread on freshrpms-list, which tells you how to get an MP3 enabled SoX file. Basically

  1. Download sox-12.17.5-3.fr.i386.rpm and sox-devel-12.17.5-3.fr.i386.rpm from
    http://ftp.us.freshrpms.net/pub/freshrpms/fedora/linux/testing/3/sox-12.17.5-3.fr/
  2. Remove the old SoX files. This takes a bit of doing, because there may be some dependencies:
    $ sudo rpm -e sox sox-devel --nodeps
  3. Install the new files (maybe --update would have worked?):
    $ sudo rpm -i sox*.rpm

So far it works.

Saturday, November 20, 2004

Hotplugs

It used to take some work to set up a hotplug, that is, to mount an external device such as a memory key or digital camera. No more. Just plug the device in, and do

$ ls -l /media/
total 24
drwxr-xr-x  2 root root 4096 Nov 20 09:58 cdrecorder
drwxr-xr-x  2 root root 4096 Nov 20 09:58 floppy
drwxr-xr-x  2 root root 4096 Nov 20 19:00 usbdisk

usbdisk is what's in the USB port, so do

$ mount /media/usbdisk/

Move files around as usual, and then

$ umount /media/usbdisk

before unpluging.

Saturday, October 16, 2004

Fedora Legacy

OK, it's been a while since the last post. Many reasons. Bills to pay, baseball playoffs, football games, and, mostly, computer burnout. When you sit at a terminal for 8 hours a day at work, sometimes it takes a bit of motivation to get back online at home.

Anyway, back to the original purpose for this blog: keeping Fedora Core as an up-to-date OS on this computer.

As you may recall, I installed Fedora Core 1. Several months ago, Fedora Core 2 was released, and now Fedora Core 3 is at the Test 3 level. As a result of all this, there is no further support for Fedora Core 1.

What to do? Upgrade? Well, that's a distinct possibility, but I've waited this long through the Fedora Core 2 cycle I might as well wait for Fedora Core 3 to be officially released. But I still want to keep this computer updated, especially for security reasons.

The solution is the Fedora Legacy Project, which keeps older versions of Red Hat Linux and Fedora alive for some time. Used with yum it's simple. Go to the Download page and find the instructions for updating the /etc/yum.conf file.

OK, I did that, and yum now looks to Fedora Legacy for updates. Except that there have been no updates for a week or more. Maybe FC1 is perfect? Doubtful, I just hope that I've got everything set up to detect new updates when they do come along.

Saturday, May 29, 2004

Graphing with gnuplot

When I first started writing papers, drawing a graph was not too hard. First you sketched out your picture on a sheet of paper. If you were plotting data, you'd used graph paper. For really accurate plots you'd use graph paper with ten lines per millimeter. A photocopy of that would be sent to the journal along with your (typed) manuscript. After the article was accepted, you'd take the figures to the draftsman, who would draw it up with pen and ink, who would send this work of art (and it was) to the camera shop, where they'd take a picture of it and give you a few 8x10" glossies, one of which was mailed to the journal. At the journal they would take pictures of this glossy and send it to their production people, who would get it into the journal somehow.

Eventually computer graphing programs came along. They'd even produce PostScript (TM) files, which could be emailed directly to the publisher. The question was, which program should I use?

I tried a few. We even bought some. But sometime in the early 1990's I found references on Usenet and Gopher to a program called gnuplot. Logically, you'd think this was related to the Free Software Foundation's GNU project, but it's not, the name is a coincidence. In any case, gnuplot was easy to use, had a command line interface that enabled you to use it in script files, and, eventually, came up with an enhanced PostScript interface which let you do a reasonably good job of drawing subscripts, superscripts, and Greek characters.

Oh yeah, sometime after 1995 it also came with a curve fitting routine. Give gnuplot your data an a parameterized function, and it would do its best to find the proper parameters to fit the curve.

I still use gnuplot, but the current version included with Fedora Core 1 is 3.7, released many years ago. Many people have moved to other software programs that I don't understand so well. A popular one where I work is Grace.

So now there's a new gnuplot, version 4.0, released in April. It looks to have more colors, better contour support, etc., yada... I wouldn't know, I just got it installed. I didn't find and RPMs for it I trusted, so I downloaded the source code, and ran my usual
$ ./configure --prefix=/home/local
$ make install

which installed the program in /home/local/bin, where I like to keep programs that don't need to be run as root. And the program worked. Except if I have a selection of gnuplot scripts called, say,
plot1.gnu plot2.gnu plot3.gnu ...
and try to load them using
gnuplot> "plo[TAB]
nothing happened. In other words, filename completion was dead. This works with most older versions of gnuplot.

Turns out that to do this you need the GNU (which is not gnuplot) version of the readline libraries. OK, I have that on this machine, so we try
$ ./configure --prefix=/home/local --with-readline==gnu
$ make install

And this works. Except that there is a bug in GNU readline. If you understand what that message said, don't tell me. Just note that the effect of the bug is that, if you call gnuplot from the command-line prompt from an xterm, have it put up a plot (say
gnuplot> plot x
and then resize the xterm, the gnuplot figure vanishes. Why? I have no clue. Anyway, you can get it back by using the
gnuplot> replot
option.

Is gnuplot 4.0 better than 3.7? I don't know yet. But at least I've got it working.

Monday, March 29, 2004

The Amaya Browser

Amaya is the W3C's Web editor, which supports HTML+CSS and XML applications such as XHTML, MathML and SVG. It's also a good (and free) testbed for your web pages: if they appear correctly in Amaya, they are probably valid HTML or XHTML. (Of course, you can always run your web pages through the HTML validator and the CSS validator to be sure.

There are some binary packages for Amaya, but the best way to get the thing built is from the source. Here's how: In the following I use an account called local which I've created on this machine. It's home directory is /home/local, and it has only ordinary user priviledges. Otherwise, it's set up much like /usr/local. That is, there are subdirectories /home/local/src, /home/local/bin, /home/local/man, etc. I use this account to install things that don't need to be installed as root, but should be accessible to any user with access to this machine. Of course, that means that /home/local/bin has to be in your path. OK, here we go. Assume you're logged in as local, and have downloaded the amay source code, amaya-src-8.3.tgz, into the directory /home/local/src:

  1. $ cd /home/local/src
  2. $ tar xvzf amaya-src.8.3.tgz This extracts the files for the gzipped tarball. Two sub directories are created, Amaya and redland. The later isn't needed for the default installation of Amaya, and I haven't tried figuring out what it does.
  3. $ cd Amaya The following departs somewhat from the instructions contained in Amaya.readme, but things still work:
  4. $ mkdir obj Creates a directory where all the work will be done.
  5. $ cd obj Go to your fine new directory and start the configuration process:
  6. $ ../configure --prefix=/home/local Sets up the makefile which will control execution, and tells it build the files under the /home/local tree. This will eventually create a directory /home/local/Amaya where everything is stored. There will be a soft link to /home/local/bin/amaya to launch the browser.
  7. make Wait awhile. If everything compiles normally you can do
  8. $ ./bin/amaya This should run the browser. If it does, exit and do
  9. $ make install Which puts Amaya in its proper place.
  10. Exit the local account and open a shell under your user account. Assuming /home/local/bin was in your path,
  11. $ amaya will open up Amaya. From there you can surf or edit HTML files.

That's it. If the ../configure script did its job correctly, Amaya will run with all the capabilities allowed by your computer.

Saturday, February 14, 2004

Interesting

OK, when I installed firefox (previous message) I created a new profile, ~/.phoenix/mike. However, firefox now defaults to ~/.phoenix/default. Which means that I can use the old extensions and bookmarks, and that's OK, I guess, but how do you permanently change what the system considers ``default''?

Friday, February 13, 2004

Maybe they could settle on a name?

The browser formerly known as MozillaFirebird (formerly known as Pheonix) is out with version 0.8. This time it's known as Mozilla Firefox.

Installation, at the moment, consists of undoing the tarball in the location you want the browser, in my case /usr/local/firefox, with a link $ ln -s /usr/local/firefox/firefox /usr/local/bin/firefox You can use your old profile, or create a new one. In view of what happened with firebird, I decided to create a new profile. This means, of course, that I have to log in again to all those websites that require registration. I did move my old bookmark file over, but I'll let the cookies and password management files build themselves up as needed.

I took my old Flash and java plugins, which work well. I have yet to install plugger. I may try mozplugger first. Maybe even mplayerplug-in.

The adblock extension got installed with no problem, but the mozex extension wasn't available. Hopefully that will be added soon.

Sunday, February 08, 2004

Memory Key

I added a Fuji USB drive (aka memory stick/key), on sale this week from Best Buy (256MB for $60, after rebate & before taxes). It doesn't show up using the hwbrowser, unlike it did for johnmunsch.com (search for memory key). Nevertheless, I was able to mount it using the fstab entry that I used for the digital camera. Which means that I read the memory by hitting

mount /mnt/camera

and dismount with

umount /mnt/camera

I could change the mount point, but this isn't all that hard to remember. Conflicts will arise if I try to have both plugged in at the same time.

In other news, KU defeated the Texas Tex Salad Bar Ragers, 96-77.

Saturday, February 07, 2004

Truetype fonts

Those that Microsoft used to provide, can be installed by following the directions at http://www.mjmwired.net/resources/mjm-fedora-fc1.html#ttf. Remember to restart the font server.

There's another Blog out there

fedora core linux installation adventure is a blog similar to this one, except it's got nice indexing, formatting, and intellegence. Also, it's not so hung up with the current UNC basketball administration.