Wednesday, August 29, 2007

Getting to Grips with Yum for Centos 4.4

Getting to Grips with Yum for Centos 4.4

My initial installation of Centos 4.4 went smoothly, but I wanted it to play mp3s and videos, which it wouldn't.

I had discovered that if you can master the arcana of yum, Yellow Dog Updates Modified, then, by using various resources which are available online, you can update your system and get both mp3 playback and the ability to play DVD movies.

But although there is any amount of data on yum, including a slab of it at the main CentOS site, I couldn't for the life of me figure out how to get started.

Everything I looked at seemed to presume that you already knew a bunch of fundamental stuff which they didn't need to explain to you.

I was reminded of how, years ago, I saw some stuff online by a guy who thought he was giving basic step-by-step instructions for installing Red Hat Linux on a ThinkPad. His first instruction was "First go into your bios," and at that point he lost me completely. I couldn't even get started.

Looking at the yum stuff I had a repeat of that same experience.

In the end I decided I would buy Red Hat Enterprise Linux, but, when I checked, I found that RHEL does not come with mp3 software, nor does it come equipped to play videos.

So I thought, okay, I'll go to Amazon.com and buy a manual for CentOS 4.4. So I went. But didn't buy one because I couldn't: it didn't exist. All Amazon.com had was some installation disks for CentOS 4.3, and even these were marked as being currently unavailable.

So I took one last shot at searching for yum info on Google, and this search finally paid off:


"centos 4.4 installation guide."

This led me to the following Internet location:

http://www.howtoforge.com/perfect_setup_centos_4.4

This led me to a site which had six html pages, profusely illustrated with screenshots, showing a starting-from-scratch procedure for setting up CenOS 4.4 as a server. This was much more technical than I wanted to do, but I took a look at the last page, and, yes, there was code related to yum on that page.

This, I decided, was the site I needed.

I saved all six pages to disk and decided to read the whole thing through from scratch, until I came to the point where I had gotten stuck, which was this yum business.

Without yum, my CentOS installation was still workable. I basically need it for word processing, and my need were met by Gedit, which is all I need for the very basic text editing I do, writing poems and novels.

I like to play music while I work, so I found software that I could use on my Windows XP machine to convert mp3 files to the ogg format which CentOS will play, and, after some initial struggles with the music player, I got that to work for me.

But I still wanted the convenience of being able to play mp3s. And video files. And DVDs.

So, with that in mind, I bookmarked the site, and, when I was ready, returned to it and began to read the pages systematically.

This is now on my to-do list, and, once I've done it, I'll post online to say how it went.

Meantime, let me recommend this site for all your Linux computing needs:

www.howtoforge.com/

This seems to be the mother lode of all possible computer advice which is Linux-related.

The site contains, amongst other things, "perfect setup" guides for a number of Linux distributions, and I wish I'd found it years ago.

Meantime, on a completely different note, I just found out that Homeland Security has, much to my surprise, free software available for download. There are pages and pages of HL software up for grabs at this site:

www.supershareware.com/software/office-of-homeland-security.html

I downloaded a Homeland Security screensaver which runs on Windows.

The precise page on which you find the DOWNLOAD button for the screensaver is this:

www.supershareware.com/info/the-earth-is-our-homeland.html

It's a pretty cool scrensaver. You see the earth, land masses picked out in shiny silver. The planet rolls toward you, getting larger as it comes, displaying an ever-changing view of the land masses. Then, having swelled up to the screen, it retreats again.

So I now have software from Homeland Security on my computer. And, of course, immediately I feel safer.

When I have the time I'll check back and see if there's anything else worth grabbing, but right now, like pretty much everyone in the world, I have about a billion different things to do, and very little time in which to do them.

Monday, June 18, 2007

Gnome Desktop Configuration For Visually Impaired Person

Gnome Desktop Configuration For Visually Impaired Person

When I installed CentOS 4.4 on my ThinkPad, I opted to install both the available desktops, KDE (which stands for the K Desktop Environment) and Gnome.

Having taken a good look at both, I have decided to go with the Gnome desktop. My reasons for this all relate to the fact that my eyesight is trashed, so the visual usability of the desktop is, for me, key.

With respect to KDE, it is not possible to enlarge the mouse cursor, but the Gnome desktop allows you to make the cursor larger. Additionally, with the Gnome desktop I was able to find a good high contrast theme, shown in the screenshot.

With KDE, I could not find a theme which offered the same high contrast. Additionally, with KDE the terminal was hard to see, whereas with Gnome the terminal was, without being tweaked, very easy to see.

The screenshot shows the Gnome desktop on a ThinkPad where the LCD screen has been set to display at 800 x 600. The screen is capable of a much higher resolution, but opting for a lower resolution is, in effect, a simple way of magnifying the whole screen.

By default, the Gnome desktop which comes with CentOS 4.4 has two panels, one at the top of the screen and one at the bottom. I have deleted the one at the bottom and have enlarged the one at the top.

The on-screen fonts have also been enlarged, and I have opted for "best contrast" rather than the default, which is "best shapes."

I have deleted the volume control icon which comes with the top panel, since the volume control buttons on my ThinkPad keyboard work just fine, so I have no need to mouse around the screen to raise or lower the volume.

The white box shown on the screen is the terminal, which is functionally equivalent to a DOS prompt. That is to say, it allows you to copy, rename or modify files and the like. It also allows you to work on the innards of the operating system, and tweak it to your satisfaction.

The text in the terminal is probably impossible to see, but what is being displayed is "man man."

Linux comes with its own manual, and, once you open the terminal, you can invoke the manual by using the command "man" followed by the name of the item on which you want information. If you don't know how to use the manual, you can get started by typing in the command "man man" then hitting ENTER. This opens up the manual's file explaining how to use the manual itself.

In addition to the resources provided by the manual, each program comes with its own very clear, helpful, easy-to-use help files. When I started using Windows XP, I very soon abandoned the use of the so-called "help" which came with it, because trying to use to get help was an exercise in time-wasting frustration. But I anticipate using the Gnome help much more.

Looking at the panel from left to right, we see APPLICATIONS, which opens up a menu of available programs. We also see ACTIONS, one being to log out.

You can customize the panel as you wish, adding or deleting items at will. You can also move them from left to right.

Looking from left to right, the icons that are displayed are:

1. an icon which clears all windows from the desktop, exactly the same as the handy "Show Desktop" icon which comes with Windows.

2. A file browser, which fills the screen with a view of the folders in your home directory, which in my case is the directory accessed by the icon shown on the desktop labeled "hwgc's home."

3. This icon is for the browser, which is Firefox. Not my favorite browser, since it is a little clumsy when it comes to resizing the screen display, so I plan to get and install the latest version of Mozilla, which these days goes under the name of SeaMonkey. Mozilla / SeaMonkey allows you to change from, say, 100% to 200% at a single click, rather than trying to increase or decrease the font by increments, which is the method used in Firefox.

4. This is for OpenOffice Writer, a word processor which includes a spell checker, which for me is a vital tool, as I am a writer, and my primary use for a computer is to use it as a writing machine. The programs that come with the installation include the gedit text editor, which has a nice tabbed interface, allowing you to have a number of files open at the same time, and to switch between them easily.

5. This is a drawer, into which you can add other things. I haven't figured out how to do this yet, but, years ago, when I was running Red Hat Linux 6, I used to put things in drawers, so presumably I can figure out how this is done. The idea is that the drawer pops open and you can have extra icons inside the drawer. The drawer itself you can close with a click. I remember that in my initial enthusiasm for Red Hat Linux 6 I went a bit drawer-crazy, and had drawers sprouting all over the place.

6. An icon for taking screenshots, which are saved in png format, ie portable network graphics format. The screenshot I took was 139,264 bytes, and so small enough to fit on a floppy disk, a floppy disk being, for the moment, the only way I have to transfer data between my Windows box and my Linux machine, unless I want to use the Internet to swap data from one computer to another, which is possible but a little cumbersome.

7. An icon for opening the terminal.

8. An icon for easily opening the log out dialog.

Moving on, there is a button relating to updates, which I haven't investigated. Then there is the clock, which, in the screenshot, is set to 24-hour time. If you click on the clock then you pop open a calendar.

What is missing from the panel - I seem to have deleted it, without noticing it - is a little four-pane panel which allows you to click between the four virtual desktops which come with the default Gnome installation.

If you want, you can have a different set of windows open on each of the four virtual desktops, and click between them at will. However, my plan is to keep things really, really simple, and just go with a single desktop.

My main reason for this is that, in addition to working with damaged eyesight, I am working with a damaged brain, my mental function having taken a fairly hefty hit as a consequence of the impact of brain cancer and the associated brain surgery, chemotherapy and radiation therapy. My ability to handle complexity is severely degraded, so I think I'll stick to just the one desktop, thank you very much.

The setup I've gone for is austere to the point of being spartan, but that's what I want. I want a clean, clear, utilitarian interface, not an overload of eye candy. Candy I can get any time from the chocolate section in the supermarket.

The selection of wallpapers that come with Gnome is limited, and from that selection I've chosen Earth as seen from space. You can, of course, add additional images to your wallpaper collection if you so wish.

By default, the Gnome installation locks the screen and demands a password if there is no keyboard activity for ten minutes. This is a little short for me, so I have reset the time to 30 minutes.

To simplify things for my damaged brain, I opted to choose the same password for both my user password and my root password (that is to say, my administrator or superuser password.) In security terms, this is bad practice, but, in this case, I choose to bend to what is suggested by my mental limitations.

If you want a screensaver, you have quite a big choice, including the choice of a random screensaver. Most of them are pretty busy, so, after hunting around, I finally settled on the one which goes by the name of Engine, which is pretty slow, like the Pipes screensaver which I have on my Windows box.

On installation, pretty much everything worked straight out of the box, except suspension/hibernation. If you close the lid of the ThinkPad, it will not suspend. Instead, it will hum away with the LCD screen blazing.

I think it is probably possible to fix this, but doing so is not a priority for me. The setup that I have already works well enough for my purposes, though ideally I would like to be able to tweak it so it plays mp3s (by default it only plays music files in the ogg format) and so it can play DVDs.

I believe that both those things are possible, but I will leave that for the future. My next move has to be to figure out this thing called yum, some kind of system for updating your installation and helping with the installation of new software.

I have already downloaded the relevant Wikipedia page for yum, but haven't yet had the time to get around to reading it. A research project awaits me, and I suspect that it may not be a short one.

Installing Centos 4.4 Linux on ThinkPad T43 Model 2668-4FJ


Installing Centos 4.4 Linux on ThinkPad T43 Model 2668-4FJ

This year I got the four CDs for the Centos installation, burnt the iso images to disk with Nero, and then installed. I downloaded the CDs from a repository in Japan, where I live, to which I was directed by a downloads redirect page provided by centos.org.

If you want to try this OS, you should get the CDs by taking the same route, using an FTP program such as FileZilla rather than trying to download the iso images with your browser.

To install from CD, you have to tweak the BIOS (Basic Input Output Services), and usually, when you boot a computer, there is a message on screen which tells you how to interrupt the normal boot process by pressing a certain magic key.

In my own case, when I bought my computer second-hand from a computer shop here in Japan, it was already set up to boot from the CD drive, so I left it that way.

I will first tell the story of my final installation, which was short, sweet, simple, and entirely satisfactory, then I will give details of my initial struggle with frustration and failure, a struggle which lasted months.

The machine on which I installed was a second-hand IBM ThinkPad, a T43 with a Japanese keyboard. When purchased, it came with a Japanese version of XP installed.

The machine was capable of reading DVDs and of both reading and writing CDs. It had a 60-gigabyte hard drive, 1,024 megabytes of RAM and 64 megabytes of video RAM. The chip was a Pentium M 750 running at 1.86 GHz. It had a connection for a LAN cable and two USB ports for USB 1.1 and 2.0.

The screen was a 14.1 inch LCD screen, an SXGA+ with a potential resolution of 1400 x 1050 pixels. There was a slot for inserting a PC card (type I or II) but there was no floppy disk drive.

Installation and initial configuration was very quick and took substantially less than two hours. For the installation that I ended up doing, I only needed the first three of the four installation disks.

During installation, for the most part I accepted the defaults and simply clicked NEXT to continue. The decisions that I made during installation were limited to the following:

1. At the stage where you are asked if you want to run a check on the media, I opted for SKIP.

2. I identified the keyboard as a Japanese keyboard.

3. At the point where you choose additional languages, I added support for the Japanese language.

4. When choosing an installation option, I chose CUSTOM. When it came time to choose packages, I chose, in addition to those which were not already preselected, the following:

KDE
EDITORS
ENGINEERING AND SCIENTIFIC
AUTHORING AND PUBLISHING
GAMES AND ENTERTAINMENT
ADMINISTATION TOOLS

This amounted to 3,137 megabytes of data.

4. I chose to remove all partitions rather than accept the default, which was just to remove all Linux partitions.

5. When it came time to choose the screen resolution, I went for 800 x 600 pixels. I'm visually impaired, am blind in the right eye and don't see well out of the left, so I need some way to magnify the screen.

If you have an LCD screen you can run the screen at whatever resolution you choose without doing it any damage, and by choosing a lower resolution you can, in effect, magnify the whole screen.

My Linux machine had been installing at 800 x 600, and, during the installation, I found that just fine, so that was what I went with.

My Windows machine is set up similarly, and is set up with the screen displaying at 800 x 600, rather than the theoretically possible 1024 x 768.

(To set the screen resolution under XP, all you have to do is right-click on the desktop, then go to DISPLAY MODES.)

6. In addition to opting for a display of 800 x 600 pixels I chose to go for 256 colors rather than millions of colors. Even 256 would be wasted on me, as my color perception has been trashed, and I no longer see colors very well.

When I logged in with my user account the desktop defaulted to the Gnome desktop with the Blue Curve theme. I customized the system as follows:

I resized the panel at the top from 24 to 54 pixels and removed all OpenOffice icons apart from Writer; I added a file browser to the panel; I adjusted the cursor to LARGE; I changed the theme to high contrast black on white; I changed the global setting for fonts from BEST SHAPES to BEST CONTRAST; I increased the application font from 10 to 12 and increased all other fonts to 14; I set the clock to 24 hour time; I chose ENGINE as my screen saver and reset the time so it would not lock up and demand a password until I had been away from the screen for 30 minutes (rather than the default time of 10 minutes); I choose Earth seen from space as my wallpaper.

I fired up the gedit text editor and changed the font from Monospace to Courier at 36 point.

And that was my installation and initial configuration done.

I found out the following about the system:

It refuses to mount (ie to access) any CD or DVD made by using IBM-supplied software which writes to CD R or DVD R. However, it will mount data written to a CD RW or DVD RW using Nero.

It will not mount any blank media, though perhaps there is a work around for this.

I have a USB floppy disk drive made by IBM and this works find with CentOS 4.4. You can hot plug it and the floppy disk drive shows up when you double-click COMPUTER, and you can use the floppy disk drive to copy data from your Linux box to your Windows box and vice versa.

The system will play ogg files, and you can convert mp3 files to ogg with a piece of software that you can use for free, this being something called Free Mp3 WMA Converter. This installs two separate programs on your computer, but you only need the converter, which has a very clean, simple interface and has demonstrated rock solid reliability while running under XP.

The installation package also offers to install an e-mail program, but doing so is not compulsory.

If you want to play ogg files on your Windows box, then one option is to get MediaMonkey, the standard version of which is free for private use.

My main requirement for a computer is that I should be able to use it for writing, and the combination of gedit and OpenOffice Writer provides me with this capacity. Gedit has a nice tabbed interface allowing you to easily switch between a number of open files, and OpenOffice Writer has a nice spelling checker.

What is described here is just a basic setup, and I have more work to do. I want to modify the machine to suspend when the lid is closed.

I recently realized that my Linux box may allow me to do something that I tried to do with my Windows system and failed. I wanted to take a bunch of files called, for example, ZITEM-FISH.HTML, ZITEM-CAT.HTML and make copies with titles such as POEM-FISH.HTML and POEM-CAT.HTML.

So I made a directory called DOS in my C: drive, went to PROGRAMS -> ACCESSORIES and chose COMMAND PROMPT and got what looked like a DOS prompt.

I then tried my old and loved DOS commands and went

ren zitem* poem*

This produced a set of files which started "poemm" rather than "poem."

Then, when I tried this:

ren zitem* poem-about*

the command line reported complete failure.

With XP, you have something which looks like a DOS prompt and, in part, behaves like a DOS prompt, but it doesn't work properly, and had weird aberrant quirks.

But my hypothesis is that on my Linux box I should be able to open a terminal and make whatever conversions I want without a fuss.

In due course, I'll report back on how my Linux adventure worked out for me.

The above is the short version. The long version lasted for month, and I became depressed and discouraged, and my computer confidence took a big hit.

To start with, when I got my second-hand computer back home and fired it up, XP reported not 60 gigabytes but only 30, and only half the promised RAM. So I presumed I'd been ripped off.

Later, after a couple of Linux installations, removing all partitions and all data, the hard drive mysteriously expanded to 60 gigabytes.

With a cargo cultists optimism, I presumed that the missing RAM might similarly magic itself into existence, but it never did. Then, when I decided it was time to throw away the packaging in which the computer had come, I found what I took to be the box for a 512 megabyte RAM chip. Fortunately, I opened the box and, to my great surprised, discovered the RAM chip still inside.

My Japanese is good enough to read labels on second-hand computers, and this label was not tagged with anything meaning "some assembly required."

By that time, I'd either thrown away or lost the Japanese-language manual, but I had installed RAM chips on a couple of previous occasions, so I thought I might be able to get by without a manual. I turned the computer upside down, undid a single small screw with the sharp point of one of the kitchen knives, and found the compartment for the RAM chip. I added the chip, which a Linux installation later successfully probed and discovered.

The hard part was finding an OS which had a drive for my sound card. The following installed okay but failed to supply a driver for the sound card:

Red Hat Linux 9 (Shrike), Fedora Core 5 and FreeBSD 6.1, which of course is a variant of Unix rather than a flavor of Linux.

I may also have taken a shot, some months back, at installing Red Hat Linux 7.2, a distribution which I downloaded and burnt to disk a few years ago. But at this stage I can't actually remember whether I did or did not try to get those disks work for me. I've quite simply lost track.

I now have a great collection of installation disks, and some rather unhappy memories of initial failure.