Archive for the ‘Open Source Software’ Category

Getting a Secure Web Server (https) on Mac OS X 10.5

Tuesday, July 1st, 2008

WebDevel.jpg

I found this article on MacOSXHints.com about how to set up the default Apache web server with https functionality along with the standard http service. It references another hint that really does all the work of creating the certificate, and this hint is really just how to use that certificate with the latest Apache2 that's on Mac OS X 10.5.

It took me all of about 10 mins. to get the files created and then a few minutes to fix up the Apache2 config files. Pretty nice, really. I haven't done any https work in a few years, but I remember it being a lot more complicated than this to get Apache configured for the SSL work. The certificate was always about a half-dozen commands that you never remember so you always look them up and do it once every ten years or something.

I'm not sure if this is a big deal, but it's nice to have the option again of being able to do some https work, if I need to.

A Couple of Updates – Acorn and NetNewsWire

Wednesday, June 25th, 2008

acorn.png

This morning Acorn v1.2.1 was released with a lot of bug fixes and no real feature enhancements listed in the release notes. I hadn't noticed a lot of issues with it in my usage, but after reading the release notes, it was clear that there were some drawing/rendering and such issues that would have annoyed me, had I been using those features in my daily work.

Glad they fixed them, and got a new release out. Interesting aside, I noted on Twitter that Gus was doing the build of 1.2.1 as he was tweeting about it. A few hours later - Bingo! a new release. Twitter is the portent of new releases. Cool.

NetNewsWire.jpg

Also this morning, NetNewsWire v3.1.7b1 was released with the singular bug fix of working much better with Growl, which I use every day for all kinds of notifications. I hadn't noticed any real performance hit, but there must have been something significant going on or there would not have been the need for the fix (and update).

So... good enough. Polish on an already nice app - can't beat that.

Odd Cacheing Issue with MarsEdit and WordPress

Tuesday, June 24th, 2008

MarsEditIcon128.jpg

I noticed today that my image of the Firefox app icon had a black pixel on the lower-righthand corner of the image. I pulled up Acorn and fixed it, and moved it to HostMonster, and it looks fine if I hit it directly from a web browser. I also copied it but in MarsEdit and removed the old thumbnail image to let MarsEdit re-create it, and still... in MarsEdit's Preview Pane, the old image remains. I'm stumped.

So I posted a message to the MarsEdit online forums and got this reply back from Daniel:

Hi Dr Bob - try deleting the MarsEdit cache folder that is creating by WebKit:

[Home] -> Library -> Caches -> com.red-sweater.marsedit

I'm not sure why some items are cached so aggressively even when they've changed.

So I tried that... still the old image remains. In fact, after stopping/starting MarsEdit a few times the directory is never created. This tells me that this is not only not the place the image is being held, it's not even used for what the author expected.

I'm at a bit of a loss to understand where the old image is being held. It's not on the web server, it's not in the cache I just deleted, it's not in the MarsEdit application support data... I'm stumped. And yet I'm sure it's still there. I can see it. Every Firefox post has this image and it's that way in the preview pane of all of them.

Bugger. I'm going to have to see if I can force MarsEdit to reload things. Or I'm going to have to find out where the image cache is really located and wipe that image out.

[1:15 pm] UPDATE: I've cleared the Safari cache, I've verified that the images on the web site are the correct ones, so it's a simple matter of my laptop thinking that the file hasn't changed, and therefore, not to reload it for MarsEdit. I've updated the post on the support forum to say what I've tried and what hasn't worked, and I guess I'm going to have to wait for another idea. Googling 'image cacheing WebKit "Mac OS X"' gives me nothing of real relevance, and too much noise. So I'm going to have to live with it until it thinks the image needs to be replaced.

[2:00 pm] UPDATE: Daniel suggested looking for a 'MarsEdit' directory in ~/Library/Caches/ and deleting that. There was one there as well - with lots of stuff in it, but removing it didn't effect a thing. Also, it was not recreated after several start/stop cycles. Very odd. I've updated the thread on the forum and we'll see what he comes back with.

[2:30 pm] UPDATE: I've removed the old Ranchero MarsEdit defaults, and while I didn't think they were doing anything, I didn't want to take the chance. Also, the icon database in ~/Library/Icons/WebpageIcons.db didn't hold the key either. I removed that, restarted MarsEdit, and still no difference. Wherever these images are, they are pretty well hidden. I looked at the defaults for the app and say nothing that would point to a different directory. It's a real stumper, I'd say. I think I'm giving up for now. I'm just running out of ideas.

[4:30 pm] UPDATE: it turned out that if I reloaded the page in the Preview pane, the same bad image came back. But if I reloaded it again then on the second reload, the right image was there. So, lesson learned - reload a few times to make sure you get the very latest.

[6/26 3:43am] UPDATE: it turns out from this article that in 10.5.2 Apple changed the location of the WebKit cache from ~/Library/Caches to /var/folders - not for any reason of security but simply performance - the home directory could be on a network drive but /var is on the machine itself. So, to clear the cache, you have to clear out /var/folders. Unfortunately, it's not easy to find the cache entries, and you have to really search (ala find) to find the ones you're looking for. FOr this case, it's:

  pushd /var/folders
  find . -name \*marsedit\*

and you'll find the directory you're looking for. Delete that, and the cache is gone.

Viewing PDF Files Inline in Firefox 3.0

Tuesday, June 24th, 2008

Firefox.jpg

With this plugin, you can now view PDF files in a Firefox 3.0 browser window. While I'm not a huge fan of PDFs, they are a popular way of getting out a stylized page, and reading them in Acrobat, or a stand-alone Preview window isn't as nice an experience as seeinf them in-line in the browser. So when I saw this plugin I got it right away.

No time like the present to get things off to a smoother start. With Safari in Mac OS X 10.5, I've really liked the way Preview shows PDFs in the browser window. Very fast, very clean, and less of a horrible kludge that is Acrobat in Safari. I wonder why Adobe doesn't work harder at making the experience with their tools better? Odd. Anyway, I've liked the Safari/Preview combo, and now I'll have a similar set up with Firefox. Excellent.

Problem with iWeb and Firefox 3.0

Tuesday, June 24th, 2008

Firefox.jpg

I caught this story this morning about the problem with a Javascript bug in iWeb and how Firefox 3.0 fixed it and broke the usage in iWeb. It's not a blame game but if you want to get the Photo Galleries in iWeb fixed, you're going to need to get a new Javascript patch from the site and install it on your iWeb site and then the Photo Gallery and Blog postings will work.

I'll have to remember that for the Kids' iWeb pages. I can't imagine that it's going to be that hard to update, so I'll try to get it done this evening - or at latest, this weekend and let them re-publish to the web. Glad that someone is following these issues. I'm sure there will be an iWeb update soon to fix this.

MacVim Updated to Snapshot 32

Tuesday, June 24th, 2008

MacVim.jpg

I've been using MacVim for a few months, and reading the mailing lists about features, updates, etc. It's interesting stuff to listen to people that are as into Vim as I am my family. It's amazing how much these folks know about my favorite editor. Today the team released Snapshot 32, and with this, they hope to be turning back on the Sparkle updating from Google Code. It's been turned off for the last few updates because of issues, and they are thinking that they have them solved, and are back on track for enabling them again. We'll see how well the update is received.

I'm excited about it... and learned a new thing about .vimrc files today - you don't include the colon in each line. The guy on the mailing list pointed out that Chapter 5 of the manual points out that you don't put in the colon (':') but everything after it. So I went through my .vimrc and cleaned it up and it's working perfectly. Not that it wasn't before, but there was someone that had a problem, and this makes sure I don't run into that kind of problem later. Nice.

Updated to gfortran 4.4.0 (May 2008)

Friday, June 20th, 2008

fortran.jpg

This morning I was doing a little checking on the projects I keep loose tabs on, and one is the gfortran compiler for Mac OS X. I've chatted with Gaurav, the maintainer, a few times and it's really nice that he's taking the continued effort to keep updating this package. I'm guessing he's using it in his work at the university, but I could be wrong.

I did a make clean; make on shark to see if there were any issues with the compiler, and there weren't any. Ran fine. Thanks Gaurav.

The MacResearch.org guys have a package for installing that has this as well as an Xcode plugin for building gfortran code in Xcode, but I'm more of a vi/Vim and makefile user for FORTRAN coding. Just don't really need the extra stuff at this point. But it's nice to know it's there, if you need it.

Nice Firefox 3.0 Themes for Mac OS X

Friday, June 20th, 2008

Firefox.jpg

This morning I was checking on the status of a few projects I follow, and I noticed that someone had a link to these fantastic Firefox themes that make Firefox 3.0 look virtually identical to Safari - which is not a bad thing. Personally, I like his 'GrApple Yummy (blue)' best, but I got all four and might switch up if I decide I need a different look.

Typically, I run Firefox and Safari side-by-side because the things I do in Firefox I want to keep around, and Safari is the general web tool. For example, I have a few pages up to my hosting provider all the time - checking on the state of things there, and for that, I want Firefox for it's completeness and support. But for Googling things and hitting the web-based docs and manuals, it's Safari. Because of that, I have to restart Safari a few times a week just because it gets so bloody big a memory footprint.

Anyway, give these themes a try on your Mac - they are pretty spiffy.

Growl 1.1.4 is Released

Thursday, June 19th, 2008

growlicon.png

I had an interesting message from Growl today about Growl - that version 1.1.4 was out and available for updating. The release notes don't make it sound like a ton of new features, but the things that they did fix seem important - core issues about installation and updates to a few localizations as well as fixes to the Mail and Safari components.

Not really amazing, but it's nice to stay up-to-date. And I use it every single day.

Cool MacVim Additions to My .vimrc

Thursday, June 19th, 2008

MacVim.jpg

I've been using MacVim for a while and it's really quite amazing. It's Vim as nice as Vim ever was, but it's also a complete Mac app with multiple windows, tabs, toolbar - everything you'd expect from a Mac app. It's really quite amazing.

That said, I've been fiddling with the .vimrc file to try to get it to do a few interesting things. I just thought I'd post them so that if I needed to look them up, I'd have them written down.

Switching Tabs

One of the nice things someone suggested was the ability for Cmd-1, Cmd-2, etc. to move to tab 1, 2, etc. like Firefox does. Cool! I thought, as this will keep my hands on the keyboard even more. The remapping of the key is really two parts: what key combination to use, and what to remap to it? The first answer is that <D-1>, <D-2>, etc. for Cmd-1, Cmd-2, etc. The second part os the command :tabn. Together, these fit into the .vimrc like:

  if (has("gui_macvim"))
    :nnoremap  :tabn 1
    :nnoremap  :tabn 2
    :nnoremap  :tabn 3
    :nnoremap  :tabn 4
    :nnoremap  :tabn 5
    :nnoremap  :tabn 6
  endif

Decent Colors

I know it seems silly, but I've really become used to the colors I've used in Vim over the years. They are called the 'torte' color scheme, and even that's not 100% - the cursor and search colors aren't really right, so I fix them up as well:

  if (has("gui_macvim"))
    :colorscheme torte
    :hi Cursor guibg=red
    :hi Search guibg=orange
  endif

Setting the Tab Name and Current Directory

I wanted just the filename in the tab and not the complete path - even truncated. Also, with a simple autocmd I can make it so that every time I change the buffer (file) I will make the current working directory the directory of the file in that buffer. It's an easy way to make sure that it's easy to add other files from the same directory.

  if (has("gui_macvim"))
    :autocmd BufEnter * :cd %:p:h
    :set guitablabel=%t
  endif

None of these are really earth-shaking, but they do make it a lot nicer to use Vim, and it's amazing that they are all very simple configuration file changes. Amazing tool Vim, and what they've done with it for MacVim.