Moby Disk Consulting
Software Development, Training & Consulting
William Garrison - mobydisk at mobydisk daht com

Linux Notes

2004-05-21
Upgrading KDE, QT, GTK, Xine, Samba

I decided to upgrade to the latest version of KDE for some development reasons. I figured with access to a KDE-Redhat9-APT repository (thanks to kde.org) and a working version of Synaptic this would be no sweat. To make a long story short, if you attempt to do this, here is what you need to know:

  1. Use the right APT repositories - there are four of them.

    Go to http://kde-redhat.sourceforge.net/ and find the list of repositories. Place them in your /etc/apt/sources.list.d as the directions specify. Be sure the repositories are something like ftp://apt.kde-redhat.org/apt/kde-redhat/9/stable/RPMS/ not ftp://apt.kde-redhat.org/apt/kde-redhat/9/RPMS.stable/. I don't understand the difference, except that one is RPM hell and the other is mostly functional.

  2. Upgrade the redhat-artwork package first.

    The redhat-artwork v0.73-1 and the GTK+ packages conflict because they both contain the ".gtkrc" config file. The file simply points to what set of icons you want to use. APT/RPM is so picky, it will refuse to install GTK+ because the configuration file in GTK+ conflicts with the one in the redhat-artwork package. There is a newer version of redhat-artwork (v0.96) that doesn't conflict with GTK+ anymore, so upgrade to that first.

    It's silly for packages to argue over such an insignificant config file, but the system is doing its job properly. Unfortunately, there is no way for APT to know this, because it wouldn't make sense for GTK+ to depend on redhat-artwork unless you are on a RedHat system! It also couldn't conflict with the old redhat-artwork, because then APT would simply uninstall redhat-artwork, which is no good either. This is a case where conditional dependencies or "weak" file contents (that don't overwrite, or don't care if they get overwritten) might help.

  3. Upgrade the GTK/GTK+ libraries before installing kde.

    kdebase & kdelibs conflict with older versions of GTK2/GTK+. However, even if there is a newer version available, it looks like APT isn't smart enough to get them. Instead, it decides to uninstall GTK2/GTK+, which thus uninstalls 75% of your system. This is bad. I am guessing this is a bug/limitation of APT - it only upgrades a dependency if the dependency is stated as requiring a package newer a certain version, but not if it conflicts with an older version.

  4. Now you can upgrade KDE.

It was a good long journey to figure this out. Now that I know why, the steps are simple and the cause is clear. I'm learning that RPM hell exists even on a decently configured system with good RPMs. Perhaps the problem is the dependency system in APT needs to be a bit smarter.

After upgrading KDE, I also updated from xine 0.92 to 0.99, and from Samba 2 to Samba 3. Both the xine and gxine front-ends crash if I use full-screen for a minute or two, but work fine in windowed mode. (grrrrr!) Samba works, but if I try to use the KDE ioslave (by going to lan://someserver/someshare) on any share that requires a password, I get a mysterious error:

"The process for the smb://someserver protocol died unexpectedly."

Someone please let me know if you find out what that is. Oh, and Konquerer complains that it is associated with HTML files, but it does not know how to open them. It's a friggin web browser fro goodness sake! It looks like the separated KHTML out into a separate program.

2004-03-15
Linux saves the day! Printing complaints.

Linux saves Windows

Tronster had his computer die yesterday. Windows 2000 is complaining about some critical file on bootup, and restoring it does no good. The Windows 2000 recovery console is a real pain. We would all rather have a DOS prompt. So the goal is to backup the contents of one of his RAID-1 (mirrored) hard drives. But if you plop the HD into a Windows NT system, you don't have access to the files on the NTFS volume. Ouch! The solution was to burn the DVDs from Linux.

  • Good: Linux could read an Windows NTFS drive better than Windows can.
  • Bad: It required a reboot and editing funky config files to work.

To see the drive under Windows, I simply unplugged my CD drive and plugged-in the NTFS HD. It became drive "F" and all was good, except for the permissions problem.

To see the drive under Linux, I had to boot-up, disable IDE-SCSI emulation, reboot, and use fdisk to determine where the drive was. Then, I had to re-enable IDE-SCSI emulation for my DVD-RW only, then reboot. Now I could mount the drive, and burning was breeze.

It looks like there is some silly thing that tries to detect drives and update /etc/fstab on bootup. It never works, creating conflicting entries, and I have to restore my old /etc/fstab and build a proper one any time I change the drives. Fortunately, I know enough to backup the file now. It seems to me that /etc/fstab is an old Unix relic. Windows has always been able to autodetect drives and mount them. Maybe there is legitimate use for /etc/fstab, but maybe in today's world we just need an empty one that means to "do whatever" automatically, unless otherwise specified.

Printing problems

For the second time, I tried to print a color image to the HP 820Cse. It is on a Windows system, and Samba works great. But when I print, it saturates the page to the point of sopping, and the colors are messed up. If I print from Gimp 1.2, I can only print to my local printer. Print jobs to anything else vanish.

2004-03-11
Some quick goodies
  • If you want a VirtualDUB equivalent for Linux, check out AviDemux
  • gxine seems more stable and easier to use than the eclectic xine-x11.
  • Yay! gxine works with streaming audio and video! I can watch NASA TV now! And it works with win32 codecs if you copy them into /usr/lib/win32. Yahoo!
  • If you are a Windows C++ coder moving to Linux, check out my miniature pthreads tutorial. I updated my ThreadAPI and hsTimer libraries to work with pthreads or Windows threads, transparently. All that stuff will go up in my software section very soon.
2004-02-28
USB in Linux kernel 2.6

Finally got around to getting USB working in 2.6. In addition to the changes to the rc.sysinit scripts and enabling sysfs, I needed to recompile the kernel with USB-UHCI enabled (Intel/VIA USB 1.0 support). Looks like I only had the USB 2.0 modules compiled. Why don't they just default to compiling all 3 USB modules? USB 2.0 is not yet ubiquitous enough to assume the one driver works for everyone. Oh well, it is still compiling, I'll update this once it is done.

2004-02-01
Rants from a more experienced user

Months have gone by since my last entry, and I've learned so much. I'm on Red Hat 9 (which is much more reliably than Mandrake, IMHO), 2.6.1 kernel, sym5c416 issues, installed xine, got apt-get. Wow. Today's rants are libtcl versioning and lack of RPMs.

  • libtcl

    Somehow, I have a newer version of libtcl than everyone else. I have 8.4, while everyone else has 8.3. This should be no issue, except that instead of the library being "libtcl" version "8.3" and "libtcl" version "8.4" it is "libtcl8.3" and "libtcl8.4." This means that every application that links to tcl links to a specific version of tcl. This defeats the purpose of packaging and library versioning. I now understand the equivalent of Window "DLL hell" on Linux: It is when you have libraries or RPM packages that don't have proper versioning. Were it not for this, I would say that Linux beats Windows 10x over in software installation.

  • Lack of RPMs

    Why do people not create RPMs!?!?!? What's the fetish with installing from source? Source is great, but not for installing. SRPMs aren't too bad, but .tar.gz and .bz2 files should not be used unless you are developing for the application.

    RPMs provide: ability to trace individual files, dependency updates, efficient file sizes, ease of installation, ability to uninstall. Aren't these important to anyone? And the RPMs that claim to be for a certain distro are almost as bad. It is very very rare to find an RPM that isn't 100% interoperable. So stop calling them RPMs for a sepcific distro!

    I do get the feeling that developers believe that RPMs are only good for C/C++ apps. I have yet to see a Java application that installs via RPM. It should be no different.

  • Installing Eclipse

    Okay, so http://people.redhat.com/~jhealy/eclipse/ has an RPM of a gcj compiled Eclipse. That's very cool because Java is slow anyhow. Usual dependency chain issues, and no apt-get site that I know of seems to have any of:

    • libgcj-ssa
    • oprofile (>0.5)

    so I'm off on a wonderful search. Installing applicatons takes hours on Linux. Good thing I'm not trying to use the source, or I would have to find all these libraries, plus the development versions, plus the JDK, plus time to compile. Okay, I got ctags from apt. I got an old version of profile: that's no good. The latest one wants "libdb4" although the site says it just needs "db4" which is weird... No, it is write. db4 provides libdb 4.0, I need libdb 4.1.

    I tried to get rpmfind to work. I downloaded an RPM of 8.0.1, but it immediately exits with a message (oops, I lost it and deleted the RPM) like "rpmfind 1.6 received a signal 11" There are lots of reasons that message is funny (1.6?!?!?). It says to try -v -v -v for more info, but -v -v -v still results in the same message. Apparently, version 8.1 was last worked on 3 years ago, so I doubt there is much support. Googling came up empty. Tried the SRPM, but it needs db3 (db4.1 is the latest) so I don't even want to try to mess with that. Funny that the RPM didn't required db3... maybe that explains the segfault (oh, that's signal 11 BTW)

    libdb4.1 was hard to find. It's almost nowhere. Lots of versions for other architectures, and versions that are older, or have bad FTP sites. Even rpmfind.net has it listed, but for RH 7.1(???) and pointing to a dead link on their own site. That shouldn't happen, they have a database that is supposed to maintain this stuff.

    Found the db4 I need.

    Yaaay, it finally installed! Too bad it crashes on startup with an obscure error message that doesn't show up on Google! yaaay! This sucks mighty ass. The number of linux apps that I install, and they crash or segfault instantly is just painful. At least Windows apps install and mostly work. I can't stand this stuff where they don't run, don't display a useable, and just shutdown. These problems cannot be my system if they do this out of the box. Arrgh! It's like trying to get old demos to work - you tweak and tweak all day to get anything to happen. Aaarggh!

    I hope the Eclipse plug-ins work with the gcj compiled version.

    I sent an email to the eclipse mailing-list:

    I found this on the Oct-Dec archives.  I have the same problem.  My system is 
    RH9 + kernel 2.6.1.
    I am using the packages from http://people.redhat.com/~jhealy/eclipse/ as much 
    as I can.  I needed some other dependencies resolved, so here is what I 
    installed to get gcj-eclipse to install.  The ones marked with a * are directly 
    from jhealy's page.
     ctags-5.5.2-1.i386.rpmctags_5.4-2_i386.rpm
     db4-4.1.25-0.rh73.3.1.i386.rpm
    *libgcc-ssa-3.5ssa-0.20030801.39.i386.rpm
    *libgcj-ssa-3.5ssa-0.20030801.39.i386.rpm
    *libstdc++-ssa-3.5ssa-0.20030801.39.i386.rpm
    *oprofile-0.5.4-12.i386.rpm
    *snapshot-20030802-eclipse-2.1.0-12.i386.rpm
    
    I first tried ctags 5.4 then found that 5.5 was the latest.  I had LOTS of 
    trouble finding an RPM for libdb4 4.1.  4.0 was no problem, but eclipse said it 
    needed 4.1.  The one I found was a RH7.3 update (????) but it is the only one I 
    could find.  I suspect that if there is a package problem, that this is it.  But 
    somehow, this seems like more than a simple package problem.  The specific 
    behavior of eclipse is this:
    1) run eclipse (tried icon and command-line)
    2) eclipse displays a splash screen
    3) splash-screen vanishes
    4) splash-screen 
    re-appears
    5) error message says:
    JVM terminated. Exit code=1
    /usr/lib/eclipse/gcjlauncher
    -cp /usr/lib/eclipse/startup.jar org.eclipse.core.launcher.Main
    -os linux
    -ws gtk
    -arch x86
    -showsplash /usr/lib/eclipse/eclipse -showsplash 600 
    6) I click "close" on the error message
    7) The splash-screen remains
    8) I wait a few minutes, then decide to kill the eclipse process that is 
    displaying the splash-screen.  No HD activity is going on so I know it isn't
    doing anything.
    9) After exit, I see that an empty workspace directory is created.  It is the
    current directory that I launched eclipse from, not in ~/workspace.  I tried
    running as a user, and as root.
    

    Okay, so I fallback to the real eclipse. It's just a ZIP file with the app, no problem. Weird, but no problem. I need the CDT. The CDT site is a wreck - the download links point to the regular eclipse downloads page, but the prior version. Huh? It's a plug-in. Googling tells me that I download the CDT plug-ins and drop them into a plugins folder in eclipse. But I cannot find any such info on the CDT site at all. WTF? Nevermind, install Eclipse. Okay, the CDT site tells me about clicking some things to go to the update and give the update manager a URL and okay, that works. Now, I see lots of CDT stuff that has meaningless one line descriptions so I don't know what to download. Do I need the "Standard Make Build" plug-in or the "Managed Make Build?" There are two "Eclipse C/C++ Development Tools" one is "(Linux GTK)" and the other is "(Source)" I don't need the full source, so I guess I want Linux GTK. But the description of that is "Eclipse C/C++ development tools. (Binary runtime and user documentation.)" The other is "API documentation and source code zips for the C/C++ Development Tools." But I want API documentation... but, this is API documentation for what? The CDT API? And why does the (Linux GTK) one have a sub-bullet that I cannot click on? I like how all downloads take "0 hours and 791 minutes" to download.

    Post-mortem note 2004-03-11: Eclipse is easy to install if you use the Java version. No RPM, but you just create a directory and run it. *poof* I wish someone told me the native versions were still unstable. Aaargh!

  • Kate

    I use kate a lot. However, the insert mode doesn't work when line wrap is enabled. Example: Suppose I have a line of text below the line I am on now. I type, and this line wraps to the next. When it wraps, it should insert a blank line. It doesn't. Instead, what I am typing merges into the next paragraph. Essentially, I have to hit enter at the end of each line, which defeats the purpose of line wrapping. I've had this happen when pasting, and had it merge the paste into the next paragraph, nearly destroying a document. Oh, it destroys the doucment because kate doesn't realize it happened, and the undo doesn't undo it. It undoes the paste, but also removes portions of the paragraph you just merged into.

2004-01-16
Some quick goodies
I wrote an article on Upgrading Red Hat 9 to the 2.6 kernel based on the problems I ran into.
See 2003 archives