[current category: main » linux]
MikeyP.com

About This Site
Main Page
About MikeyP
Subscribe to Feed

Jan 08, 2009

Loving Linux: Reason #384

The 7 year old boot drive in my Linux box crapped out, so I decided to remove it and boot from the secondary (better) drive. If you're clever, you can reassign mounts in /etc/fstab, update /etc/lilo.conf, run lilo -r /dev/sdxxx, and boot without problems from the new drive.

I'm not that clever, so I have a Linux boot CD handy to patch things up. And of course, I had a problem getting lilo to work while the old drive was still in the machine, but it was easy to resolve after removing the dead drive, booting the CD, mounting the new drive, and doing the lilo routine again.

After booting the machine with the newly lilo'd drive, the OS loaded up as expected, and I was up and running as if nothing changed.

Except that the network no longer worked. Wha? I removed a hard drive. Why would the network stop working?

I have two network cards in the machine, a 1Gb card as eth1 that requires special drivers, and 100Mb backup card as eth0 that has drivers in the kernel. It turned out that udev detected a general hardware change when I removed the drive, and added a line in /etc/udev/rules.d/60-interface.rules that set eth0 to be eth1. And that caused the wrong drivers to load for the wrong card.

I love Linux.

category: /linux |
comments | Share/Save/Bookmark

Jun 21, 2008

Fixing Fonts in Opera on Ubuntu

Do your fonts in Opera 9.5 look "fuzzy" or "pixelly" on Ubuntu? Mine did, until I added a .fonts.conf file in my home directory. Just copy and paste the XML from this post on my.opera.com to your ~/.fonts.conf file to get corrected font rendering.

category: /linux |
comments | Share/Save/Bookmark

May 26, 2008

FuseSMB, Localhost, and You

FuseSMB is a handy network automounting tool for Linux. It basically works like the Network Neighborhood in Windows, allowing you to browse directories shared by other computers on the network. It uses the Samba (CIFS/SMB) protocol, so it picks up shares from Windows, Mac, or Linux machines… provided those machines are configured correctly.

I've been using FuseSMB to access shared directories on my Linux server. Those directories are shared via Samba, and I can usually access them fine from Windows or Mac computers, though every once in a while, they seem to "disappear" from the network. However, when accessing them from a Linux box using FuseSMB, I had more serious issues: every 2 out of 3 times I tried to access the shares, I would get a "connection timed out" error. I naturally blamed FuseSMB for this problem until I decided to take a peek at the network using smbtree, a Samba tool for listing all Samba network connections.

2 out of 3 times using smbtree, I saw an error that my server could not be found at address 127.0.0.1. Localhost? Why was Samba looking for my server on Localhost?

I logged into my server, looked at /etc/hosts, and saw the problem. Address 127.0.0.1 was pointing at three names:


127.0.0.1     localhost
127.0.0.1     myserver.mikeyp.com myserver

These settings were just below a very detailed comment in the /etc/hosts file:


 # By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
 # should NEVER be named with the name of the machine.  It causes problems
 # for some (stupid) programs, irc and reputedly talk. :^)

Oh. I commented out the second 127.0.0.1 line, restarted the network, and my FuseSMB and Samba issues were gone.

By the way, here's something spooky about Samba. One day I fired up the VPN software on my Windows laptop to access my corporate network from home. While the laptop was connected to the VPN, I went over to my Linux box and started FuseSMB. Incredibly, on my Linux box, I could see all of the shared folders on the corporate network!

category: /linux |
comments | Share/Save/Bookmark

Apr 07, 2008

Linux on ThinkPad X40

Why Linux

As long as I don't run any major background apps such as Desktop Search or Anti-Virus, WinXP works pretty well on my circa 2004 ThinkPad X40. My company uses Exchange server with Outlook for all corporate communication and scheduling, and the Thinkpad + XP works as a fine client for this system.

However, on a laptop, responsiveness is key, and XP loves to "hang" when encountering issues with network connections. Since I'm fairly mobile with my laptop (the actual point of having one, no?), net connection "hangs" happen to me frequently. Compared to XP, Linux is quite adept at handling network issues. So in hopes of better performance, I installed Linux on my ThinkPad.

Installing and Configuring Linux

Linux laptop installations have come a long way in the past few years. I grabbed my favorite distro, ZenWalk 5.0, and partitioned the drive for dual-boot. Amazingly, ZenWalk installed without any major issues for me. Within 30 minutes, Linux with X was running fine. I had to make sure to install the optional Intel ipw2200 WiFi drivers to get wireless to work, but once installed, WiFi worked automatically. Impressive.

More effort was required to get the system to act like a laptop, however. This included getting the system to respond to the built-in ThinkPad hotkeys and managing battery life.

ACPI support in the latest 2.6 kernels is quite robust, and along with the included thinkpad_acpi kernel module, captures all of the ThinkPad button events. I just watched the ACPI logs as I pressed every button, closed the lid, and undocked from the docking station. I then added those events to /etc/acpi/events, and set them to launch appropriate standby/suspend/undock scripts. ZenWalk 5.0 includes a very nice standby/suspend script that worked perfectly once I figured out all of the power management issues (see below). I also installed a handy app called ThinkPad Buttons, aka tpb. tpb monitors the ThinkPad ACPI events, and draws overlayed volume graphics and screen brightness graphics in X, similar to what you would see in Windows.

Battery life and power management were a bit more tricky. The ThinkPad includes various power management features such as Intel SpeedStep, WiFi power adjustment, screen brightness control, and audio power saving. To take advantange of SpeedStep, I added the included acpi-cpufreq kernel module. I then added the following commands to /etc/rd.d/rc.local:


# power management tips from thinkwiki.org
echo 5 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/kernel/nmi_watchdog
echo Y > /sys/module/snd_ac97_codec/parameters/power_save
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
# disable wake-on-lan
ethtool -s eth0 wol d
# lower wifi power level ("BATTERY" level)
iwpriv eth1 set_power 7

# launch thinkpad buttons (for OSD)
# needs /dev/nvram to be writeable
chmod 666 /dev/nvram
/usr/local/bin/tpb -d

And added the following line to lilo.conf:


addappend = "hpet=force usbcore.autosuspend=1 acpi_sleep=s3_bios,s3_mode"

The very latest kernel (2.6.24, as of this writing) was required for best battery life. After my changes, I used the included XFCE CPU Frequency Monitor and Battery Monitor apps to unscientifically measure Linux battery performance to be within 10% of XP's battery life. Fine.

Software

My company requires the use of a Cisco VPN to log in remotely as well as log in to the local wireless network. The open source vpnc client app worked perfectly with our VPN server, requiring only two lines in the config file, and the addition of the included tun kernel module.

Using smbmount, I could map and log in to file shares on the corporate network.

The included web browser IceWeasel (FireFox) ran fine, but I replaced it with Opera. Opera is significantly faster than FireFox on the ThinkPad. Opera also includes a usable mail client, so used it instead of the slower IceDove (Thunderbird) mail client. Unfortunately, we use Windows Server-based Wikis on our corporate network, which require NTLM [WikiPedia] authentication. While the Windows version of Opera supports NTLM, the Linux version does not. Fortunately, FireFox does have Linux NTLM support.

MS Office is a superb application suite that I use frequently. I rarely use MS Word these days, but often use PowerPoint and Visio, and constantly use Excel. For me AbiWord is a fine enough replacement for MS Word, and Inkscape, Xara, and Scribus are all suitable (and maybe superior) alternatives to Visio. But without a VBA-compatible scripting environment (or even conditional formatting) Gnumeric is not a replacement for Excel. I never tried any alternatives to PowerPoint, nor did I try using the external monitor connection. I also didn't bother trying the latest version of OpenOffice.

And alas, there is not even a suitably close replacement for Outlook/Exchange on any platform, let alone Linux. Novell/Gnome Evolution is a cute visual imitation of Outlook, but isn't anywhere near the same level of performance and feature set, with very primitive (and often broken) Exchange support. Exchange Outlook Web Access is functional, but the 2003 version my company uses has a terrible UI, and as with most browser apps, poor/non-existent integration with host environment. I tried installing Outlook in CrossOver (WINE [WikiPedia]), and was shocked that it actually worked. But it was incredibly slow - far too slow to be usable.

I considered running XP in a virtual machine with VirtualBox, but abandoned the idea upon recollection of how slow a VM runs on older single-core CPUs.

Terminal, not Client

I realized that without MS Office and Outlook, Linux cannot operate as a suitable client on our corporate network. However, by using rdesktop, a Windows Terminal Services client, I could remotely access and control my corporate desktop machine from Linux. rdesktop is fast and stable, with the only noticeable downside being that it doesn't render fonts with anti-aliasing (at least that I could figure out). Linux + rdesktop allows the ThinkPad to be a solid terminal on the corporate network, which, at the end of the day, provided a solution for my XP network connectivity issues.

Conclusion

While Linux mostly works fine on the ThinkPad, it was a bit too much work to get it up and working. And although it works as a fine Terminal, I prefer to be able to work offline with local applications. So for now, I'm still running XP most of the time, and dual-booting over to Linux whenever XP starts to frustrate me.

But this laptop is near the end of its days. I'm anxious to see how things work on my next laptop.

category: /linux |
2 writebacks and comments | Share/Save/Bookmark

Jan 01, 2008

Replacing a Balky HP Scanner

Well, only a week after I "repaired" my old HP All-in-One, it started to make some impressive grinding noises that only stopped when I shut it off. Rather than spend more time on 5 year old hardware, I threw it out the window and bought a new faster and quieter HP Photosmart C5280.

I chose an HP brand All-in-One because of the excellent Linux support for HP printers and scanners. HP's Windows drivers are notoriously terrible, but the Linux drivers are simply a joy to use. In fact, if I wasn't using Linux, I would probably avoid HP due to the Windows driver issues, but hooked up to a Linux box, HP printers are the way to go.

Because I previously had an HP printer installed, setting up the new printer took all of 3 minutes. I just opened the CUPS configuration page (http://localhost:631), added the printer, gave it a network name, noticed that the model was autodetected by CUPS and the HP drivers (HPLIP), printed a test page, and exported the printer to Samba. I then went to the Windows machines, fired up the Add a Printer wizard, chose a Network printer, selected the new Photosmart in the list, and printed a test page. Done! Remote scanning works perfectly as well.

Initially, I noticed a lot of banding in the test pages, so I used the "Self-Test Report" and "Clean Print Cartridges" functions on the printer's Setup menu a couple of times. This fixed the banding issues, and now the quality is fine. For less than $150, I'm quite pleased with the Photosmart C5280.


category: /linux |
comments | Share/Save/Bookmark

Dec 16, 2007

Repairing a Balky HP Scanner

I have an older HP PSC 2110 all-in-one Printer-Copier-Scanner connected to my Linux box. The printer and scanner functions are shared with all of the computers on the network, including the Windows machines. (SaneTwain is best way to connect a Windows client to a shared Linux scanner).

Tonight I was trying to scan some images for a proposal, but the scanner kept timing out. At first I thought it was a configuration problem, but eventually discovered it was a problem with the printer itself. The Linux HPLIP diagnostic tools didn't report any meaningful errors, so I opted for the next most logical step: I took the printer apart.

As it turns out, the problem was simple to fix: I just cleaned the glass on the scanner bed with some isopropyl alcohol. Apparently, the scanner calibrates and aligns itself along a black and white border under the glass at the end of the scanner bed. If it can't get a clear read on the contrast, it gives up.

For reference: More DIY printer-fixing tips can be found at fixyourownprinter.com.

category: /linux |
comments | Share/Save/Bookmark

Jun 22, 2007

Zen of Linux

A few months ago, I decided it was time to replace the aging distro on my Linux box. So I fired up VirtualBox and tried out a bunch of them. I was looking for an elegant, high performance distro without any bloat. After trying dozens of distros, I found three that were really interesting: ZenWalk, SimplyMEPIS, and Debian Etch.

Yes, I tried Ubuntu, Kubuntu, and Xubuntu. Of the three, only Ubuntu was stable enough for me to use for long periods of time. While Ubuntu is a very nice distro, I found it to be a tad bloated with apps, as well as being one of the slowest performing distros I tried. I didn't bother to find out why.

ZenWalk, a Slackware-based distro, is the ultimate Linux distro for me. It was the fastest distro I tried, by a long shot, perhaps partly because it defaults to the XFS file system instead of ext3. Its "one app per task" policy virtually eliminates bloat. Its package management is quite minimal compared to other distros, though it works perfectly. It has all of the necessary build tools configured and ready to run, and I've been able to download and build new apps easily. The ZenWalk forums are active and friendly, and after using a Red Hat based distro for years, I had forgotten just how easy it is to configure a Slackware-based system. But its the level of polish that really sold it for me. The entire distro uses one clean XFCE theme, with UI and font consistencies throughout all apps. ZenWalk is the best Linux distro I've ever used, and is the one I installed on my Linux box.

SimplyMEPIS is an Ubuntu-based full desktop distro. Unlike ZenWalk, SimplyMEPIS seems to include every modern popular Linux app you could think of. And being based on Ubuntu, you have access to all of the Ubuntu packages via the Synaptic package manager. It does a great job of integrating the apps with its clean, KDE-based desktop, which I prefer to Ubuntu's Gnome desktop. Somehow, SimplyMEPIS is also a bit faster than Ubuntu. If you were considering Ubuntu (or especially Kubuntu), give SimplyMEPIS a shot instead.

If you like the idea of stable package management, minimal bloat, and good performance, Debian Etch is the distro for you. I downloaded the minimal "net install" version of Debian, which installs a simple command line distro. To compare performance with ZenWalk, I formatted the partitions with the XFS file system, and used apt to download packages that matched ZenWalk's default applications (including the XFCE desktop). All in all, I was able to reasonably mimic the elegance of ZenWalk in Debian Etch, and felt that performance was also close. Compared to Xubuntu, Debian Etch was a far nicer alternative.

The beauty of Linux is that there is probably a distro out there made just for you - you don't have to settle for Red Hat or Ubuntu. Just look at the amazing list of available distros over on DistroWatch. For me SimplyMEPIS and Debian Etch are great alternatives to Ubuntu. But ZenWalk is exactly the distro I was looking for.

category: /linux |
1 writebacks and comments | Share/Save/Bookmark

Apr 01, 2007

Improving Debian/Ubuntu Fonts

I shouldn't say "improving", as font settings are very subjective. However, compared to Windows and OS X, the default font settings in most recent Debian-based Linux distros (such as Ubuntu) just look wrong to me. I've found two main reasons for this:

  1. Most Debian Xorg configurations default to 100 dpi
  2. Debian font hinting typically uses the Freetype "Native" hinter

On the dpi front, Windows defaults to 96 dpi instead of 100 dpi, which seems to be where many fonts look their best. To change the dpi on Debian-based Xorg configs, edit the file /etc/X11/xinit/xserverrc and change the exec line to read:


exec /usr/bin/X11/X -dpi 96 -nolisten tcp

As for Freetype hinting, there are two font hinting options available: "native" and "autohinter." I'm pretty confused as to why there are two options, but it appears to be patent-related (see http://www.freetype.org/). In any case, I think that the "autohinter" setting looks much nicer. To change it in a Debian-based distro, run:


dpkg-reconfigure fontconfig-config

Follow the prompts to choose "autohinter", "automatic" subpixel rendering, and "no" to default bitmapped fonts.

After making the above changes, restart X (ctrl-alt-backspace).

Here is a before and after screen cap of the Xfce menu, with subpixel rendering off. Notice the lowercase "m" in the examples. And believe me, the "after" results look superb on a good LCD screen with subpixel rendering.

Native Hinter 100 dpi Autohinter 96 dpi

Note 1: Gnome and KDE both override the dpi setting in Xorg. Despite setting Gnome to use 96 dpi, the fonts still look wrong (using my lowercase "m" test).

Note 2: Be sure to play with the hinting level. You can usually adjust this in your window manager. I set the hinting level to "full".

category: /linux |
1 writebacks and comments | Share/Save/Bookmark

Mar 10, 2007

Linux DST Change

As you probably know, thanks to the morons in Washington, Daylight Savings Time has been meaninglessly changed this year.

If you have some Linux boxes running a distro older than a couple of years, you'll likely need to manually update the time zone data. Luckily, Linux-Watch.com has a nice and consise HOWTO that I found easy to follow.

The only gotcha is something that StickyC discovered: many Linux distros (mine included), use a copy of the zoneinfo file for /etc/localtime instead of a symbolic link. This is, of course, easy to change, but it's something to be aware of.

category: /linux |
1 writebacks and comments | Share/Save/Bookmark

Jan 01, 2007

Linux Server Power Usage

Using my handy new Kill-A-Watt power usage meter, today I found that my main linux server at home (spock [spockserverspecs, spockpowerusage]) consumes an average of 90 watts. That's a machine that is on 24/7. And the SGI monitor attached to it consumes 6 watts when it is off.

The server I have in the garage monitoring two motion cameras uses 57 watts when idle, and about 68 when recording motion capture images. This includes the power used by the two Lorex cameras and a Linksys WiFi Bridge.

I was thinking of retiring these boxes and building low-power machines. The main server handles X10 control (via serial port), Bluetooth routing (via USB), USB print serving, DNS, DHCP, very lightweight PHP web serving, media serving (mt-daapd and UPnP), and general file serving via Samba. I don't think I need a very powerful box to handle all of that. Same with the motion capture system.

The Mini-Box 15 watt machines look interesting, as well as the KuroBox.

That all said, 150-170 watts is about like running two or three light bulbs all of the time. I need to calculate just what kind of impact that has on my power bill.


category: /linux |
comments | Share/Save/Bookmark

Aug 22, 2006

Scanning to PDF

For some reason, it never occurred to me that the perfect way to store a set of scanned documents is in a PDF [WikiPedia] file. As a card-carrying nerd, bitmaps (TIFFs) of scanned pages always worked well enough. But when my non-technical attorney stuffed a bunch of papers in a machine scanner and emailed me a nicely completed PDF file, I realized what a great solution this is. No file format issues, easy to email, easy to print, and easy to bundle multiple pages. And best of all, easy to do in Linux.

If you have a scanner properly configured in Linux, just use the scanimage app to grab pages from the scanner in the native .pnm file format.


scanimage --resolution 150 --mode grayscale > page1.pnm

Then, just use the ImageMajick tools to convert the scanned pages to a PDF file.


convert *.pnm scannedstuff.pdf

It couldn't be easier. For more variants of this tip, along with some sample scanning scripts, check out this blog entry: http://www.megginson.com/blogs/quoderat/archives/2006/01/26/scanning-to-pdf-in-linux/

category: /linux |
comments | Share/Save/Bookmark

Apr 10, 2006

Opera Rules Linux Too

After Firefox again failed to build on my Linux box, I thought I'd never find a stable, compatible, full-featured web browser for Linux. Mozilla [WikiPedia] had the feature set covered, and the truetype Xft patch made it look nice, but performance was unusably slow. Konqueror is always interesting, but like the curse of Windows Explorer, it loads up all kinds of KDE stuff that I don't want. And as much as I enjoy the tiny and efficient Dillo browser, it isn't practical enough for daily use.

Since I've recently become hooked on the Opera [operastaticbin, operaubuntufonts] browser under Windows, I thought I'd take a peek at the Linux version. Lo and behold, they wisely provide a static binary download that removes the hassle of Linux dependency hell. I untarred it, ran it in place, and it just worked. Fast. And identical to the Windows version. Wow.

Tip: For Linux, skip Opera's web download page, and just head to ftp://ftp.opera.com to get the right version.

category: /linux |
comments | Share/Save/Bookmark

Mar 11, 2006

Installing libupnp on Linux

Most Linux UPnP [WikiPedia] media servers require the libupnp library. However, the install script for libupnp is incomplete and not well documented, so here are some more complete install steps.

Although libupnp-1.3.1 was just released, I couldn't get it to compile, so I use the older libupnp-1.2.1a version. First, untar and compile the source:


tar -xzvf libupnp-1.2.1a.tar.gz
cd libupnp-1.2.1a/upnp
make

Second, become root and run the install script:


cd libupnp-1.2.1a/upnp
make install

Finally, while still root, copy the following support libraries and header files, then run ldconfig:


cp ../ixml/inc/ixml.h /usr/include/upnp/.
cp ../threadutil/inc/ithread.h /usr/include/upnp/.
cp ../ixml/bin/libixml.so /usr/lib/.
cp ../threadutil/bin/libthreadutil.so /usr/lib/.
ldconfig
category: /linux |
comments | Share/Save/Bookmark

Sep 03, 2005

SSH Hacker Attacks

If you run SSH [WikiPedia] to allow secure remote logins to your server, you've probably noticed a big increase in unauthorized attempted logins. My main Linux box at home has been "under attack" nearly every day for the past 9 or 10 months. There is an article over on whitedust.net describing the situation, with a follow-up link describing some security solutions.

Nearly all of the unauthorized login attempts are coming from IP addresses [WikiPedia] in mainland China. It is a really weird sensation to know that Chinese hackers are trying to log in to a computer right here in my home office.

My system hasn't been breached, as I disallow root-level account remote logins and restrict user-level logins to a single account. However, since it still sucks to see log files fill up with unauthorized login attempts, I reconfigured the public SSH port on my router to a rarely used port. That simple change has, so far, deflected any further attacks.

category: /linux |
comments | Share/Save/Bookmark

Still Impressed with Mandrake 10

I'm still impressed with the Mandrake 10 Linux distro (now known as Mandriva). Previously, an install of Mandrake 10 brought an ancient K6-233 back to life for me as a security camera capture system. Alas, the summer heat finally fried the CPU in the K6. I grabbed (yet another) old machine from the closet, pulled the drive from the K6, stuck it in the other machine… and it booted fine. Mandrake automatically recognized its new home and preserved all of my configurations, even though nearly every piece of hardware was different.

Pretty impressive, especially if, like me, you're used to recompiling the Linux kernel each time you make a minor hardware change.

category: /linux |
comments | Share/Save/Bookmark

Jul 03, 2005

WinTV-D Chips

I have a WinTV-D HDTV [Answers] tuner card that I bought several years ago when I was experimenting with HDTV reception at my house. I no longer use it, but I decided to throw it in my Linux box. Eventually, I'll see if I can get it to work. Until then, here are the chips on the card for reference:

category: /linux |
comments | Share/Save/Bookmark

Mar 28, 2005

MPlayer silent/stdout Patch

As the kitchen sink of media players (along with Xine and VLC), MPlayer [mplayer, mplayersilent] could be the ultimate audio helper app on Linux, as it can convert from nearly any media format to any other format. But unfortunately, because it has no true "silent" output option and can't stream to stdout, it can't be used as a practical helper app in shell scripts.

Fortunately, Adrian on the SlimServer developer list created a patch for MPlayer that allows MPlayer to stream PCM audio to stdout, a key requirement for me to use it as a helper app in a Whole-House Music Storage server. The patch allows MPlayer to stream audio from any input format to stdout in PCM WAV format, which is supported by practically every audio device and software.

Adrian's patch works against an older CVS build of MPlayer, so I updated it slightly to work against the official MPlayer-1.0pre6a release.

Here's the patch: mplayer-s.patch

As with Adrian's original patch, this adds two new command line options to MPlayer:

'-silent' suppresses all text output
'-aofile -' sends pcm output to stdout when used with -ao pcm

(Sneak peek at future blog entry: using this patch and some other killer software, I now have iTunes on Windows playing WMA Lossless files streamed from my Linux box!)

category: /linux |
comments | Share/Save/Bookmark

Mar 27, 2005

Troubles with Tulip

As I was experimenting with music server software, I noticed something odd with the network config on my Linux box. syslog was constantly reporting this error:

eth0: PNIC2 transmit timed out, status e4660000, CSR6/7 e0406002 / effffbff CSR12 000000c8, resetting…

Uh, hmm. Rebooted the Linux box for the first time in months. Noticed this in syslog:

eth0: Lite-On PNIC-II rev 37 at 0xe800, 00:C0:F0:74:8D:91, IRQ 10.
eth0: Autonegotiation failed, using 10baseT, link beat status 10cc.

Half-duplex 10baseT on a full-duplex 100baseTX network ain't gonna cut it. Driver problem? (I'm running kernel 2.4.20-mh18, card uses tulip.o driver).

My driver install log:

No luck, same error in syslog. Discovered card brand and ID: Kingston KNE111TX, freebie from DSL provider, I think. Rummage through box in closet. Find Linksys LNE100TX. Power down. 12 screws later, power up.

Problem gone.

Hmph.

category: /linux |
2 writebacks and comments | Share/Save/Bookmark

Mar 15, 2005

KuroBox Linux Small Form Factor

Justin Clark at O'Reilly blogged today about a cool little PowerPC-based Linux box called KuroBox. It's being pitched as a DIY NAS [WikiPedia] device, but with a price of $160 for a 200MHz CPU, this could be a neat platform for a Whole House Music Storage device.

category: /linux |
comments | Share/Save/Bookmark

Feb 20, 2005

System Specs for Linux Server

Here are the system hardware specs for my home Linux server. Although old, it is plenty powerful for file serving, web serving, A/V streaming, DHCP, DNS, etc. It is also nearly silent.

System Name: spock

Believe it or not, until I installed the Seagate drive, the noisiest component in the system was the buzzing from the LCD monitor. However, even in the Nexus enclosure, the Seagate drive noise is slightly noticable. It might be resonating with the drive cage in the rack case, so I plan to move it to another location.

Using ECC RAM is a clear benefit in a server. I went through two sets of generic RAM, and often had mysterious lockups. I've never had a lockup since I installed the ECC RAM.

(FWIW, I'm putting my system specs up here for my own reference, because once I button up a machine, I hardly ever remember what the heck I put in it :-))

category: /linux |
comments | Share/Save/Bookmark

Feb 13, 2005

Del^?^?^? Backspace in XTerm VIM

Having trouble with the Backspace or Delete key when using vi or vim in XTerm? Does pressing the Backspace key echo the characters ^? instead of deleting the charater in front of the cursor? Just edit your .Xdefaults file and change or add these lines to make the keys work as you would expect them to:


  XTerm*deleteIsDEL:      false
  XTerm*backarrowKey:     false
  XTerm*ttyModes:         erase ^?
category: /linux |
comments | Share/Save/Bookmark

Feb 10, 2005

Using DHCPD with Bind

Both Bind (named) and dhcpd can be tricky to configure. And it would seem to be natural that getting them to talk to each other for dynamic DNS updates would be convoluted. I know I thought so, and so did Matt, who provides his config files to help hapless hackers like me.

In reality, if you have a working dhcpd config, and a working Bind config, everything you need to get dhcp client names in to DNS [WikiPedia] via Bind is described in the man file for dhcpd.conf. Just look for the section titled DYNAMIC DNS UPDATE SECURITY and copy the example code in to your dhcpd.conf and named.conf files. Restart both deamons, and shazaam, you can address all of the dhcp clients on your network by name.

category: /linux |
comments | Share/Save/Bookmark

Feb 03, 2005

mplayer Plays it All

This evening, I was trying to play a bittorrent of (insert_random_video_here) on Windows XP, and Windows Media Player 10 puked on the file. It wouldn't give me any clue as to why it wouldn't play, wouldn't let me view the file's properties, nothing.

I had to open the file in filesnoop to find out that it is was encoded in XviD, and I just needed to install the latest codecs. But after getting the codec, the video would play, but without any sound. Again, no clue from Windows Media Player as to the cause, no detailed info about the file or codecs anywhere in the app.

Finally just copied the file over to my linux box, ran mplayer on the command line, and pow, the video plays on the framebuffer just fine. Nice.

And the bonus is that mplayer listed exactly what codecs it was using (which was AC3 for the audio).

I like mplayer.

category: /linux |
comments | Share/Save/Bookmark

Feb 01, 2005

Mandrake RPM for Motion

For some reason, the latest Mandrake RPM available for Motion is version 3.0.7. There are a lot of nice improvements in the most recent version, so I used the .spec file included in the latest motion build and made a Mandrake RPM.

You can download it here: motion-3.1.17-1mdk.i586.rpm

In this RPM, Motion was configured with these options:


   ************************
   *   Configure status   *
   ************************
pthread Support:     Yes
jpeg Support:        Yes
Curl Support:        Yes
V4L included:        Yes
FFmpeg Support:      Yes
xmlrpc-c Support:    No
MYSQL Support:       Yes
PostgreSQL Support:  No

Disclaimer: I'm kinda new at making RPMs, but the spec file from the Motion guys looked fine with a tweak or two. Works well for me, but use at your own risk.

category: /linux |
comments | Share/Save/Bookmark

Jan 31, 2005

Browsing Small and Fast with Dillo

I just downloaded and compiled Dillo, a sweet little browser that bridges the gap between the tiny and efficient text-based Lynx and heavyweight browsers like Firefox and the sluggish beast Mozilla.

Dillo is a lot like a desktop version of a Palm Browser - tight, fast, memory efficient… and short on features. The most important missing piece is an ECMAScript [WikiPedia] (JavaScript) interpreter, which prevents sites like http://www.gmail.com from working. CSS support is also very light, but for pages that abide by http://www.w3.org standards, Dillo will render them just fine.

Speaking of standards, Dillo knows them well! In the lower corner of the browser window is a little 'bug' icon that shows a count of every HTML bug on the currently displayed web page.

The Dillo binary is only about 1 meg (un-stripped), and uses less than 3 megs of RAM during regular browsing. Awesome.

I did need to make a change to Dillo's configure.in to build properly with my OpenSSL static library install (the shared libs won't build on my system). On line 243, I just switched the ordering of LIBSSL_LIBS to be LIBSSL_LIBS="-lssl -lcrypto" instead of LIBSSL_LIBS="-lcrypto -lssl".

I can't wait to see this browser mature!

category: /linux |
comments | Share/Save/Bookmark

Jan 12, 2005

BlueZ not Blues with Linux Bluetooth

Because of an apparent bug in the Widcomm WinXP Bluetooth drivers, I decided to try enabling Bluetooth in Linux to give the Tapwave Zodiac wireless internet access.

Linux Bluetooth works great! :-D

Bluetooth success in Linux is a result of the BlueZ driver project, which is conveniently included with the Kernel since 2.4. Thanks to a huge collection of online documentation, especially from Tills and Ben, getting the Zodiac to connect through my Linux box was mostly a piece of cake.

Apparently, most new distros have Bluetooth support functional right out-of-the-box [mandrakediskswap, mandrake10]. On my older, hand-cobbled Linux box, I did have to patch and recompile my Kernel (2.4.20) and download and compile the latest BlueX utils, iptables, and pppd daemons. But with a one-line change to the BlueZ util source, everything compiled and installed without a hitch.

Finally, I've got the Zodiac on the net without WiFi or GRPS!

category: /linux |
comments | Share/Save/Bookmark

Nov 20, 2004

Saved by the RIP Linux Rescue System (again)

If you've ever built your own Linux kernel, or installed a hard drive controller card in a Linux box, you know how easy it is to have an "accident" that will prevent the OS from booting completely. Thankfully, Kent Robotti has created an excellent recovery distro called RIP ('R'ecovery 'I's 'P'ossible).

There are a lot of bootable Linux distros out there, but Robotti has a history of making a tight, usable distro called looplinux (a decendant of the first distro I ever installed, doslinux). RIP can boot from a floppy, bootable CD, or even a USB flash drive. It will boot its own Linux OS with a set of basic recovery tools, or let you attempt to boot another system on a different drive. I've had to do both on a few occasions, and without RIP, I would've been totally hosed.

category: /linux |
comments | Share/Save/Bookmark

Nov 18, 2004

Mandrake 10.1 - Great Linux Distro

I haven't installed a new linux distro since Mandrake 7.0. And why bother? With autoconf and such, it's relatively easy to download and compile your own apps. Even building a new kernel isn't too much of a hassle, and since I built 2.4.20, I've had no real need to update anything.

Boy have I missed out!

I just brought an old machine (an ancient K6-233 with 64 Mb RAM) back to life with a fresh install of Mandrake 10.1. Instead of rolling my own kernel, making my own partitions, and compiling my own apps, I just let the installer do its thing. And it was flawless, working fine on the first boot, and auto-detecting all hardware, including a WinTV card and a Belkin PCMCIA WiFi card seated in a PCI adapter.

SSH was configured out of the box, so remote management was a piece of cake. And with the help of the Easy URPMI site, I was installing new software packages with ease.

I'm so impressed with Mandrake and URPMI, I'm beginning to wonder: are the days of rolling your own linux distro over? Or have they been gone for a while, and I'm just now finding out?

category: /linux |
comments | Share/Save/Bookmark
MikeyP.com

About This Site
Main Page
About MikeyP
Subscribe to Feed