<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc=" http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>briancarper.net (λ) (Tag: OS X)</title><link>http://briancarper.net/tag/168/os-x</link><description>Some guy's blog about programming and Linux and cows.</description><item><title>OS X getting virtual desktops - wow?</title><link>http://briancarper.net/blog/os-x-getting-virtual-desktops-wow</link><guid>http://briancarper.net/blog/os-x-getting-virtual-desktops-wow</guid><pubDate>Thu, 10 Aug 2006 15:50:24 -0700</pubDate><description>&lt;p&gt;I've often thought that any operating system without virtual desktops / workspaces is for all intents and purposes crippled.  It seems that OS X is &lt;a href=&quot;http://www.apple.com/macosx/leopard/spaces.html&quot;&gt;getting some&lt;/a&gt; in the next version, next spring.&lt;/p&gt;

&lt;p&gt;It's nice.  I guess.  It's too bad Linux has had the same thing for over a decade.  And in Linux it's far more powerful and far more customizable, I'd be willing to bet money.  Oh, and Linux doesn't cost $129.&lt;/p&gt;

&lt;p&gt;I did buy a Mac last year, and I tried to use it for a while.  There are some things it's really good at.  But I found that anything it could do, I could do in Linux.  It may not be as pretty in Linux, but it sure works.  And there are tons of things I can do easily in Linux that are hard or impossible to do in OS X.  &lt;/p&gt;

&lt;p&gt;The appeal of OS X is that it's polished and it's marketed really well.  Linux is not polished; use it for ten minutes and that will be obvious.  I use Linux exclusively and even I will admit that Linux is a God-awfully ugly beast.  Well, it may be an ugly beast, but it's an agile, intelligent, and mightily powerful ugly beast.  I'll take power over polish any day.&lt;/p&gt;

&lt;p&gt;In the end I gave my Mac to my parents.  I found that I never used it anyways.&lt;/p&gt;

&lt;p&gt;(In other news, Windows still sucks.)&lt;/p&gt;

&lt;p&gt;EDIT: Fixed typo.&lt;/p&gt;</description></item><item><title>Photo (and file) organization</title><link>http://briancarper.net/blog/file-organization</link><guid>http://briancarper.net/blog/file-organization</guid><pubDate>Mon, 29 May 2006 22:54:24 -0700</pubDate><description>&lt;p&gt;I used iPhoto for a long while as my one and only method of fetching and storing all the photos from my digital camera.  Eventually I started dumping wallpapers in iPhoto too, and any miscellaneous image file I needed to save for any reasons.  There are some good and bad things about using a program like iPhoto for data storage / organization.   I think the bad probably outweigh the good.&lt;/p&gt;

&lt;p&gt;A motto of Perl is &quot;Make the easy things easy, and make the hard things possible&quot;.  iPhoto fails, like so many other programs, because it makes the easy things easy, but it makes many hard things IMPOSSIBLE.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;iPhoto does make certain things easy.  You plug in your camera, up pops a dialog box, you click OK and taa-daa, all your pictures are slurped off the camera.  In terms of organization, iPhoto is good at what it does (more on that later though).  You can type meta-data for all the picture files, and then search on the meta-data.  You can search by the date you took the photo, and things of that sort.&lt;/p&gt;

&lt;p&gt;iPhoto makes some sort-of-hard things possible.  Say I want all the pictures I took of my cat.  I search for &quot;cat&quot; in iPhoto and hopefully they appear.  If I've been good about typing meta-data for all my photos, then it works.  If not, well then, I may be screwed.  If I can remember the date I took the photo, I may be able to track it down.  If I can narrow it down to a month or two, I'm probably OK.&lt;/p&gt;

&lt;p&gt;But then we have the hard things that are impossible via iPhoto.  Here's a whole class of things: Let me browse my pictures without using iPhoto.  Better: Let me browse my photos without using OS X.  Let me browse my photos via SSH.  Or let me browse it in Linux via Samba over my LAN.  &lt;/p&gt;

&lt;p&gt;Well, iPhoto lets you have &quot;Albums&quot; which are little more than stored searches.  But those aren't viewable (that I know of) if you aren't using iPhoto.  iPhoto can search photos and their meta-data, but you can't really search unless you're using OS X or iPhoto directly.  There's all kinds of meta-data, but I don't know how to get at it outside of iPhoto.  &lt;/p&gt;

&lt;p&gt;What exists underneath of iPhoto is a series of directories with photos organized by date.  Each year gets a folder.  Each month gets a folder in a year folder.  Each day gets a folder in a month folder.  In these you have photos, thumbnails, movies, and multiple &quot;original&quot; vs &quot;edited in iPhoto&quot; versions of some of these files.  And all your files are named things like IMG_0189.JPG.  Have fun finding anything there!  I know I did.&lt;/p&gt;

&lt;p&gt;In what other situation might you need to browse photos without using iPhoto?  Well, there is a 100% guarantee that one day, you will find that your program has become old or outdated.  In the world of computers, that day will come sooner rather than later.  When they release a new version of your program, do you buy it?  Will the new version even support your old legacy files?  If they release a BETTER program than what you have, how hard will it be to transfer your files over to it?&lt;/p&gt;

&lt;p&gt;iPhoto supports photo editing, things like cropping or adjusting color / brightness.  But suppose I want to do some editing of a file that's more advanced.  I want to run it through a better filter, or add a frame, or crop it into a hexagon, or make it into a greeting card.  Now what?  iPhoto can't help you.  To do what I need to do, I can fetch the photo out of iPhoto, edit it, and then stick it back into iPhoto when I'm done (perhaps having to manually remove the old version first).  Not fun.  Or I have to see if I can find (and potentially BUY) a program that interfaces not with plain old normal files, but with iPhoto's meta-files.  Also not fun.&lt;/p&gt;

&lt;p&gt;As an added bonus, the search in iPhoto is not powerful enough.  Few programs offer regular expressions in their built-in search.  Anything less than regex and the search is crippled, in my eyes.  But in most programs I find I'm lucky if I even have Boolean logic support.  Simple AND/OR/NOT.&lt;/p&gt;

&lt;p&gt;So what the heck is the point?  What is there that makes easy things easy and hard things possible?  Answer: &lt;strong&gt;The filesystem!&lt;/strong&gt;  Simple is quite often better, and in this case I think it is.  The filesystem has many benefits.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;It's transparent.  What you see is what you get.&lt;/li&gt;
&lt;li&gt;It's scriptable.  You can use any of the hundreds of command-line tools that make Linux great.  Or use Ruby or Perl or your scripting language of choice to do anything you can imagine.&lt;/li&gt;
&lt;li&gt;It's cusomizable.  You aren't restricted.  Organize your photos by subject if you want.  Or subject and then date.  Or by color.  Or by something which to you makes total sense, but to everyone else makes no sense at all.  For my brain, the sane way to store photos is to group them not by date, but by SUBJECT.  My cat photos should be a in a folder called &quot;cat&quot;.  My vacation photos should be in a folder called &quot;vacation&quot;.  If I take two vacations, each should get its own subfolder in &quot;vacation&quot;.   If I'm looking for a photo, I'm probably not going to remember what date I took it.  But I am going to remember what the photo IS.&lt;/li&gt;
&lt;/ul&gt; 

&lt;p&gt;The easy things are slightly less easy than when using iPhoto.  But they are still easy.  Using gphoto2 in Linux, it took me 15 miutes to write a script that fetches all files from my camera, checks to make sure the files were fetched properly, deletes them from the camera if so, and then organizes them into a command-line specified folder.  It also renames all the files to lowercase automatically; let's see a GUI app do that!  &lt;/p&gt;

&lt;p&gt;And now the hard things are possible.  I could change the filenames further if I wanted.  I could batch rename or renumber the files using regex pattern replacements.  I could edit the EXIF data using command-line tools. I can use imagemagick to crop, rotate, resize, add a frame to, flip over, or greyscale-ify all my photos all at once.  I can convert them all to PNGs.  I can auto-upload them to a remote server so I can have them on my website.  I can log what I'm doing so I have a record of when I imported which photos.  Who knows what else?  The possible options are now unlimited.&lt;/p&gt;

&lt;p&gt;Now I can view and edit the files using any program.  In iPhoto I'm not working on a file, I'm working on an iPhoto wrapper around a file.  But every graphics program works directly on files.  If I want to browse my photos and I'm in a hurry, I'll use feh.  If I want to see a thumbnail view I'll use gqview or thunar.  If I want to edit a file, I can use the Gimp, or I can use Photoshop, or I can use any other program that can open and save a file.&lt;/p&gt;

&lt;p&gt;It took me a couple hours to re-organize my whole iPhoto library into a sane structure again, but now I have a simple ~/pics folder and everything is where I can easily find it.  I should've known better than to use iPhoto, but live and learn.&lt;/p&gt;</description></item><item><title>36d 6h 58m</title><link>http://briancarper.net/blog/36d-6h-58m</link><guid>http://briancarper.net/blog/36d-6h-58m</guid><pubDate>Mon, 22 May 2006 00:28:05 -0700</pubDate><description>&lt;p&gt;I almost had to reboot my computer today.  I had my Mac Mini mounted as a smbfs and I did something dumb, I can't remember what.  Probably rebooted the Mini or something.  In any case Gentoo freaked out for a while, thinking the Mini was still mounted when it wasn't.  Trying to umount it gave screwy &quot;device is busy&quot; errors.  &lt;/p&gt;

&lt;p&gt;One of the few things I've found that can force a reboot in Linux are deadlocked processes (I assume that's what it means; the state is listed as D).  I'm not 100% sure but I assume this means deadlocked waiting for an I/O operation to finish.  Even this doesn't really FORCE a reboot.  It just leaves an unkillable process sitting around.  You can ignore the process and keep working.  But it bugs me in an obsessive-compulsive kind of way.  In any case I was rather nervous that this might be the case today, but ps didn't list any processes in D state.  I haven't really experienced a D-state process for a long while.  Likely a year or so.&lt;/p&gt;

&lt;p&gt;Anyways, for some reason, after 5 or 10 minutes the problem (whatever it was) went away and it let me umount the drive properly.  It makes me happy when things work properly.&lt;/p&gt;</description></item><item><title>iTunes + Amarok = Good</title><link>http://briancarper.net/blog/itunes-amarok-good</link><guid>http://briancarper.net/blog/itunes-amarok-good</guid><pubDate>Wed, 19 Apr 2006 17:16:43 -0700</pubDate><description>&lt;p&gt;The sound card in the Mac Mini (first generation) sucks.  It sucks very very hard.  It has a single headphone jack for output, and even with headphones it's not all that good.  My other (PC) computer, on the other hand, has a nice Audigy 2 card with 5.1 outputs.  I'd really love to play music from my Mac, because I rather like iTunes.  But short of buying an external soundcard, that's not gonna happen.  &lt;/p&gt;

&lt;p&gt;So, what I do is use iTunes for one thing, which is actually just about the only reason you'd want to use iTunes anyways: &lt;em&gt;Organizing&lt;/em&gt; music.  iTunes is very good at organizing.  It stores music exactly as I'd always stored it myself: &lt;code&gt;../artist/album/songtitle&lt;/code&gt;.   It also plays nicely with ID3 tags, so when you change the Artist tag on a song, it moves the song to a new artist directory.  I still shudder to think of all the crap I used to go through in the olden days with Perl scripts and command-line ID3 tag editors.&lt;/p&gt;

&lt;p&gt;Having iTunes organize the music, all I need to do is point Amarok on my PC to look in the &quot;iTunes Music&quot; folder on the Mini, and have it play over the LAN. I get the best of both worlds this way; I can use program in Windows, Linux or OS X as a &quot;frontend&quot; to the iTunes-managed music files, so long as that client stays read-only.&lt;/p&gt;</description></item><item><title>Printer: part 2</title><link>http://briancarper.net/blog/printer-part-2</link><guid>http://briancarper.net/blog/printer-part-2</guid><pubDate>Tue, 11 Apr 2006 18:59:46 -0700</pubDate><description>&lt;p&gt;I just got my printer set up in Linux just now (attached to a Mac Mini on my LAN, don't forget).  Let's see.  First I opened the &lt;a href=&quot;http://www.gentoo.org/doc/en/printing-howto.xml&quot;&gt;Gentoo Printing Guide&lt;/a&gt;.  Then I looked under &quot;Setting Up a Remote Printer&quot;.  Then I followed the directions word-for-word.  I typed&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo emerge -upv cups
sudo emerge cups&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then I changed one line in /etc/cups/client.conf to say&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ServerName mini
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then I typed &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo /etc/init.d/cupsd start
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And then it worked.  Why do people say Linux is hard to configure?&lt;/p&gt;

&lt;p&gt;Now I can do things like &lt;code&gt;echo &quot;hello&quot; | lpr&lt;/code&gt;.  &lt;/p&gt;

&lt;p&gt;*wipes away a tear of joy*&lt;/p&gt;</description></item><item><title>Sharing a printer from OS X to Windows XP</title><link>http://briancarper.net/blog/sharing-a-printer-from-os-x-to-windows-xp</link><guid>http://briancarper.net/blog/sharing-a-printer-from-os-x-to-windows-xp</guid><pubDate>Sun, 09 Apr 2006 13:53:01 -0700</pubDate><description>&lt;p&gt;So I bought a new printer recently: a Canon PIXMA iP1600.  I have a computer running dual-boot Windows XP and Gentoo, and a Mac Mini.  Clearly the most logical setup is to put the printer on the Mac, and have my other computer share the printer; I just have to set up Gentoo and XP both to look for the Mac printer.  Then I can print from all three operating systems.&lt;/p&gt;

&lt;p&gt;In case you haven't guessed at this point, no, this is not going to be pretty.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Of course, sharing a printer from OS X is so simple a brain damaged dog with no legs could set it up.  System Preferences, Sharing, click Printer Sharing.  The end.&lt;/p&gt;

&lt;p&gt;Of course, getting XP to recognize that printer is never that simple.  Start Menu, Control Panel, Printers and Faxes, &quot;Add a printer&quot;,  Next, &quot;A network printer, or a printer attached to another computer&quot;, Next, &quot;Browse for a printer&quot;, Next, and then to my amazement, the printer was actually listed there!  So I picked it and clicked Next, hoping for a miracle.&lt;/p&gt;

&lt;p&gt;Yeah right.  I got some ridiculous message about &quot;The server does not have the correct driver installed&quot; and then I got a list of about a billion printers I had to pick from.  My printer was not listed, so I clicked &quot;Have Disk...&quot; which is really an intuitive name for a button, isn't it?  (sarcasm)  &lt;/p&gt;

&lt;p&gt;For whatever reason, this defaults to looking at the A: drive.  There is no A drive on my computer.  I don't have a floppy drive.  Good to know that Windows XP is still stuck in 1989.  So I fished out the DVD that came with the printer, had to go into the &quot;Win2000&quot; folder (I know that Win2k drivers are likely to work on WinXP; how many other people would be likely to know this?), searched through 6 levels of subfolders until I found ip1600.inf.  Blindly, I double-clicked it.  Windows then apparently did some voodoo and the driver appeared in a separate window.  I selected it and clicked Next a bunch of times until I got a Finish, and then a new printer appeared in the Control Panel.  Excellent!&lt;/p&gt;

&lt;p&gt;So I opened up Notepad, and tried to print something.  It went through just fine, and XP reported no errors.  OK, great.  But nothing printed.  Then I noticed the printer was off.  PEBKAC, or in this case I guess PEBPAC.  So I turned it on and printed again.  Again, no errors.  My printer made a slight noise (I think the roller inside was turning) but nothing printed.&lt;/p&gt;

&lt;p&gt;So I checked OS X.  I looked in the print Queue, which again, is exactly where you'd expect (System Preferences, Print &amp;amp; Fax, Print Queue).  There are two big tabs, Active or Completed.  Active said &quot;No job printing&quot;.  Completed showed two jobs finished.  Both were called crap like &quot;smbprn.00000003&quot;, which I assume means my printer is being shared via Samba.  OK.  It said State is Finished, and the correct time.  But nothing printed!&lt;/p&gt;

&lt;p&gt;So I googled.  Reading &lt;a href=&quot;http://www.macosxhints.com/article.php?story=20040208122655345&quot;&gt;macosxhints&lt;/a&gt; I saw a bunch of stuff.  I skipped down to where someone writes about how to use CUPS.&lt;/p&gt;

&lt;p&gt;So, I looked at http://127.0.0.1:631 in Firefox on my Mac, and I saw the printer I already added.  It was simple enough to add a new one, selecting &quot;raw&quot; as the type.  After adding all that, I went back to XP and went through the long list of Next's until I got to a part where I could put in a printer address on the network.  Typing in http://mini:631/printers/CUPS (CUPS is what I called the &quot;new printer&quot; I added in OS X) I kept on Next'ing until I got to the end.  Success, a new printer.&lt;/p&gt;

&lt;p&gt;So I tried one more time in Notepad to print something.  And lo and behold, it worked!&lt;/p&gt;

&lt;p&gt;Now, my only worry is whether or not the printer is going to work in XP next time I reboot.  You see, every time I reboot, XP forgets the Samba password for my Mac.  So when I try to play some music in XP that resides on my Mac's hard drive, it gives all kinds of stupid errors.  If I go into My Computer and double-click the drive I have mapped to the Mini, it asks for a password.  If I then try to play music, it magically works.&lt;/p&gt;

&lt;p&gt;This is the kind of crap that makes me want to break my Windows XP install CD in half and flush it down the toilet.  The most ironic thing here is that a freaking LINUX program (CUPS) saved the day.  I'm laughing on the outside.  Even if I'm crying on the outside.&lt;/p&gt;</description></item><item><title>Turn off Spotlight.</title><link>http://briancarper.net/blog/turn-off-spotlight</link><guid>http://briancarper.net/blog/turn-off-spotlight</guid><pubDate>Mon, 27 Mar 2006 17:21:47 -0800</pubDate><description>&lt;p&gt;If you have a first-generation Mac Mini (as I do) and you haven't dished out money for an extra (faster) hard drive, you're probably suffering with terrible performance.  They put some kind of slow laptop hard drive in there to keep the thing small, or whatever.  &lt;/p&gt;

&lt;p&gt;This is a good tip on how to &lt;a href=&quot;http://www.macosxhints.com/article.php?story=20050504012104186&quot;&gt;disable Spotlight&lt;/a&gt; (the post by jjccgg, NOT the original post), which should in theory boost performance by stopping the constant hard drive indexing.  I've done this and I can indeed immediately see a performance boost.  I haven't benchmarked it, but it's noticeable enough that I don't think I need to.&lt;/p&gt;

&lt;p&gt;I find Spotlight to be nearly worthless.  Searching is not the most efficient way to find files, in my opinion.  It's good in the average case, but terrible in the worst case.  I define &quot;worst case&quot; here to mean that you don't know the NAME of a file.  If I organize things by folder, I only need to know the LOCATION of a file.  It's more likely that I forget a file name or description than that I forget a file's general location, in the worst case.  &lt;/p&gt;

&lt;p&gt;For example, I can think of a bunch of wallpapers that I downloaded, and they likely have names like 1.jpg, 03984.png etc.  I know where to get them (some subdir of the wallpaper directory), but searching would not find them easily.  I can think of documents I've written, but I don't know the name of them or their titles.  The solution to this (and what Spotlight expects, apparently) is for you to tag all your files so the search can find them easier.  But in that case, we've fallen back to a pseudo-folder structure, only with greater room for error and lots more fuzzy areas.&lt;/p&gt;

&lt;p&gt;That's my problem with desktop search, I guess: it's too fuzzy.  You have to rely upon the strength of your search algorithm, and I don't have a heck of a lot of faith in search algorithms.&lt;/p&gt;</description></item></channel></rss>

