Friday, December 28, 2012

LibreOffice OS X vs. LibreOffice Linux on PPC

I tried to like Abiword. Really, I gave it the old college try, but in the end I had to admit I...what's the phrase I'm groping for...utterly despise it. It's onscreen font rendering, especially monospace fonts, is terrible. Formatting large documents often caused freezes. And despite being the "lightweight" alternative to LibreOffice, it felt slow and clunky like it was ported from somewhere else, not a native Linux application. Which brings me to one of the tangential subjects of this post--the dearth of word processors on Linux.

On OS X there are the big ones, Microsoft Office, LibreOffice, Pages, etc., and there are also several lighter alternatives like Bean and iText Express, to name two. However, on Linux there's basically LibreOffice, Calligra (KOffice), and Abiword. There used to be TED, which was a lightweight RTF editor, but after being unmaintained for years it was dropped from Debian's repositories. There was just recently an update, though, but Debian hasn't reintroduced it due to the author's lack of clarity on licensing issues. I decided to waste fifteen minutes of my life compiling it only to get errors, and sure enough, it exited with errors. So here I was basically left with LibreOffice as my only fallback. Thankfully LibreOffice is a much different (and better) performer on Linux than on OS X, and I've found I can use it for actual composing and not just formatting after the fact.

Usually in OS X when I write something, I use iText Express for the actual writing and then switch to LibreOffice or a dated Microsoft Word if I need to perform advanced formatting. LibreOffice on Tiger is just too slow to actually write on. Writer uses about 130-140 MB of RAM and also has a few display bugs in monospace fonts. Em-dashes typed as "--" are displayed as "—" in Courier, though when you save and open it in another word processor, it will show the correct "--". Also, Courier and Monaco have a spacing problem with "f" followed by "i" detailed in this bug report (UPDATE: These bugs have been fixed). And it suffers from the same slight font blur I talked about in this post on OpenOffice Aqua. Not to totally slag LibreOffice. It still supports Tiger PowerPC and still works despite the quirks.

On Linux, though, LibreOffice is much snappier. Despite being on the same PowerPC hardware, Writer uses about 90-100 MB of RAM and has fast scrolling and selecting of text, none of the clunkiness seen on OS X. Also none of the font problems I mentioned above. This is something I can actually compose on. Just make sure to install it alongside the libreoffice-gtk package for GTK integration. It's a bit similar to Mozilla products, where Mozilla applications have always been more lightweight and snappier on Linux than on OS X on the same PowerPC hardware. Cool!

I still don't get the Abiword thing. It's pretty much universally praised elsewhere, so maybe it's a PowerPC thing. Also, if you're looking for one of those WriteRoom clones for Linux, FocusWriter is good. It's not strictly a word processor as it lacks page margins and a ruler, but it has basic rich text formatting like bold and italics. Overall it's a great tool for getting writing done.

Thursday, December 13, 2012

Some Ogg Vorbis Tools for Your Mac

When it came time to choose a format to encode my audio CDs with, I could have set up my own double-blind testing regimen and carefully tabulated the results in a spreadsheet, but the good folks at Hydrogen Audio already did that so why reinvent the wheel? Their conclusion was that Ogg Vorbis offered the best sound for lossy formats, better than MP3 LAME, so that's what I went with.

Obviously Linux comes with support for encoding and playing .ogg files out of the box, but on OS X you have to download a couple of tools first. To play .ogg files in iTunes, download Xiph.org's Quicktime Components (also, check out their FAQ for info on using it with 64-bit Macs). Afterward, you may notice your .ogg files are out of order when added to your playlist. To fix this, download Rescan QuickTime metadata 2.scpt.zip (the second one on the list)* from this page, unpack it, and add it to your home/Library/iTunes/Scripts folder (UPDATE: this script works in iTunes 7, but not 9, I didn't try it with 8). When you restart iTunes you'll notice the item "Rescan QuickTime metadata 2" in the scripts menu. Next, just highlight the songs you want fixed, choose the script from the menu, and your songs will magically be re-arranged in the correct order.

For encoding .ogg files, I'd been using Max for awhile, but recently it failed to look up a CD's metadata. Maybe the MusicBrainz server was down, but since Max was getting long in the tooth (last update 3+ years ago), I went looking for something newer. I went straight to X Lossless Decoder and saw their latest update (10/27/12) still supports Tiger PowerPC. Cool!

(UPDATE: I found a bug where embedding cover images in Ogg Vorbis files makes about half the files play only silence. My simple workaround for now is to disable embedding cover art in the preferences. I'll file a bug report and see what the maintainer says.) The Xiph plugin and my version of VLC were old and don't support METADATA_BLOCK_PICTURE. Newer decoders work fine.

One thing about encoding in the program, by default it dumps all the files into the parent music folder you choose in the preferences. However, if you want to organize your files in separate /Artist/Album folders, you need to go to "Format of filename" in the General preferences and add "%A/%T/%n - %t" to the text field. The forward slashes will create folders.

X Lossless Decoder prefrences

And for playing .ogg files on an iPod? Rockbox will let you do that, though it's not yet compatible with all models. And if you have something newer like an iPhone or iPad, ditch it and get an Android device that isn't crippled out of the box ;)

*Also, this page has an iTunes script that combines the metadata rescan with ReplayGain, though ReplayGain requires vorbis-tools be installed "(e.g. through Fink)."

Friday, December 7, 2012

Sharing Files Across OS X, Classic, and Linux Macs

If all else fails, there's the cloud. But if you want something faster, say a home network and you have a mixed environment with Tiger, Lion, OS 9, and Linux Macs to share files on, you have several options to play with.

Target Disk Mode

If you don't mind rebooting and need to move large files quickly, Target Disk Mode is a good option. Target Disk Mode works on any Mac with native firewire. Just start up holding the "t" key, attach it to another Mac via firewire, and it will automount as an external hard drive on Macs running Mac OS 8.6 or later, and on any recent Linux distribution, too.

AFP

Another option is AFP (Apple Filing Protocol). This is the "Personal File Sharing" option in OS X's Sharing preferences. After Tiger it was changed to just "File Sharing," which is also the name of the corresponding control panel in OS 9. In Linux, you need to install the Netatalk package for AFP client and server capabilities, no post-install configuration necessary unless you want to do something fancy;)

For sharing between OS X machines, just activate the File Sharing option on the server side, then on the other Mac choose "Connect to Server..." from the Finder's Go menu, enter its router IP address (afp://xxx.xxx.x.xxx), followed by the server machine's administrator name and password. To connect a Linux machine, go to the network folder in your file manager and where you see your host's network icon, double click it and enter name and password. If you don't see the icon you can also enter the IP address in the text field.

When adding OS 9 to the mix, there are a few caveats. Apple has been deprecating legacy Appleshare and Apple Talk services like crazy, so a lot of the older stuff doesn't "just work." I can say that I can network with Tiger and Linux hosts using the Network Browser application in OS 9. And when using OS 9 as a server, make sure the TCP/IP box is checked in OS 9's File Sharing control panel. With Snow Leopard, I could only connect to an OS 9 server, not the other way around. It may take some trial and error to figure out what works on your setup, especially if you have Snow Leopard and up, but I'll leave you some links:

This System 7 Today link shows how to network System 7 and Leopard.

A 68k Macintosh Liberation Army thread goes through a lot about Lion and old Macs, and down thread has a hack to replace Lion's AppleFileServer.app with Leopard's to enable connecting with OS 9.

Also, Lion deprecated older AFP authentication methods causing connections to fail, so look here to re-enable them.

And a last note about Netatalk on Linux, there's a bug which causes it to sometimes use 100% cpu after the server side disconnects, forcing you to kill the background process. Maybe one of these days they'll fix it:)

SSH

There's also SSH and SFTP (SSH File Transfer Protocol). The server side is activated in OS X with the Remote Login option in the Sharing preferences. Linux systems usually have the client and server software automatically installed with the openssh-client and openssh-server packages. As far as clients go, Cyberduck is a great SFTP client for OS X (3.2.1 for Tiger available in their changelog section). There's Filezilla or bareFTP for Linux, or you can even connect through a file manager. And there's an OS 9 SSH client called Nifty Telnet SSH.

There's also ftp, but that's too boring to write about, har. And if you're transfering files from OS 9, check out my post about resource forks.

Thursday, November 29, 2012

Latest Flash "Update" for Macs

Flash on PowerPC is horribly insecure as it hasn't been updated since version 10.1, but since some sites like the BBC require it for their videos, some people insist on still using it. However, more and more sites are requiring version 11.5, and since we're no longer getting updates, users have to rely on a version string hack to get their 10.1 plugin to spoof itself as 11.5. MacRumors Forum member Wildy has made the latest hack available here. Again, it's the 10.1 plugin merely spoofing itself as 11.5.

I don't personally use flash anymore, but to make it slightly less insecure you should uninstall the plugin from your system's /Library/Internet Plug-Ins folder and put it in ~/Library/Internet Plug-Ins (the ~ denotes your home folder if ya didn't know). That way it's not installed system-wide for other users to stumble on. Also, you should run a browser with a flash blocker so you are only loading videos you specifically click on. Camino has a flash blocker in its preferences, Safari/Webkit has Click-to-Flash, and TenFourFox has the Flashblock or NoScript add-ons. None of this is guaranteed protection, keep in mind.

If you want to move completely beyond flash as you probably should, you can go over to Life without Flash: share your tips and tricks, a thread started by B-G. Also, for Linuxers, there's this Crunchbang forum thread with some useful info. And there's also my favorite little tool, quvi.

Monday, November 26, 2012

iTunes Alternative for Linux

For most of my music playing needs in Linux, I've relied on Audacious. It's a perfectly solid player that has the advantage of using relatively little memory. In a world where almost every Linux application is described as "lightweight," it's actually lightweight. But it lacks a few advanced features, most notably iPod support. Here's where Banshee comes in. Banshee is an advanced music player if you're looking to replace iTunes that has a similar and attractive feature set.

Banshee on Debian

As you can see from the screenshot above, it has pre-installed plugins for downloading album art and iPod support and has an interface instantly familiar to anyone who's used iTunes. It also has a context pane you can pop up which shows links to similar artists. In syncing an iPod, I found you have to mount it manually in a file manager, if your desktop doesn't automount, before it'll appear in Banshee. But otherwise syncing works as expected. I also tried syncing an iPad running iOS 5 from the instructions on this page and some troubleshooting advice here, but it didn't work. Though I could mount the iPad in a file manager, it's appearance in Banshee was purely decorative;)

Banshee is built on the Mono framework, so it's not native GTK, but I didn't notice any speed deficiencies. It'll use about 60 MB of RAM, so it's not lightweight like Audacious, but the extra features are impressive. The only issue I had was enabling the equalizer gave me stability problems, but an equalizer isn't a big deal to me.

Rhythmbox and Exaile are similar players, but I found them lacking in a few ways. Rhythmbox is a little too simplistic and hard to configure. Album art fetching doesn't work out of the box and Google tells me it would take some effort to get it running. Also, it too has a context pane, but you have to be a paid subscriber to Last.fm to use it. Exaile comes with an iPod plugin which I couldn't get to do anything. I also had stability issues when changing the volume mid-song, and Exaile doesn't use its screen real estate well. And if you only want iPod syncing, there's gtkpod, but I found it extremely slow and the layout was confusing.

One last note on iPod support, the iPod Touch supposedly won't work because it doesn't mount like a typical usb storage device (thanks, Apple). Instead you have to go through hoops like with the above link to get it to mount, and even then getting it to sync is far from certain. In that respect, Touches are like iPhones and iPads, a pain in the rear for open sourcers. Best to quit fiddling with Apple and get a real usb device that mounts like one.

Sunday, November 18, 2012

Some Random-ish News

I just noticed that Intuit announced their tax program TurboTax will no longer support PowerPC and will now require 10.6.8. Nooooooooooooooooooooooooooooooooo! Although I was a bit surprised to see the company VP show up in this MacRumors Forum thread to explain the reasoning. It's just jarring that they're going from supporting every Tiger-capable Mac going back to the '90s to now only Snow Leopard. On the plus side, there's always TurboTax Online, and they also have an iPad app.

In more Linux adventures, I've been troubleshooting a couple of glitches with pulseaudio, which got installed as a dependency to Cairo-dock. Pulseaudio is like a face hugger from the Alien movies. It latches onto your system and it won't let go. Anyway, I fixed some problems and wrote the solutions in the sound section here in case you're interested.

And charging a Kindle on your Linux box is a lot less complicated than other web pages say. Many posts say you need to use the eject command from the command line for it to begin charging, but I found just clicking the eject button in PCManFM works, too (the Kindle mounts in /media/Kindle on Debian Wheezy, FYI). Now I just have to figure out the iPad.

Saturday, November 10, 2012

A Little About Resource Forks

"Resource forks are deprecated anyway and they will sooner or later disappear alltogether." "Sorry, this is deprecated."

That's right. I've been deprecated. I will disappear sooner or later anyway, and well, I should just go die already. You see, I have files with resource forks on my various computers and hard drives. And when resource forks aren't supported in file transfer applications like Cyberduck, they get destroyed when transferring between computers. And when resource forks get destroyed, sometimes the whole file is rendered unusable. So I thought I'd put up a little reminder that when transferring or backing up files with resource forks, you need to take steps to preserve them.

First a little background. Resource forks are mostly a relic from the classic Mac OS, though they also exist in OS X, that stored data on a file apart from the data fork. So each file had two forks, only one of which (the data fork) would be recognized on non-Mac systems. On normal files like .txt's or .png's this wasn't a problem because whatever was in their resource forks (custom icons?) wasn't required to open them. But for applications, Disk Copy images, and font files, this was a big problem because their resource forks contained data necessary for their operation. So say if you moved a Mac application to a Windows hard drive and then back again, it wouldn't open because the resource fork was stripped in the process.

So don't move around Mac files on non-Mac file systems, right? It's not quite that simple. There are a few other dangers to be aware of. First, when networking files you must use AFP (Apple Filing Protocol) which is implemented by the Personal File Sharing option in your OS X preference pane and in OS 9's File Sharing control panel. For Linux systems you will need to install Netatalk and then access the network drives in Nautilus or PCManFM (Thunar chokes on AFP networks). The one other networking option is the SSH associated scp -E command where the -E option preserves resource forks, but both machines must be running Tiger or later so the practicality of that is limited.

Besides networking, there's also backing up to disc. When burning files with resource forks to a DVD or CD-R, they must be recorded on a Mac filesystem. Burning in OS X's Finder will accomplish this, making what's known as a Mac + PC hybrid disc that's readable on both Macs and PCs. If you're using another burning application like Burn, don't use the PC or iso9660 option. You must use either Mac (HFS+) or Mac + PC (FYI, Mac + PC hybrid discs will automount in Linux, but Mac-only discs will not).

If none of this is an option and you have to upload files on a non-AFP network or a non-Mac filesystem, you can still preserve resource forks by compressing the file(s) in a .sit container. There's also documentation that says tar can do this, but don't use .zip. The only zip application that handles resource forks is MacZip for Mac OS 9, and it must be used for both compressing and unpacking (OOPS: BOMArchiveHelper in Tiger can create zips that preserve resource forks, too. It's the app used when you right click on a file and choose "Create Archive of..." Just make sure to unzip them with the same app which is the default when double-clicking--Credit to ClassicHasClass).

rsync I'd have to look into. From what little I've read on this, it looks possible but messy.

Just to reiterate, you don't have to preserve resource forks on normal files like .jpg's or .mp3's unless you have something like custom icons you want to keep. Resource forks are only essential for OS 9 applications or fonts or Disk Copy images (and possibly Hypercard stacks?). And it's not wholly limited to OS 9. Certain OS X files like .webloc and .textClipping files store all their data in resource forks or extended attributes, too.