Steve's Pad

Older Macintosh entries

September 21, 2008

How to get a list of SMB shares

Getting the list of SMB shares on a network isn't as easy as it should be. I spent weeks trying to hunt down a solution online and after asking the Samba mailing list, the Samba IRC channel, Apple DTS and emailing a bunch of people, I finally got the answer. You would think this would be very simple to do, but there is one trick you need to know to discovering all the available shares.

First step is to get a list of master browsers:

nmblookup -M -- -

Output looks like this:

querying __MSBROWSE__ on 172.26.44.255
172.26.44.202 __MSBROWSE__<01>
172.26.44.168 __MSBROWSE__<01>

Parse out the IP addresses and pass them to smbclient:

smbclient -g -p 139 -NL (ip address)

Output looks like this:

Server|StevesServer|
Server|SharedPC|
Workgroup|MyWorkgroup
Workgroup|Fredsworkgroup

Parse out the "Workgroup" lines and save the names in an array.

Now comes the trick. For some reason, on some networks, the list of master servers returned with nmblookup -M -- - is incomplete. I'm sure there is a reason why this happens, but I have no idea why.

To get the complete list of master browsers, take your array of workgroups and ask each one for it's master browser like this:

nmblookup -M (workgroup)

Output looks like this:

172.26.44.94 WORKGROUP<1d>

Parse out the ip address. This is another master browser!

Now take the list of master browser returned from nmblookup -M -- - and combine it with any master browsers received querying the workgroup names and run this again for each ip:

smbclient -g -p 139 -NL (ip address)

Server|StevesServer|
Server|SharedPC|
Workgroup|MyWorkgroup
Workgroup|Fredsworkgroup

This time parse out the "Server" lines from the output you will have a complete list of SMB shares.


Posted by sgehrman at 6:47 PM | in Macintosh | Comments (0)

divider.gif

March 3, 2008

Macworld Blast Party

It's a little late to be blogging about Macworld, but I've been busy coding like mad on Path Finder 5 and haven't had much time to devote to the blog.

So after Macworld, I went to the MacSB dinner and it was cool. Met a bunch of interesting Cocoa devs and had a nice dinner. I went back to my office to get my things and was skating to the Muni station to head home when I ran into it to my old friend Nobi. It was a total coincidence. Nobi said he's going to the Macworld Blast party and said he could get me a ticket. So I'm like "Sure, why not." Little did I know at the time how cool it was going to be.

So, first stop was at a little bar on the corner of Yerba Buena Gardens to get some free drinks and to get our tickets. There was this wacky drunk out of her mind old lady hitting on me telling me how cute I was (she must have been drunk). It was pretty hilarious. She was asking me if I liked Elvis Presley and she could barely stand. I guess she was looking to score :) It was very weird. I kept looking at Nobi hoping he would save me from this awkward situation. Luckily the bus to the Warfield had arrived and I politely ran out as fast as I could.

So we get on the bus heading to Warfield. I've never been there before, but it's a famous place for bands to play in downtown San Francisco. We get off the bus and wait in line and eventually get in.

So before the show started, Microsoft had their Office for Mac 2008 launch party which was really cool. They gave away tons of free stuff. They were throwing stuff out into the crowd and I happened to catch a leather iPhone case. They also gave away an iMac and a bunch of other cool things.

Everyone got two tickets for free drinks, so I got my drinks and waited for the main event. DEVO!!

The show starts off with this amazingly trippy video. I loved it and took a short clip. The video got cut short since a security guy tapped me on the shoulder and said "No filming". I've seen a few other videos on YouTube with the complete video, but here's the footage I got...

Here's the sign out front of the Warfield
warfield.png

Here's the ticket
ticket.png

Here's another sign out front
sign.png

Microsoft launch party pict
msparty.png

DEVO!
devo2.png

devo.png

After the show Nobi and I met up with some of his Japanese friends. A young Japanese girl in the group had no idea who DEVO was which was kind of funny. I guess I'm old. After the show I met up with my friend and fellow mac developer Steve Dekorte at the Cafe Royale. DEVO was awesome. I had no idea they still could rock the house. The sound was great and an all around amazing show.

Posted by sgehrman at 8:33 PM | in Me

divider.gif

September 6, 2007

iPhone: Keep waiting

iphone.png

To be honest I was far from all the showtime frenzy yesterday, although Moscone center is a part of my office window view (reminds me that I should finally update my office page with pictures of my new office!). It was just another calm coding day, em, actually relatively calm - our team got into a hard argument about some new cool UI stuff that I can't tell you about yet. But some news did get through - like people running in the direction of the Apple Store, shouting something unintelligible like "refund... 10 days...iPhone... help" when I went out to have my lunch, which made me check the news upon my return and find out the truth.

Here's my guess about the iPhone price cut - I think it has something to do with the fact that the iPhone might be going to get an improvement soon. How about 3G for example? How about the fact that EDGE standard doesn't really exist in Europe as far as I know and they are about to launch iPhone in Europe pretty soon, probably in November or December? You might be tempted to buy an iPhone now that they got cheaper, but, don't be fooled! I think that the price was lowered to clear out inventory before Apple releases a better model with 3G support. Nobody's going to buy a slow 2G iPhone once the 3G is announced, so Apple needs to get rid of them now, during the holiday season, while they still have a chance.

BTW, I don't have an iPhone and I don't yet plan to buy one. However I was quite tempted by the iPod Touch when I saw it yesterday.

Update 08.09: it seems that my theory is confirmed by the article that got on Digg front page today with the following summary:

3G iPhone with 16GB set to drop on November 12th. Apple may launch its iPhone campaign in Europe with a 3G-capable iPhone with enhanced storage, according to what appears to be a leaked ad from T-Mobile Germany. The ad promises HSDPA Internet access (up to 3.6Mbps!) and 16GB of flash. Hope you didn't buy that $399 iPhone assuming it wouldn't get better!
Posted by sgehrman at 3:37 PM | in Macintosh | Comments (2)

divider.gif

April 7, 2007

Bluetooth mighty mouse fixed


Update: A reader pointed me to this blog posting: Apple Bungles Bluetooth in Mac Pro Going to try it now! Sounds like exacty what I discovered. The blogger also says it seems to work at 2 feet. Blogs rule!

--

WoooooHoooooo:

Yeah baby. That fixed it!!!!!!!!! Now I can go to the farthest point in my office and control the mouse perfectly!!! The blog mentions that there is an unlabeled wire, but mine wasn't unlabled. Here's what I did to fix it. You can kind of tell by the length of the wires which one is the correct wire. There is an unconnected wire labeled "2" which was obviously too short to reach the BT card. But there is a wire labeled "1" that was long and connected to the airport card. The unconnected wire, wire "2", was just the right length to reach the airport card. So I unplugged wire "1" from the airport card and plugged it into the BT card, and connected "2" to the airport card where wire "1" was connected. The wire labeled "BT" is now the unconnected wire. I used a pair of needle nose pliers to remove the connectors. If your planning on doing the fix, make sure you have one. I couldn't remove the wires with my bare hands.

--

I fixed my Bluetooth mighty mouse problems. I had my Mac Pro on the left side of my desk, and I'm right handed, so it was about 4 feet away. I decided to try putting the Mac Pro on the right side so it's about 2 feet away and it seems to have resolved the problem.

I didn't realize a 2 feet would make such a huge difference, but I guess that's Bluetooth. It's not like I have some wacky desk configuration. It's just a normal sized desk with the Mac Pro on the floor.

What's weird is that when I first got the mouse, it worked fine, but it seemed that over time it got worse. Maybe I'm just confused. I'm just glad it works.

Is this documented? Is there a maximum distance for bluetooth? I don't know, I don't read docs.

Posted by sgehrman at 11:51 PM | in Macintosh | Comments (5)

divider.gif

March 31, 2007

Bluetooth Mighty Mouse sucks

When I ordered my Mac Pro I paid extra to get the wireless keyboard and mouse, but now I'm regretting the decision.

I assumed Apple wouldn't sell these products if they worked as expected. Maybe I got a bad batch, but this mouse is absolute garbage.

Some days it works flawlessly. Other times it's super jumpy and hard to control. I don't know what it could be and I don't really care. I want my wires back! I had no problem with wires. The mouse and keyboard just sits on my desk and the wires never get in the way.

I also hate the fact that I have to replace or recharge the batteries every few weeks. I leave my mouse and keyboard always on. I got some rechargeable batteries (which were super expensive). The mouse always seems to complain of a low battery too quickly. I can take those AA batteries out and put them in a flashlight and it seems pretty bright and charged as far as I can tell.

I also am annoyed when it asks me to locate my mouse and keyboard after an OS install. I know it's not a big deal, but I just want it to work and not bother me.

This technology is not ready for prime time. Sorry Apple. Maybe the next generation will work as advertised. I need to stop by the Apple store and ask a genius what is going on.

While I'm on the subject of technology that sucks. Lots of new devices I own suck. I hate my cell phone. I rarely use my because the sound quality is unacceptable. I can barely hear what people are saying. A typical land line is so much clearer. Half the time I tell people just to call me back on my land line. I'm sick of saying "what?, what? Can you say that again...", it's extremely annoying. Also, if I have my cell phone within 10 feet of any speakers, I get random static, and buzzing from my speakers. I get a bunch of noise in my speakers right before the phone rings so I always know right before my phone rings. This must be a non-compliant device. It's causing way too much interference. Damn you to hell Sony Ericsson. This is the last device I ever buy from either of these companies.

I have no plans to buy an iPhone. I've got Cingular and they suck. I'll wait for the WiFi iPhone. It will probably suck too, but at least I'm won't be paying a monthly fee for lousy sounding calls.

I also am not a big fan of song quality of iTunes music. The quality is OK, but I still hear digital artifacts. A few songs I've purchased were "remastered" and they have obvious mistakes and odd sounds not in the original. I'm not an audio expert, but some songs just don't sound right. It seems that much of the new technology is better is many ways, but worse in other ways. It's annoying, but I guess that's the nature of progress. I own an iPod, but have used it 2 times in 3 years. When I first bought it, it would kernel panic my G5 every time I plugged it in, so it sat unused for the first year until finally Apple updated the OS and the problem went away. I still never use it.

Back to work, I feel better now...

Posted by sgehrman at 3:10 PM | in Macintosh

divider.gif

November 27, 2006

Mac Book Pro fails “wife test”

My wife loves using her Mac, but not her new Mac Book Pro. She loves her old 800mhz iBook.

The iBook is a flawless machine. Other than running slow, it is super reliable. The new Mac Book Pro I bought her has been a disaster.

First of all. It’s been to the shop 3 times. New motherboard, new Super drive, new bluetooth, new battery, etc. But there are still problems. The #1 issue is iChat. We use iChat video multiple times per day to communicate, but iChat always randomly crashes or fails to connect when she uses the Mac Book Pro. Her iBook never crashed and always works. Burning CDs from iTunes never failed on her iBook, but fails randomly on the MBP. She only uses iChat, Mail, Safari, and iTunes, so these problems affect most of her activities.

Recently my 2 year old son Kai wanted to play with the MBP and ripped off all the keys on the keyboard. I clicked most back into place, but there were a few parts that broke and could not be clicked back. So now typing is unreliable.

Kai also pressed in the display release button on front and managed to get it jammed and now we can’t close the lid. I realize this isn’t Apple’s fault, but he’s not that strong. This stuff is too delicate.

I tried to use the machine myself for doing development while at home, but this “Mac Bake Pro” fries my laps and it’s just not pleasant to use for more than a few minutes. I end up all sweaty and hot. This is with a new motherboard, so the heat issues are suppose to be better.

My power cord for the iBook broke recently, and I put off replacing it since we bought the MBP. Now I need to go spend $100 on a cord to switch my wife from a brand new machine to an old iBook. What a waste of money.

If only I could make lemonade from this lemon…

Posted by sgehrman at 3:51 PM | in Macintosh

divider.gif

October 25, 2006

iLike iTunes

iLike Sidebar for iTunes

You might have been wondering why it's been a few months since the last update to Path Finder. I was busy working on this for iLike.

iLike is really cool! When I first heard about it, I put everything down and start working on it. I'm really glad I had this opportunity since I think this is one dot-com is not going to fizzle. They've got a really strong team of guys. Great server side guys, a great flash designer, an amazing window's programmer, and strong management.

I learned lots on this project. I gave up on Carbon and went Cocoa only when OS X shipped and never learned Carbon events for example. This was the first Carbon project I've worked on since 1999. I also learned a lot about open source WebKit, Flash and Javascript.

Key features:

1) Recommends free music that matches your tastes. Free high quality, downloadable mp3s.
2) Recommendations from friends with similar tastes
3) Amazing animated flash UI
4) Social networking.
5) Perfectly integrated into iTunes. 100% rock solid.

Check it out!

BTW: I'm back on Path Finder and will have a 4.6 version out soon. This will be a free update. Stay tuned!

Posted by sgehrman at 3:17 PM | in Macintosh

divider.gif

October 11, 2006

New Mac Pro!!

I got a new Mac Pro dual 3ghz. I actually got it a while ago, but have been too busy to blog recently.

It's much faster than my old dual 2.5 G5. Not mind blowingly fast, but it's a huge improvement. Doing a full build on my old dual G5 with a dual 1.25 G4 set up as a distributed build machine took around 50 minutes. Now it takes about 15 minutes. I'm doing a lot less waiting and able to write more code.

The new Mac Pro is also much much quieter. The old G5 fans drove me nuts. Every time I hit "build" in XCode the fans would wind up like it was struggling to do the work. It was kind of stressful. I felt like I was hurting it every time I compiled.

I also love the new SATA drives. It's super easy to add additional hard disks. No jumpers to mess with, just pop it in and boot up.

Here's my current setup:

Dual Mac Pro 3ghz
3gb RAM
30" Cinema
23" Cinema
Wireless Keyboard and mouse
3 internal drives. 2 250s and a 160 SATA

The 30" is new. It makes a big difference, but I still wish I had 2 30" monitors. Maybe next year I'll upgrade my 23" to a 30".

Posted by sgehrman at 4:44 PM | in Me

divider.gif

July 10, 2006

Got the G5 Blues

I can’t wait for the Intel tower Macs.

The Dual 2.5 G5 I’m using is givin’ me the blues. It’s too $%#@ing slow. Feels like working in an alternate universe made of Jello. To make things worse, the latest XCode is super slow and constantly giving me the Spinning ball of death. Most of my day is spent waiting. I really need a new machine!

The PowerPC era will soon be history. What a disaster it has been. They kept promising huge increases in speed, but it never materialized.

Hopefully they will be released soon… I can’t take it much longer.

  • steve
Posted by sgehrman at 7:07 PM | in Macintosh

divider.gif

May 13, 2006

Brent Simmons on feature requests

This is a bit old, but it’s a bang-on write-up on the kinds of things developers hear from customers requesting new features or change requests, and some tips on how to submit them effectively. A sample:

Imagine you’re in my shoes: you’re me, for a minute. Think about feature requests, for example - you have a list several hundred items long of really, really good ideas. You’ve heard pretty much everything multiple times, though now and again you do hear new ideas. Which just makes the list longer!

Then of course there are bugs to fix, schedules to meet, tests to run, docs to update, user interfaces to design, lots and lots of things. Most of your time is spent just sitting in a chair, coding, because that’s the only way things get done. (Oh, and then there’s email. And writing blog posts. And so on.)

Okay, to put it in a nutshell - the input is like a firehose, and there’s a ton of work to do, and both things are always true.

It’s excellent stuff and definitely worth the read.

Check out How to manipulate me (or, Tuesday Whipper-Snapping)

Posted by neilio at 10:36 PM | in Macintosh

divider.gif

August 16, 2005

Mighty Mouse Review

I bought a Mighty Mouse on Friday. It took a day to get use to it, and now I like it very much. The small ball gives you a feeling of precise control that I didn’t feel with a big scroll wheel.

My previous mouse was a basic Logitech 2 button with a scroll wheel. The Mighty Mouse adds another button (the side buttons). This is great for popping up Dashboard.

The software just replaces the Mouse and Keyboard pref pane. Painless install, and works as expected.

For $49 it’s fairly cheap. I don’t mind that it’s not wireless. My previous mouse wasn’t wireless and I never had problems. The cord always stays out of the way, so I really don’t see any advantage to wireless. I don’t want to deal with batteries or charging a wireless mouse.

My recommendation: Buy it!

Posted by sgehrman at 5:28 PM | in Macintosh

divider.gif

July 28, 2005

The real reason Apple is switching to Intel

Here’s a scenario that I’m sure people at Apple have pondered. What happens when Linux improves their GUI and ease of use to the point where it’s as easy to use and install as Window’s or a Mac?

When this happens, (and it will happen) Apple will have two serious competitors running on Intel and Apple will on PPC. With two serious competitors on Intel, and Apple on PPC, Apple will lose. Not because OS X wouldn’t rule, but I think the public, business leaders and hardware manufacturers will have even more reason to standardize on Intel hardware.

Everyone will buy their PCs from Dell, Lenovo, or Wal-Mart and install Windows, Linux or both. Developers will follow since they can buy one PC and develop for two platforms.

It would be pretty tough for Apple to convince people to buy a PPC when an Intel machine has more options even if those options aren’t as good as OS X.

Apple is also ensuring their OS can run on a generic Intel PC motherboard. If they ever get out of the hardware business, they can easily bundle OS X with a Dell, or other generic PC without any disruption. Their OS will already be rock solid on Intel if that day ever comes.

Posted by sgehrman at 4:36 PM | in Macintosh

divider.gif

June 15, 2005

Intel Inside: Great News!

WWDC was very cool. One of the best features was the availability of Intel macs in the labs to test and compile code. I brought the Path Finder source on an external firewire disk, mounted it on one of the Intel macs and compiled everything without any problems. The switch is going to be absolutely painless.

Apple isn’t releasing any specs on these new Intel Macs, but from my experience they were very fast and extremely quiet. The machines in the lab were single processor Pentiums running at 3.6ghz (If I remember correctly). They had hyperthreading, so it acted like a dual processor. I didn’t take any official timing tests, but it seemed faster than my dual 2.5 G5, and the fan never rose above a whisper. My G5 fans kick in to high speed every-time I hit the build command in XCode, so the silence was almost disturbing. I wasn’t use to the quiet!!

Another thing that was noteworthy. The Intel Mac towers are almost empty inside except for the motherboard and a tiny heatsink. No huge heatsinks like on the G5s. Hopefully this means Apple will be able to shrink the size of the towers, or add more processors.

So, look forward to the new Intel Macs, they are going to rule.

Posted by sgehrman at 6:55 PM | in Macintosh

divider.gif

November 6, 2004

Optimized Firefox for the Apple G5 processor

(I originally posted this elsewhere, but thought someone here might be interested... Note that this is not an official Cocoatech release and is provided with absolutely no warranty, guarantee, or anything else like that. Your mileage will most certainly vary. That said, I might be cajoled to help with problems if you can't get this to run, etc.)

firefoxUPDATE November 9th: With the long-awaited release of Firefox 1.0 comes a G5-optimized version. This version should be identical to the 1.0 release with the exception of the custom form widgets and the application icon - only official builds are allowed to use the Firefox branding.

Download Firefox 1.0 (G5 edition) (10.2mbs, bzipped).

I will probably start building G5-optimized versions again once the main trunk codebase for Firefox gets all of the 1.0 branch UI changes (icons, find-as-you-type bar, etc.), but this is pretty much it for the nightly builds for now.

The only other thing I want to try and figure out is how to build localized versions of Firefox - I know there are quite a few German folks that are downloading this build, and I personally would like a French-localized version. If that interests you, keep checking back and I should have something up in the next day or so.


For the past two weeks or so I have been running a totally kick-ass nightly build of the Mozilla Firefox web browser optimized for the Powerbook G4 processor. Because it was created specifically for my laptop's CPU, it is noticeably faster than the normal nightly builds. If you use a Powerbook (or iBook G4), you should check it out.

Now that I own an iMac G5 (which I plan to post more about soon), I figured it would be interesting to see if I could build a version of Mozilla Firefox for the G5 processor.

With help I managed to get a version to build successfully. All of the rampant nerdiness was worth it: Wow, does this build fly on my iMac. For those of you who run a machine with a G5 processor in it (and who use FireFox), give it a try and let me know what you think.

Update: please see this post on my personal weblog for up-to-date download links and information. -- neilio

Posted by neilio at 9:01 PM | in Macintosh

divider.gif

October 23, 2004

Apple bears more fruit

Well, well, well. It looks like good things have been happening for the Fruit lately:

  1. They finally ship the iMac G5
  2. 4th quarter results absolutely decimate expectations
  3. The iPod now accounts for a mind-boggling 92.1% of the market share for hard-drive based MP3 players.
  4. Steve Jobs comes back to work after recovering from surgery for pancreatic cancer, and introduces the “Kubrick” Apple Store.
  5. Another revision of the iBook is released, with minor speed-bumps, AirPort Express across the board, and cheaper prices. There is now an iBook under the magical $1000 US mark.

ibook.jpgOf course, like good little Apple fanboys, we had to break the ice on our credit card (encased in a lump of ice in the freezer) for some good ol’-fashioned spur-of-the-nerd-moment consumering, and a 20” iMac and 12” ibook are now winging their way to our greedy little mitts. We’ll try really hard to not let our drool tarnish the Apple cartons when the goods arrive, and perhaps post some unpacking photos and the like for those who like this kind of thing.

Ain’t being an Apple user great these days? I, for one (being up here in Canada, where our currency regularly gets the stuffing kicked out of it by the almighty U.S. dollar) am eagerly awaiting the launch of iTunes Canada, which is rumoured to be coming this Tuesday, the 26th. I remember reading somewhere that Australia might be one of the other countries that finally gets iTunes store access, too. Just another way of sending our hard-earned monies to the mothership, I suppose…

On a more site-related note, this post marks the first of hopefully many that I will be posting to the site. I’ll take a moment to introduce myself later, but for now you can expect more Apple gossip and chit-chat, various musings, and (of course) Path Finder and other Cocoatech marketeering (ahem) as we dust off this woefully under-utilized section of our site.

Feel free to leave your comments (but don’t put a stick in anyone’s eye unless they deserve it), but please keep support questions to either the official discussion forum, or by sending us a support email. Thanks!

Posted by neilio at 7:53 PM | in Macintosh

divider.gif

May 16, 2003

Apple WWDC

I'm going to San Francisco next month to attend the WWDC. If your going to be there and want to meet, please send me an email.

I'm not a complete computer geek. I plan to have some fun in San Francisco, so let's get together, the more the better.

Posted by sgehrman at 9:06 PM | in Macintosh

divider.gif

March 17, 2003

Display sleep problems solved…

I recently replaced my aging dual-500 and bought a dual-1.25 G4.

The machine works great, but it had this annoying problem when the computer was put to sleep. When I tried to wake it from sleep, the monitors would stay dark. I called Apples support line, talked with 4 different support people. No one had a clue.

A few days ago I saw a post on the internet that explained how to reset the nvram, so I tried it and it worked.

Here's what I did:

Restart the computer and hold down the cmd-option-o-f keys. This boots the computer to an open firmware prompt.

At the prompt, type "reset-nvram" and hit return. Then type "reset-all" and hit return. The computer is automatically restarted.

Why didn't Apple support suggest this? I have no idea. It seems like an obvious thing to try first.

Posted by sgehrman at 4:34 PM | in Macintosh

divider.gif

March 4, 2003

WWDC Tickets? Anyone?

I want to go to WWDC this year, but I'm kind of broke after just purchasing a new G4, 23" Cinema, new desk, laser printer and file cabinet. Now I'm back in debt... :(

If anyone has a ticket to WWDC ticket that they are not going to use, please transfer it to me!! :)

My ADC ID is sgehrman

Posted by sgehrman at 5:27 PM | in Macintosh

divider.gif