Concern » os x http://metastatic.org/text/Concern In Which We Worry and Complain Out Loud in Our Outside Voice Sat, 05 Sep 2009 16:33:34 +0000 http://wordpress.org/?v=2.8.4 en hourly 1 Color Picker http://metastatic.org/text/Concern/2009/01/26/yo-like-pick-a-winner/ http://metastatic.org/text/Concern/2009/01/26/yo-like-pick-a-winner/#comments Tue, 27 Jan 2009 04:12:25 +0000 Casey http://metastatic.org/text/Concern/?p=493 I got a little fed up using some other app to open up a color picker, so I threw together an app that just gives you a color well.

I’m 90% certain that if you don’t use it on my computer, it will throw some bullshit exception about color spaces. Anyway. It’s neat that you can write OS X applications in Python now.

]]>
http://metastatic.org/text/Concern/2009/01/26/yo-like-pick-a-winner/feed/ 0
Fixing screen on Mac OS X Leopard http://metastatic.org/text/Concern/2009/01/24/fixing-screen-on-mac-os-x-leopard/ http://metastatic.org/text/Concern/2009/01/24/fixing-screen-on-mac-os-x-leopard/#comments Sat, 24 Jan 2009 20:34:08 +0000 Casey http://metastatic.org/text/Concern/?p=486 screen is a wildly useful little utility that lets you “multiplex” a terminal window: that is, you can have multiple shells open in a single Terminal window.

(I hear you about to say “tabs,” but please, STFU. screen is better.)

The problem with screen on Mac OS X Leopard is that it breaks a whole hell of a lot of things, notably it clobbers your PATH variable, and it makes things like TextMate’s mate command not work (you just get the error mate: failed to establish connection with TextMate.). Part of the issue seems to be one of the patches apple makes to screen, in particular:

--- screen.c.orig 2007-03-15 14:42:59.000000000 -0700
+++ screen.c 2007-03-15 14:42:10.000000000 -0700
@@ -101,6 +101,11 @@
 
 #include "logfile.h" /* islogfile, logfflush */
 
+#ifdef __APPLE__
+#include <vproc.h>
+#include <vproc_priv.h>
+#endif
+
 #ifdef DEBUG
 FILE *dfp;
 #endif
@@ -1211,6 +1216,11 @@
   freopen("/dev/null", "w", stderr);
   debug("-- screen.back debug started\n");
 
+#ifdef __APPLE__
+       if (_vprocmgr_move_subset_to_user(real_uid, "Background") != NULL)
+               errx(1, "can't migrate to background session");
+#endif
+
   /*
    * This guarantees that the session owner is listed, even when we
    * start detached. From now on we should not refer to 'LoginName'

I reverted this patch (some googling seemed to show that this secret-sauce function _vprocmgr_move_subset_to_user is the problem) from Apple’s screen sources and recompiled it, and now mate -w works as EDITOR!

There is still some weirdness going on with the shells that screen starts, since the bash PS1 variable isn’t getting set, but that’s no big deal.

I’ve made a package out of this, which will overwrite /usr/bin/screen with the unpatched version, and will move the original binary to /usr/bin/screen.orig:

(I also hear you about to say “Fink” or “MacPorts.” Once again, STFU.)

]]>
http://metastatic.org/text/Concern/2009/01/24/fixing-screen-on-mac-os-x-leopard/feed/ 2
git package 1.5.4.3 for OS X http://metastatic.org/text/Concern/2008/03/08/git-package-1543-for-os-x/ http://metastatic.org/text/Concern/2008/03/08/git-package-1543-for-os-x/#comments Sun, 09 Mar 2008 07:47:43 +0000 Casey http://metastatic.org/text/Concern/2008/03/08/git-package-1543-for-os-x/ Updated universal git package for Mac OS X:

(I made the mpkg on Leopard, but compiled the code on Tiger. This should work on both, but I haven’t tried the installer on Tiger. I’ve also tried to include libexpat, and thus git-http-push support. Let me know if there are any issues)

Update: I’ve rebuilt the package, which should install all the git builtin programs (which are exactly the same as the main git binary, but with a different name) as hard links, not as independent programs. This will take up less space on your hard disk, but the installer is the same size (!). If this doesn’t work for you, use the non-hard-linky installer.

Edit: this page will hold further updates for this package.

]]>
http://metastatic.org/text/Concern/2008/03/08/git-package-1543-for-os-x/feed/ 19
ditto –fail http://metastatic.org/text/Concern/2007/12/18/ditto-fail/ http://metastatic.org/text/Concern/2007/12/18/ditto-fail/#comments Tue, 18 Dec 2007 23:50:23 +0000 Casey http://metastatic.org/text/Concern/2007/12/18/ditto-fail/ /dev/null 2> /dev/null cp test/file1.txt test/file2.txt cp test/file1.txt test/file3.txt cp test/file1.txt test/file4.txt cp test/file1.txt test/file5.txt cp test/file1.txt test/file6.txt cp test/file1.txt test/file7.txt mkdir test/subdir cp test/file*txt test/subdir zip -0 -q -r [...]]]> This test script will fail about half the time on Mac OS X, both 10.5.1 and 10.4.11. Note that the second test (the “FAIL2″) never seems to fail.

#!/bin/bash

mkdir test
dd if=/dev/random of=test/file1.txt bs=1024 count=5 > /dev/null 2> /dev/null
cp test/file1.txt test/file2.txt
cp test/file1.txt test/file3.txt
cp test/file1.txt test/file4.txt
cp test/file1.txt test/file5.txt
cp test/file1.txt test/file6.txt
cp test/file1.txt test/file7.txt
mkdir test/subdir
cp test/file*txt test/subdir

zip -0 -q -r - test > f1
cat f1 | ditto -xk - .1

zip -0 -q -r - test | cat > f2
cat f2 | ditto -xk - .2

diff -r .1 .2 > /dev/null
if test $? != "0"; then echo "FAIL"; fi

ditto -xk f2 .3
diff -r .1 .3
if test $? != "0"; then echo "FAIL2"; fi

rm -rf f1 f2 .1 .2 .3 test

I’m not such which sucks worse: the fact that ditto can’t handle what is apparently a perfectly valid zip file, or that zip writes something different to stdout, depending on whether or not it is a pipe or a file.

]]>
http://metastatic.org/text/Concern/2007/12/18/ditto-fail/feed/ 0
Virtua Fighter http://metastatic.org/text/Concern/2007/11/01/virtua-fighter/ http://metastatic.org/text/Concern/2007/11/01/virtua-fighter/#comments Fri, 02 Nov 2007 04:40:55 +0000 Casey http://metastatic.org/text/Concern/2007/11/01/virtua-fighter/ Virtual memory sizes, Leopard

I’m impressed overall with Leopard, not the least of which the fact that it seems extremely snappy, even though for me it gets a heretofore unthinkable VM Size: 73.75 GB virtual memory size. The graphics card in my iMac still hangs every once in a while.

]]>
http://metastatic.org/text/Concern/2007/11/01/virtua-fighter/feed/ 2
Stupid Leopard Tricks: Non-Translucent Menu Bar http://metastatic.org/text/Concern/2007/10/27/stupid-leopard-tricks-non-translucent-menu-bar/ http://metastatic.org/text/Concern/2007/10/27/stupid-leopard-tricks-non-translucent-menu-bar/#comments Sat, 27 Oct 2007 20:04:34 +0000 Casey http://metastatic.org/text/Concern/2007/10/27/stupid-leopard-tricks-non-translucent-menu-bar/ Menu Bar

It’s kind of an obvious hack, but to “disable” the translucent menu bar in Mac OS X 10.5, you can just change your desktop background to have a little strip of a solid color (or a gradient) along the top.

Now you could pay for an image editor, or wait until the Gimp works again on Leopard, or five-finger bittorrent a copy of Photoshop, but it’s easier to just install ImageMagick (through MacPorts), and do it as a batch.

I have a folder of pictures, all the right size (1920 by 1200 pixels), that I use for desktop pictures; I made a little gradient image, and then let mogrify do the work:

rigel:~/Pictures$ mkdir "Backup of Desktop Pictures"
rigel:~/Pictures$ cp Desktop\ Pictures/* Backup\ of\ Desktop\ Pictures
rigel:~/Pictures$ cp gradient-menu.jpg Desktop\ Pictures
rigel:~/Pictures$ cd Desktop\ Pictures
rigel:~/Pictures/Desktop Pictures$ for file in *.jpg
> do mogrify -draw 'image Over 0,0 1920,22 gradient-menu.jpg' "$file"
> done
rigel:~/Pictures/Desktop Pictures$ rm gradient-menu.jpg

]]>
http://metastatic.org/text/Concern/2007/10/27/stupid-leopard-tricks-non-translucent-menu-bar/feed/ 3
New Git package for OS X http://metastatic.org/text/Concern/2007/09/15/new-git-package-for-os-x/ http://metastatic.org/text/Concern/2007/09/15/new-git-package-for-os-x/#comments Sun, 16 Sep 2007 00:50:40 +0000 Casey http://metastatic.org/text/Concern/2007/09/15/new-git-package-for-os-x/ Updated the git Mac OS X package. Let me know if there are issues (note, yes, this will only work on Tiger, and maybe Leopard).

Edit: this page will hold further updates for this package.

]]>
http://metastatic.org/text/Concern/2007/09/15/new-git-package-for-os-x/feed/ 17
Using git in the Finder http://metastatic.org/text/Concern/2007/08/30/using-git-in-the-finder/ http://metastatic.org/text/Concern/2007/08/30/using-git-in-the-finder/#comments Fri, 31 Aug 2007 06:53:45 +0000 Casey http://metastatic.org/text/Concern/2007/08/30/using-git-in-the-finder/ One thing I’d like to see in Mac OS X is a simple way to do versioning. I’m often editing simple stuff on my Mac, and would really benefit from keeping track of older versions. Ideally, when I change files, new versions should just be committed automatically, with some hysteresis. Short of that, a simple command built into the Finder that would let me check in files would be nice.

Automator does make this possible, to a degree, and it’s easy to save a workflow as a Finder plugin, which makes it available in the contextual menu (Automator is still almost completely useless, though, since it’s such a limited parody of a macro system or programming language).

So, here’s something that will take the selected Finder items and check them into a git repository. If no git repository exists in that folder, or a parent one, it will initialize a new one:

Installation is approximately:

  1. Install git.
  2. Open Check Files In.workflow in Automator.
  3. Select File > Save as Plug-in…
  4. Save as a Finder plug-in, with whatever name you want.
  5. Enjoy two-click source control.

(Yes, I know about SCPlugin. That uses subversion, though, so it loses.)

]]>
http://metastatic.org/text/Concern/2007/08/30/using-git-in-the-finder/feed/ 2
Instant Review: Aluminum iMac http://metastatic.org/text/Concern/2007/08/20/instant-review-aluminum-imac/ http://metastatic.org/text/Concern/2007/08/20/instant-review-aluminum-imac/#comments Tue, 21 Aug 2007 06:14:39 +0000 Casey http://metastatic.org/text/Concern/2007/08/20/instant-review-aluminum-imac/ I desperately want to love this computer. Apple’s quality just seems to be extremely inconsistent.

The screen is gorgeous. I bought the 24″ model, added another gigabyte of RAM, and have been thoroughly impressed with the system performance and the display. Watching videos — especially HD content — makes this beast well worth the price; it would probably rival some decent televisions, and it works perfectly for my small apartment. The new keyboard design is nice, but it’s nevertheless just a beautifully-designed ergonomic nightmare, and I’m letting my co-worker borrow it instead (since I have a better keyboard anyway). The Mighty Mouse is also neat, but I use a trackball, and could never use that mouse properly since its cable is so ridiculously short. Regardless, it is teh sexy for watching video podcasts and DVDs, and doesn’t hang when doing more than one thing like my Mac Mini did.

But, I’m running into some serious issues. Here’s the list thus far:

  1. It kernel panicked the first day, while I was setting it up. Now I was putting some stress on the system — hooking up 1TB of storage through three external drives — but come on. Let me at least install some crazy kernel extensions before it starts panicking on me.
  2. There’s a dead pixel, out of the box. It’s near the upper right hand corner of the screen, and thus out of the way, but still.
  3. The screen doesn’t feel like glass. Tapping it with my fingernail, it sounds just like a regular old plastic screen, it just looks a lot shinier. I hope I’m just being picky, and didn’t get screwed somehow.
  4. This is the kicker: WindowServer will intermittently hang. On Mac OS X, this means that the entire desktop freezes, and while you can still SSH into the system, to use the main display you need to reboot the machine.

    This has happened three times so far, and each time I was looking at the iTunes store in iTunes; I’m starting to suspect that it has something to do with the graphics card, because I can SSH into the system, and using sample can see that iTunes is hung off in the weeds in some graphics routine. Both iTunes and the WindowServer are stuck in uninterruptible sleep, presumably waiting for the graphics hardware to stop freaking out. There’s no obvious crash information, but in the logs I did see this:

    Aug 19 15:02:40 rigel kernel[0]: ** ASIC Hang Log Start **
    Aug 19 15:02:40 rigel kernel[0]: 0x01019583 00009062 00009583 00000000
    Aug 19 15:02:40 rigel kernel[0]: 0x00000000 00000000 00000000 00000000
    Aug 19 15:02:40 rigel kernel[0]: 0x0011a010 00000000 00000000 0083106b
    Aug 19 15:02:40 rigel kernel[0]: 0x00f8fc00 00000000 00000001 00008a12

    which continues with a lot of hex values. Fun.

    From reading the discussion boards on Apple’s website, it looks like a few other people have seen this, usually while playing games, which typically means exercising the video.

Update: Rumor has it that the iMac Software Update 1.1 fixes the “ASIC hang” problem. It seems to be working for me.

Update (October 6): Apple seems to be working on the issue. Software update 1.1 does not completely solve the iMac hang problem.

Update (November 3): iMac Software Update 1.2 (Tiger) and 1.3 (Leopard).

]]>
http://metastatic.org/text/Concern/2007/08/20/instant-review-aluminum-imac/feed/ 26
git package for Mac OS X http://metastatic.org/text/Concern/2007/08/18/git-package-for-mac-os-x/ http://metastatic.org/text/Concern/2007/08/18/git-package-for-mac-os-x/#comments Sat, 18 Aug 2007 23:51:41 +0000 Casey http://metastatic.org/text/Concern/2007/08/18/git-package-for-mac-os-x/ I’ve been looking at git for source control, and put together a Mac OS X package installer that will install a Universal binary of git and its man pages into /usr/local. The pax archive in pkg files seems to seriously expand the size — 30M of program files make for a >100M installer!

I’ve only tried this on Intel Macs, so your mileage may vary.

Update: See the newest version.

Update: Also give the torrent a try: git-1.5.4.2.pkg.zip.torrent

Edit: this page will hold further updates for this package.

]]>
http://metastatic.org/text/Concern/2007/08/18/git-package-for-mac-os-x/feed/ 3