Nautilus Identifying OpenOffice Documents as Java Archives

After installing the Java 6 RPM on Fedora Core (jdk-1.6.0-fcs), Nautilus prints the following error when you try to open an OpenOffice document:

The filename "Report.sxw" indicates that this file is of type "OpenOffice Writer". The contents of the file indicate that the file is of type "Java Archive". If you open this file, the file might present a security risk to your system.

This is because the file /usr/share/mime/packages/x-java-archive.xml that is created by the Java RPM is broken. To fix it, add a "<" in front of the second "match" tag:

--- x-java-archive.xml.orig     2006-12-24 14:47:05.000000000 +0100
+++ x-java-archive.xml  2006-12-25 11:57:03.000000000 +0100
@@ -32,7 +32,7 @@
     <glob pattern="*.jar"/>
     <magic priority="85">
       <match type="string" value="PK\003\004" offset="0">
-       match type="host16" value="0xcafe" offset="40" />
+       <match type="host16" value="0xcafe" offset="40" />
       </match>
     </magic>
   </mime-type>

Then run the following command:

update-mime-database /usr/share/mime

Log out and log in again to restart Nautilus.

Update 12 Jan 2007: This has been filed as ticket 6510610 in Sun's Bug Database.

Update 7 Jul 2007: The bug has been fixed in Java 6 Update 2.

12:25, 25 Dec 2006 by Carsten Clasohm Permalink | Comments (6)

Linux and the iriver T10 [mostly-linux.blogspot.com]

A while back I bought an iriver T10 music player. For the next months, I had to use gPhoto to upload audio files from Linux to the T10. Only because someone decided to use Microsoft's Media Transfer Protocol (MTP), instead of the good old USB Mass Storage protocol (UMS).

My gPhoto setup broke when I upgraded to Fedora Core 6, so I searched around, and found that iriver had released new firmware to replace MTP with UMS. The firmware updater requires Windows to run, but after using it, I finally can access the T10 like any other USB storage device under Linux.

17:44, 12 Dec 2006 by Carsten Clasohm Permalink | Comments (0)

Photographing high buildings gives you a picture where the left and right sides converge toward the top, making it look like the building is topling over backwards any moment.

Before digital photography, the only way to fix this were shift lenses. With digital images, you can fix the distortion, but that used to be a partly manual process.

Enter ShiftN. With the click of one button, it looks for lines which should be vertical, and modifies the picture to look like it was taken with a shift lens. Here is an example picture I took of the Bibliothèque Nationale in Paris. Left is the original, right the version ShiftN came up with.

ShiftN is freeware. It is written for MS Windows, but runs perfectly on Linux, thanks to Wine.

And although the ShiftN Web site is in German, the program's UI comes with English texts.

16:34, 17 Sep 2006 by Carsten Clasohm Permalink | Comments (1)

Sorting Mail with POPFile [popfile.sourceforge.net]

"POPFile is an automatic mail classification tool. Once properly set up and trained, it will scan all email as it arrives and classify it based on your training. You can give it a simple job, like separating out junk e-mail, or a complicated one - like filing mail into a dozen folders. Think of it as a personal assistant for your inbox."
- http://popfile.sourceforge.net/

Despite its name, POPFile can sort mails using a couple of protocols, including IMAP. It monitors a configurable list of IMAP folders (usually your inbox), classifies the mails with a Bayesian algorithm, and moves them to one of the target IMAP folders. If the classification was wrong, just move the mail to the correct folder in your email client, and POPFile will learn from its mistakes.

POPFile has been sorting my mail into four folders named 00todo, 01important, 02later and 03trash for the last week. It now has an accuracy of 78%, and is especially good at getting rid of mailing list threads which I am not interested in.

Installation instructions for Linux, Mac OS X and MS Windows can be found on the QuickStart page. While the IMAP module is labelled as experimental, I did not have any problems with it so far. Contrary to the ImapInstructions, it comes with the standard installation of version 0.22.4. So skip the first part of the page, and start with the "How to get it running" section.

15:30, 16 Sep 2006 by Carsten Clasohm Permalink | Comments (0)

Update 15 Jun 2007: See Dell Latitude D800 Suspend to RAM with Fedora 7 for an updated version of this article.

Suspend to RAM on my Dell Latitude D800 just works with Fedora Core 5 and the free nv driver. Suspend also works with the binary-only nvidia driver, but the display either stays black or shows some fascinating color patterns after resume.

It turns out that fixing this is easy, and well worth it. The nvidia driver not only gives you 3D support, but also feels faster when switching tabs in Firefox.

The following has been tested with kernel-2.6.17-1.2174_FC5 and NVIDIA-Linux-x86-1.0-8774 on a Dell Latitude D800 with a GeForce FX Go5200.

As described in the nV News Forum, the following has to be done:

  1. Append "agp=off" to the kernel line in /etc/grub.conf. This disables the built-in AGP driver and allows nvidia to load its own.

    kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/vg1/root quiet agp=off
  2. Edit /etc/X11/xorg.conf and set the NvAGP option:

    Section "Device"
        ...
        Driver         "nvidia"
        Option         "NvAGP" "1"
    EndSection
    	
  3. Edit /etc/pm/functions-nvidia and disable the "vbetool post" call:

    resume_video()
    {
    	...
    #       /usr/sbin/vbetool post
            ...
    }
    	
  4. Reboot, log in and check if the nvidia AGP driver is used:

    # cat /proc/driver/nvidia/agp/status
    Status:          Enabled
    Driver:          NVIDIA
    	

Suspend and resume should work now.

22:08, 03 Sep 2006 by Carsten Clasohm Permalink | Comments (0)

TrueType Fonts on Fedora [avi.alkalay.net]

Avi Alkalay has written a great document on optimal use of fonts on Linux. Following his instructions, it is easy to get high-quality TrueType fonts on your screen with Fedore Core 5.

First, decide if you want to replace the freetype package with a version in which the Bytecode Interpreter (BCI) is enabled. There may be legal issues with this in your country - see the Freetype page on patents for more information.

Below is a side-by-side screenshot, done with the same TrueType fonts, but with BCI disabled (left) and BCI enabled (right).

BCI Screenshot

The Fedora 7 freetype package with BCI can be found here. For other distributions, see Get a Better FreeType RPM. And don't forget to restart your X server after upgrading the RPM.

The next thing you need is a set of TrueType fonts, like the Webcore Fonts. Before downloading the RPM, be sure to read the legal notice on Avi's page.

All that remains is to configure Gnome, KDE, Firefox, Thunderbird and OpenOffice to use your shiny new fonts. Step-by-step instructions can be found in Configure Your Desktop.

Update 6 Jul 2006: One thing to note when configuring Thunderbird is that it has a list of separate font settings. The default "Western" font setting is only used for mails encoded with ISO-8859. To get the same fonts for UTF8 mails, you have to set the fonts for "Other Languages".

16:41, 03 Jun 2006 by Carsten Clasohm Permalink | Comments (0)

Google Street Maps [www.clasohm.com]

After Google has added street maps for Germany and Austria, I have changed my Google Maps module so it displays the normal map by default and allows you to switch to the satellite or hybrid view. For example, here's where I went for the last hike of this winter: Pürschling

13:29, 30 Apr 2006 by Carsten Clasohm Permalink | Comments (0)

Greasemonkey Script for Bloglines [www.bloglines.com]

Another Greasemonkey script, this time for focusing the right frame on bloglines.com: bloglines-com-focus.user.js

Bloglines has been offering hotkeys for some time, but I still like to click in the left frame to select a feed, and use the Space key in the right frame to scroll through the article list. Problem is that clicking in the left frame leaves the keyboard focus there. This script automatically moves the keyboard focus to the right frame when new content is loaded, getting rid of one annoying mouse click.

10:52, 02 Mar 2006 by Carsten Clasohm Permalink | Comments (0)

Alpine Newsfeed [www.clasohm.com]

I have added another RSS newsfeed. Apart from blog entries and photos, you can now keep up-to-date about the mountains I have climbed. Just look for the Firefox newsfeed icon on the above pages, and use your favorite RSS reader to subscribe.

19:30, 21 Feb 2006 by Carsten Clasohm Permalink | Comments (0)

Firefox PAC IsInNet [bugzilla.mozilla.org]

I currently spend most of my time in a corporate network where I have to use a proxy auto-config (.pac) file.

For some time I have been bothered by Firefox 1.0 and 1.5 shortly freezing for no apparent reason. I tried to disable all extensions, removed the Flash and Java plugins, but to no avail. Today, I accessed a domain with a defunct DNS server and Firefox froze for more than just a short moment, giving me an opportunity to track down the problem.

It turns out that this is a known issue, described in Bugzilla #208287. The .pac file I use contains something like this:

for (i = 0; i < cDirectIPs; i += 2)
  if (isInNet(host, DirectIPs[i], DirectIPs[i + 1]))
    return "DIRECT";
  }
return "PROXY 10.0.0.1:3128;";

isInNet(host, NET1, NET2) checks if the host name from the HTTP request is part of numerical subnet 1 or subnet 2. And this is done 16 times for every single HTTP request in this .pac file.

Even one call to isInNet() can be fatal for Firefox. If the DNS server for the host name is not reachable, the call will only time out after a couple of seconds. And during this time, Firefox will be completely unresponsive. No display updates, no response to keyboard or mouse input.

Bottom line: isInNet() should not be used with Firefox, until someone works on Bugzilla #208287.

10:14, 03 Feb 2006 by Carsten Clasohm Permalink | Comments (0)

Bluetooth Hacking [events.ccc.de]

Last week, I visited the 22nd Chaos Communication Congress in Berlin. One of the presentations was about Bluetooth hacking. My Dell Latitude D800 laptop was suspended and stowed away in my backpack, but during one of the live demonstrations, its corporate Intranet name appeared on the presentation screens. As indicated by the blue light, Bluetooth is still active on the D800 even in suspended mode. And I didn't bother to change the default configuration.

While the laptop didn't get hacked, I prefer to not broadcast the company and office I work for while walking around. If you use the bluez-utils RPM, this can be prevented by changing the default /etc/bluetooth/hcid.conf as follows:

# Default settings for HCI devices
device {
    ...
    # Local device name
    name "foobar";
    ...
    # Inquiry and Page scan
    iscan disable; pscan enable;
    ...
}

The default name is "%h-%d", which is the host name and device ID. Depending on your network configuration, this can reveal quite a lot about where you come from. Also, inquiry scans are enabled by default, so anyone can detect the name of your Bluetooth device.

After you have changed the configuration options, run service bluetooth restart to active them.

11:20, 07 Jan 2006 by Carsten Clasohm Permalink | Comments (1)

RSS

Archive

January 2006
S M T W T F S
7 
10  11  12  13  14 
15  16  17  18  19  20  21 
22  23  24  25  26  27  28 
29  30  31         
September 2008
July 2008
June 2007
May 2007
March 2007
January 2007
December 2006
September 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
January 2005
December 2004
November 2004
October 2004

Blog Categories

Hiking (5)
Desktop Linux (28)
Server Linux (5)
Palm (3)
Photography (5)
Politics (2)
Web Applications (15)

Notifications

Request notifications

Syndication Feed

RSS

Recent Comments

  1. Anonymous Visitor: Thanks
  2. Anonymous Visitor: AT&T U.S.
  3. Anonymous Visitor: All went well under CentOS 5.0 in Croatia (VIP network)
  4. Anonymous Visitor: tmp crypt not necessary
  5. Anonymous Visitor: Great article
  6. Anonymous Visitor: So it's not a Virus...
  7. Anonymous Visitor: Thanks! Helps also on Windows!
  8. Anonymous Visitor: Thank you
  9. Anonymous Visitor: Economic Incentives
  10. Anonymous Visitor: thank you