Archive for the 'Howto' Category

OpenOffice.org/X11 tips

Marc Liyanage - Software - Mac OS X Packages - Tips and Documents - OpenOffice on Mac OS X:

Along the way, I also had to tweak some font settings and libraries to get our corporate font working and to fix the ugly font rendering in the OpenOffice GUI, so that it is easier on my X11-weary, Aqua-spoiled eyes :-)

This page has some excellent tips for X11, and OpenOffice.org on X11, in particular. For example, you can use the command key for keyboard shortcuts, and you can drastically increase the font rendering in OpenOffice (it looks just like NeoOffice).

Update: Got a screenshot. I wish I had thought to take a before shot, but if you install OpenOffice.org for the Mac, you’ll see the difference.

X11Render

Working with i-Packages locally

i-Packages are compressed sets of files and instructions used by i-Installer, the open-source package management utility used by many to install, update and remove gwTeX (the standard LaTeX distribution for OS X) and related programs, such as fondu, ghostscript, etc. It’s a good system, since the files that must be downloaded are very large, and a nontrivial amount of configuration is necessary to get things working correctly.

But something always bothered me about i-Installer: it mostly requires an internet connection for it to work. Obviously you need the connection in order to download the software, but for removal too? What if, when WWIII starts and all of the ISPs go dark, I decide I don’t want LaTeX on my system anymore?

I finally figured out how to work around this annoyance (at least for most i-Packages). Normally when you install an i-Package, a few basic files are installed on your computer, and the rest are left on the server, since they’re not all necessary. This is efficient: you spend less time downloading, and the mirrors spend less time serving up data that you don’t really need. But by opening i-Installer, selecting an i-Directory, then opening the desired i-Package, you can choose to download the entire archive, including the configuration and installation instructions.

To do this, select Make Fat from the i-Package menu:

Makefat

Then the entire i-Package will be downloaded[*]. If you want to modify the package, even with no internet connection, you can double click on the ii2 file (the i-Package itself) which will open i-Installer and allow you to perform any of the actions for which scripts have been written for that package.

The reason why I think this is important is that, because of their Linux roots, most of the LaTeX-related programs for OS X are installed directly in the BSD subsystem (/usr/local, to be exact), so uninstalling them is most definitely not a matter of dragging the application to the trash.

Anyway, with this new-found knowledge, I have become a born-again gwTeX/TeXShop user[**].

[*] i-Packages are stored in ~/Documents/i-Packages.
[**] As an aside, I have also discovered TeXShell, a frontend for gwTeX and teTeX on OS X that works just like CMacTeX — drag files onto the icon and they are processed by LaTeX (or send them to TeXShell from within TextWrangler using an AppleScript). Very convenient.

Free, full screen QuickTime hack

Just make a new script containing this:

tell application “QuickTime Player”
present front movie scale screen
end tell

Play your movie and run the script.

Via Macworld: Mac 911: Full screen for free, via Lifehacker.

OS X tip: Use file comments

This is my first real contribution to the GTD world, hope it helps some people out. I frequently work with directories containing hundreds of files. For example, I might have a directory with ten consecutive versions of the same doc file, all with very similar names, as well as ten consecutive versions of ten different spreadsheets. Sometimes it can be difficult to keep all the files straight — which one is the current one? Which has that one piece of critical information?

To make matters worse, I often leave a big project for a month or more before coming back to work on it again. While I may have had an accurate mental map of all of the files when I was working with them actively, after a long break, it can be almost impossible to find a particular version of a particular document without opening each version and scanning it. And that is exactly the kind of mind-numbing work that leads me to procrastinate.

Enter file comments. On OS X, every file in the finder can have comments appended to it by accessing File > Get info, or by hitting command+i. This is what the dialog looks like:

Info

Notes written in the Comments field can be viewed from within Finder by:

  1. Setting the Finder to View as list (shortcut: command+2)
  2. Selecting View > Show view options (shortcut: command+j) and checking the Comments box

Once the view is set properly, you will see something like this:

Comments

The comments are in the far-right column. They can be used to quickly identify the contents or status of a particular file or folder (or for a million other things, I’m sure).

Of course, you have to remember to keep the comments current, but I can’t help you (or myself) with that.

Let’s see your Windows PC do this

Apple - Pro - Tips - Two Seconds to Sleep:

Want the fastest way to put your Mac right into a deep, sleepy-bear hibernation-like sleep (no whirling fan, no dialogs, no sound — nuthin’ — just fast, glorious sleep). Just press Command-Option and then hold the Eject button for about 2 seconds and Zzzzzzzzzzzzzz. It doesn’t get much faster than that.

The tip comes from Lifehacker.

And if you’re keeping score, yes, I’m just rummaging through my RSS feeds and blogging about the cool posts. And if you’re keeping an even more accurate score, yes, I’m blogging a lot, which means that I have work to be doing.

Making a disk image

After reinstalling my most beloved applications on my iBook, I decided to make a CD containing them all in case I ever needed to load them all at once again. Some of the applications are large, so they needed to be compressed in order to fit on one CD. In the process I learned that zipping or tarring and then gzipping certain OS X binary files renders them unreadable by OS X (I think this only applies to Carbon applications, but I’m not sure what the underlying reason is).

So, in order to get everything on one disk, I had to create a new disk image, which I had never done before. Here’s the basic process:

  1. Copy them all to a folder
  2. Open Disk Utility and create a new custom-sized disk image
  3. Copy the entire folder to the disk image
  4. Eject the disk image then zip the entire thing using DropCompress to get it to fit on one CD

The last step was only necessary because I couldn’t fit all of my files onto a CD-sized disk image.

Ubuntu, iBook and ethernet

When I first installed Ubuntu Dapper on my iBook, I couldn't get the ethernet connection to work. Searching the forums gave this pearl: add the lines

genrtc

bmac

to the top of "/etc/modules." Beautiful, it worked. I'm not sure what it all means, but it worked. 

Putting feeds on your blog

Biz Stone has instructions on how to display RSS feeds on your blog using FeedBurner. I was not aware that they offered this service. Previously I had tried all sorts of RSS to Javascript services, which can be unreliable. You can count on FeedBurner.

The gist:

  1. Get a FeedBurner account if you don’t have one
  2. Get the RSS feed that you want to display and “burn it” (have FeedBurner process your feed for you)
  3. Click on the feed, then click on Publicize. Then click on BuzzBoost and select the options that you want for your blog
  4. Finally, copy and paste the generated Javascript into your template

Of course, if you have a WordPress.com blog, all you have to do is paste the feed URL into an RSS widget under Presentation: Sidebar widgets.

OS X application launching

Periodically, for whatever reason, I’ll encounter a situation where every time I open a file from the finder, I get an error message that says “This will launch [application] for the first time.” But after I hit okay, I get the same message the next time I click on a file with the same extension. I’m not sure what causes this, but this is how to fix it:

1. Download OnyX, the free OS X system optimizer[*]

2. Use these settings

Onyx Clear

I’m not sure if it’s the repair permissions or the locate database that needs fixing, but one of them gets the job done.

[*] You don’t need OnyX to do this, but it’s the easiest way, and it has other utilities as well.

Cool OS X tip

If you copy a bunch of files in the Finder, the file names are stored in the clipboard as a text-based, carriage return-delimited list. Useful for programming — you can copy a bunch of files, fire up your text editor, and paste the file names right in.

Next Page »