2006-01-26

MP3 & FC4

I got audio to work on the Dell Latitude D610 simply by running alsamixer and turning everything up to 11. I copied my MP3 library to the new box. I ran the default Music Player (Applications/Sound & Video/Music Player) and excitedly attempted to import my mp3 library folder. The result:

I want my MP3!

Bummer! What to do about it? How about installing the venerable XMMS. To start, I added the freshrpms repository to my yum configuration. I added a new yum repository file:

$ sudo emacs -nw /etc/yum.repos.d/freshrpms.repo

and defined it with this content:

[freshrpms]
name=FreshRPMs for Fedora Core $releasever - $basearch
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
enabled=1
gpgcheck=1
gpgkey=http://freshrpms.net/RPM-GPG-KEY-freshrpms

I got the list of available MP3 players:

$ sudo yum list available | grep mp3
bmp-mp3.i386 0.9.7-1.2.fc4 freshrpms
xmms-mp3.i386 1:1.2.10-13.2.fc4 freshrpms

and installed XMMS with MP3 support:

$ sudo yum install xmms-mp3
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for xmms-mp3 to pack into transaction set.
xmms-mp3-1.2.10-13.2.fc4. 100% |=========================| 2.9 kB 00:00
---> Package xmms-mp3.i386 1:1.2.10-13.2.fc4 set to be updated
--> Running transaction check
--> Processing Dependency: xmms = 1:1.2.10 for package: xmms-mp3
--> Processing Dependency: libxmms.so.1 for package: xmms-mp3
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for xmms to pack into transaction set.
xmms-1.2.10-19.fc4.i386.r 100% |=========================| 17 kB 00:00
---> Package xmms.i386 1:1.2.10-19.fc4 set to be updated
--> Running transaction check
--> Processing Dependency: libmikmod.so.2 for package: xmms
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mikmod to pack into transaction set.
mikmod-3.1.6-35.FC4.i386. 100% |=========================| 7.3 kB 00:00
---> Package mikmod.i386 0:3.1.6-35.FC4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
xmms-mp3 i386 1:1.2.10-13.2.fc4 freshrpms 78 k
Installing for dependencies:
mikmod i386 3.1.6-35.FC4 updates-released 188 k
xmms i386 1:1.2.10-19.fc4 extras 1.9 M

Transaction Summary
=============================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 2.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): xmms-mp3-1.2.10-13 100% |=========================| 78 kB 00:00
(2/3): xmms-1.2.10-19.fc4 100% |=========================| 1.9 MB 00:23
(3/3): mikmod-3.1.6-35.FC 100% |=========================| 188 kB 00:09
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e42d547b
Public key for xmms-mp3-1.2.10-13.2.fc4.i386.rpm is not installed
Retrieving GPG key from http://freshrpms.net/RPM-GPG-KEY-freshrpms
Importing GPG key 0xE42D547B "Matthias Saou (Thias) "
Is this ok [y/N]: y
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: mikmod ######################### [1/3]
Installing: xmms ######################### [2/3]
Installing: xmms-mp3 ######################### [3/3]

Installed: xmms-mp3.i386 1:1.2.10-13.2.fc4
Dependency Installed: mikmod.i386 0:3.1.6-35.FC4 xmms.i386 1:1.2.10-19.fc4
Complete!

I ran XMMS by selecting Applications/Sound & Video/Audio Player and loaded my MP3 directory. Looks like it works:

XMMS is your friend.

2006-01-25

Install HenPlus on FC4

HenPlus is a nice command line tool that I use instead of Oracle's SQLPlus. HenPlus is distributed as an RPM, but it requires libreadline-java, which isn't included in the FC4 distribution:

$ sudo rpm -i henplus-0.9.5-1.noarch.rpm error: Failed dependencies:
libreadline-java >= 0.7.3 is needed by henplus-0.9.5-1.noarch

The RPM of libreadline-java that is referenced on the HenPlus web page is a little stale. It requires obsolete versions libhistory.so and libreadline.so:

$ sudo rpm -i libreadline-java-0.8.0-1.i386.rpm
error: Failed dependencies:
libhistory.so.4 is needed by libreadline-java-0.8.0-1.i386
libreadline.so.4 is needed by libreadline-java-0.8.0-1.i386

I already have the current versions of these libraries installed:

$ rpm -ql readline | grep lib
/usr/lib/libhistory.so.5
/usr/lib/libhistory.so.5.0
/usr/lib/libreadline.so.5
/usr/lib/libreadline.so.5.0

and I don't want to pollute my install with obsolete libraries. My options to get HenPlus installed from the RPM are:

  • Create fake symbolic links to fool the RPM dependency system into thinking libhistory.so.4 and libreadline.so.4 exist. This is obviously a bad hack, and I'd rather not do it.

  • Download and install a fresher libreadline-java RPM. Maybe fresh RPMs package the newer .so files. I'd rather let yum do that kind of work for me, though—that's its job.

  • Configure yum to use JPackage. There is a fresh libreadline-java RPM on JPackage, and instructions for how to configure yum to get packages from JPackage. I think this is the way to go.

To configure yum to use the JPackage repository, I download the jpackage.repo file and copy it to /etc/yum.repos.d/:

$ sudo cp jpackage.repo /etc/yum.repos.d/

I edit jpackage.repo to enable only the Fedora Core repository:

$ sudo emacs -nw /etc/yum.repos.d/jpackage.repo

In jpackage.repo, I disable [jpackage-generic] and enable [jpackage-fc]. The top of the file originally looked like this:

[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

[jpackage-fc]
name=JPackage (free) for Fedora Core $releasever
mirrorlist=http://www.jpackage.org/jpackage_fedora-$releasever.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=0

and now it looks like this:

[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=0

[jpackage-fc]
name=JPackage (free) for Fedora Core $releasever
mirrorlist=http://www.jpackage.org/jpackage_fedora-$releasever.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

I save the file, exit Emacs, and install libreadline-java:

$ sudo yum install libreadline-java
Password:
Setting up Install Process
Setting up repositories
http://ftp.nara.wide.ad.jp/pub/Linux/fedora/core/updates/4/i386/repodata/repomd.xml: [Errno 4] IOError: HTTP Error 404: Date: Wed, 25 Jan 2006 18:43:46 GMT
Server: Apache
Content-Length: 254
Content-Type: text/html; charset=iso-8859-1
Trying other mirror.
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
jpackage-fc 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libreadline-java to pack into transaction set.
libreadline-java-0.8.0-10 100% |=========================| 3.9 kB 00:00
---> Package libreadline-java.i386 0:0.8.0-10jpp set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libreadline-java i386 0.8.0-10jpp jpackage-fc 21 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 21 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libreadline-java-0 100% |=========================| 21 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID c431416d
Public key for libreadline-java-0.8.0-10jpp.i386.rpm is not installed
Retrieving GPG key from http://www.jpackage.org/jpackage.asc
Importing GPG key 0xC431416D "JPackage Project (JPP Official Keys) "
Is this ok [y/N]: y
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libreadline-java ######################### [1/1]

Installed: libreadline-java.i386 0:0.8.0-10jpp
Complete!

Now that libreadline-java is installed, I can install HenPlus from the RPM:

$ sudo rpm -i henplus-0.9.5-1.noarch.rpm

This time, it succeeds.

I have installed HenPlus, so I try to run it:

$ henplus
Exception in thread "main" java.lang.NoClassDefFoundError: org/gnu/readline/ReadlineCompleter

I bet there's a problem with the class path. I notice that the henplus executable is a shell script:

$ which henplus
/usr/bin/henplus
$ file /usr/bin/henplus
/usr/bin/henplus: Bourne shell script text executable

That's good—I can edit the file and fix the class path. The class path should include the libreadline-java jar file. To find the location of that jar file, I type:

$ rpm -ql libreadline-java | grep jar
/usr/lib/java/libreadline-java-0.8.0.jar
/usr/lib/java/libreadline-java.jar

I edit the henplus shell script:

$ sudo emacs /usr/bin/henplus

and replace

CLASSPATH=$CLASSPATH:$THISDIR/../share/java/libreadline-java.jar

with

CLASSPATH=$CLASSPATH:/usr/lib/java/libreadline-java.jar

I save the file, exit Emacs, and try again:

$ henplus
using GNU readline (Brian Fox, Chet Ramey), Java wrapper by Bernhard Bablok
creating henplus config dir
henplus config at /home/kasper/.henplus
---------------------------------------------------------------------------
HenPlus II 0.9.5 Copyright(C) 1997, 2003 Henner Zeller
HenPlus is provided AS IS and comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it under the
conditions of the GNU Public License
---------------------------------------------------------------------------
Hen*Plus>

Success! Now I can use HenPlus and get on with my life.

2006-01-12

Keeping the locate database fresh on FC4

In the default Fedora Core 4 installation, the locate database does not get updated automatically. If you haven't manually updated the database, you will see error messages like this:

foo:/home/kasper$ locate foobar
warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old
warning: Please make sure the daily cron job is enabled in /etc/updatedb.conf
foo:/home/kasper$

To manually update the locate database, type this at a shell prompt:

$ sudo locate -u

To enable nightly locate database updates, edit file /etc/updatedb.conf. In that file, change

# Set DAILY_UPDATE to yes to enable running updatedb
DAILY_UPDATE=no

to

# Set DAILY_UPDATE to yes to enable running updatedb
DAILY_UPDATE=yes

The locate database will stay up to date, and you'll always be happy.

2006-01-09

Installing Eclipse on FC4

I often use Eclipse when I develop Java-based software applications. Installing Eclipse on FC4 is easy! I don't normally do development on Eclipse itself, so I install everything except the *-devel packages:

$ sudo yum install `yum info eclipse\* | grep Name | cut -d: -f2 | grep -v devel`

Surprisingly, this installs 70 packages!

To run Eclipse, I select Applications/Programming/Eclipse. This Eclipse has an unusual splash screen, announcing itself as

Fedora Eclipse
Based on Eclipse 3.1.1

I haven't done much with it yet, but it looks right so far.

2006-01-06

Configuring FC4 on the Dell Latitude D610

I recently installed Fedora Core 4 on a Dell Latitude D610. Here are some additional things I am doing to configure it:


Host name
The default host name is localhost. This PC needs a proper host name. To set the host name, I select Applications/System Tools/Network Device Control. Click the Configure..., and the Network Configuration window appears. Click the DNS tab. In the Hostname: box, type the host name you want. Select File/Save, and you're done.

I notice that X has problems when you change the hostname while it is running, so I log out and log back in, and then all is well.


sudo
I like to log in as a regular user, and use sudo to run commands that require root privileges. To do this, I have to log in as root one last time and edit file /etc/sudoers:

$ su - root
# emacs -nw /etc/sudoers

I find these lines:

# User privilege specification
root ALL=(ALL) ALL

and I change them to:

# User privilege specification
root ALL=(ALL) ALL
kasper ALL=(ALL) ALL

I save the file, log out as root, and use sudo forever after.


VNC client
I use VNC Viewer to work on remote computers. Installing VNC is a piece of cake:

$ sudo yum install vnc

To run the VNC client, I select Applications/Accessories/VNC Viewer.


Incoming ssh
Sometimes I use ssh or scp to access the new laptop. To make this work, I have to allow incoming ssh connections. I select Desktop/System Settings/Security Level, and the Security Level Configuration window appears. In the Trusted services area, I check SSH. I click OK, and I'm done.


Evolution + Exchange
My work email and calendar server runs on Exchange. Evolution has an Exchange connector, but it's not installed with FC4 out of the box. To install the connector:

$ sudo yum install evolution-connector

To configure the connector, I run Evolution. I select Edit/Preferences. In the Mail group, I click Add. In the Receiving Email window, I enter these settings:

Server Type: Microsoft Exchange
Username: my.username
OWA URL: http://my.exchange.url.com/exchange/

A window appears, displaying this text:

Error

Ximian Connector requires access to certain functionality on the Exchange Server that appears to be disabled or blocked. (This is usually unintentional.) Your Exchange Administrator will need to enable this functionality in order for you to be able to use Ximian Connector.

For information to provide to your Exchange administrator, please follow the link below:
http://support.novell.com/cgi-bin/search/searchtid.cgi?/ximian/ximian328.html

OK

I passed this on to my Exchange administrator. He made the adjustment, and on my second try, it works.


WiFi I have the PC connected to a wired Ethernet. It would be nice to go wireless so I can use it more easily on the road.

lspci tells me about the adapter:

...
03:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)
...

The driver for this adapter is called ipw2200. It apears to be precompiled for and distributed with the current FC4 kernel ( 2.6.14-1.1653_FC4). I load the kernel module and look at the configuration:

$ sudo modprobe ipw2200
$ iwconfig eth1
eth1 unassociated ESSID:off/any
Mode:Managed Channel=0 Access Point: 00:00:00:00:00:00
Bit Rate=0 kb/s Tx-Power=off
RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

I set the SSID and WEP key:

$ sudo iwconfig eth1 essid MySSID key my-wep-key

Unfortunately, that's as far as I get. I can't get the card to connect to the access point. I'll have to work on this some more later.


Typing break
10 or 15 years ago, I had a tool that would pop up a window on my screen telling me to take a typing break. It doesn't work so well in the era of multiple desktop work spaces, so I haven't used it in a long time. Now I have a suitable replacement.

I select Desktop/Preferences/Keyboard In the Keyboard Preferences window, I click the Typing Break tab. I check Lock screen to enforce typing break, and I use these settings:

Work interval lasts: 60 minutes
Break interval lasts: 3 minutes

I check Allow postponing of breaks.

Now, whenever I type for 60 consecutive minutes, I am reminded to take a short break. Great!


Nightly log email
I leave the PC running over night in case I want to log in from home. Every night, it sends the log file summary to root. I want the log file summary, so I set the root email alias to my email address:

$ sudo emacs -nw /etc/aliases

In the aliases file, I change

# Person who should get root's mail
#root: marc

to

# Person who should get root's mail
root: my-address-AT-example-DOT-com

I save the file and type

$ sudo newaliases

The next morning, the log file summary is in my email box.


Printer config
I need to print documents. To define a print queue, I select Desktop/System Settings/Printing. I click New, and the Add a new print queue window appears. I click Forward. In the Queue type window, I specify that the queue type is Networked Windows (SMB) and I click Specify.... In the Authentication, I specify my Windows workgroup login, the Windows name of the printer server, and the Windows printer share name. I click OK, and then I click Forward. In the Printer model window, I select HP in the manufacturer drop down. In the list of printer models, I select LaserJet 8100. I click Forward and Finish, and my print queue is ready to use.


Remote Desktop
When I log in from home, it's nice to have the same desktop available that I use in the office. I used to use VNC Server for this. VNC Server is less than ideal because it creates a new desktop that runs in its own window, rather than sharing the one true desktop. Vino to the rescue! Vino is the VNC Server sharing your native desktop. You can use an VNC client to connect to, display, and control the desktop remotely.

To enable remote desktop sharing, I select Desktop/Preferences/Remote Desktop. In the Sharing section, I check Allow other users to view your desktop. In the Security section, I uncheck Ask you for confirmation because I won't be in the office to answer the question. I check Require the user to enter this password: and type a password in the box. I click Close.

Next, I open the firewall to allow incoming VNC connections. I select Desktop/System Settings/Security Level, and the Security Level Configuration window appears. In the Other ports: (1029:tcp) box, I enter 5900:tcp. I click OK, and I'm done.


Toggle external display
I assume that the external display draws battery power when the PC is disconnected from AC. In addition, I sometimes want to hide what I'm doing on the desktop when I'm giving a presentation on a big screen. I need to be able to toggle the external display.

I previously installed the radeontool. It offers this command to turn off the external display

sudo /etc/acpi/actions/radeontool dac off

and this command to turn it back on:

sudo /etc/acpi/actions/radeontool dac on

If I were really cool, I would figure out how to assign these command lines to the external display key on the PC. Until then, I create two simple panel applets, one to turn off the external display, and one to turn it back on. To create an applet, I right-click the top panel and select Add to Panel.... I select Custom Application Launcher and click Add. In the Create Launcher, I enter these settings:

Name: External display on Generic name: External display on Command: sudo /etc/acpi/actions/radeontool dac on

I choose an icon, and I check Run in terminal.

I repeat these steps to add an applet that turns off the external display. This time, I specify this command: command: sudo /etc/acpi/actions/radeontool dac off.


cpuinfo
I added the CPU Frequency Scaling Monitor applet to the panel and was naively surprised by the result. According to cat /proc/cpuinfo, I have a 2.13 GHz CPU. Why does the CPU monitor report that it is running at 800 MHz?

It turns out that to conserve battery power, the CPU various its speed based on the system load. Here's an easy way to put a load on the system and watch the CPU meter rise from 800 MHz to 2.13 GHz:

$ while true; do echo foo; done

Kill that load, and it's fun to watch the CPU speed gradually decrease in the CPU speed applet.

2006-01-02

USR 8054 and HP iPAQ 3615

Despite having upgraded the firmware on my USR 8054 to rev. 1.67b44, my Pocket PC is still having trouble getting a usable connection to it. My test is simple:

- Reboot the Pocket PC. (Success)
- Position the Pocket PC on my desk, about 0.5 meters from the 8054. (Success)
- Run vxUtil. (Success)
- Run the Info tool to verify that there is an IP connection. (Success)
- Run the Ping tool to ping the 8054. (Failure!)

That's as far as I get with frimware 1.67b44. All five pings fail.

I install firmware 1.21h on the 8054 and rerun the tests. All tests pass, with most pings returning in ~500 ms. I continue with these tests:

- Run the Lookup tool to perform a DNS lookup of kasperowski.com. (Success)
- Run the Ping tool to ping kasperowski.com. (Success)
- Run Internet Explorer and get kasperowski.com. (Success)
- Get google. (Success)
- Get the local weather report. (Failure)
- Get the SpeakEasy Speed Test. (Success)
- Run the SpeakEasy Speed Test, using New York as the server. (Success)

It's still a little flaky, but the WiFi connection on the iPAQ 6315 seems to just be that way. I will give USR 8054 firmware 1.21h a try for a few days.

2006-01-01

USR 8054 firmware RSSI comparison

When I installed FC4 on my new work computer, I upgraded the firmware of my USR 8054 to fix a perceived problem with dropped connections. I haven't tested the new firmware, rev. 1.67b44, to see whether it fixes that problem. I notice, however, that the new firmware seems to introduce a new problem: when I'm in bed, I can't use the WiFi connection on my Pocket PC. This is a problem for two reasons. First, I want good coverage so WiFiFoFum running on my HP iPAQ 6315.

Here are the results:

Location RSSI
1.21h 1.64b34 1.67b44
office -35 -35 -35
third floor bedroom -52 -54 -50
third floor bathroom -70 -70 -69
second floor bathroom -90 -90 -90
kitchen -90 -90 -90
dining room -66 -66 -70
second floor bedroom -69 -69 -68
living room -57 -55 -55
art studio -65 -54 -60
first floor front door -67 -73 -68
first floor back door -90 -90 -90
basement -90 -70 -69

My hypothesis was completely wrong. In fact, the oldest firmware, 1.21h, introduced a new dead spot that the newer firmwares did not experience. When WiFoFoFum reports -90 RSSI, it means that it sees the ESSID, but the signal is very weak. I have to conclude that the newer firmwares are better, using their default settings. I will use the latest firmware, 1.67b44.

These results really point out that I need either a more powerful access point or WiFi repeaters throughout the house. I will investigate these ideas later.

LinkWithin

Related Posts with Thumbnails