Running Google Chrome with custom Proxy on OSX

Since Lion, Safari has a painful memory leak issue that keeps filling up all of my Mac’s ram when I keep the browser open for a couple of days (closing tabs after use of course). Since this is incredibly annoying, I ended up switching to Google Chrome and … boy that thing is fast!

However, I ran into an issue when I tried using Chrome at work: We have very $*#(%#@_ Proxy settings here. Long story short: Chrome only works with one given set of proxy settings, and all other applications only work with another set of proxy settings. The fact that Chrome absolutely wants to use the OS Proxy settings (in fact, doesn’t even come with custom Proxy settings) was a killer and made the whole browser useless to me… at first πŸ™‚

I started looking into Chrome extensions that promised to switch proxies and use custom ones… It looked to me like they were trying to change the OS’ Proxy settings, which is totally not what I wanted.

After some Google’ing, I finally came across this OSX hint. And YES, it works! πŸ™‚ Together with a little bit of Automator magic, here’s what I ended up doing:

  1. Β Open Automator
  2. select to create an Application
  3. Double-click Run Shell Script in the Library/Utilities folder
  4. replace the text content β€” cat β€” with the following:
    open -a “Google Chrome” –argsΒ –proxy-server=host#:port#
    (Replace host# and port# with the host and port numbers that you need to use)
  5. Save as application somewhere and use it to launch Chrome with your specified proxy.
That’s it, works πŸ™‚

Getting Things Done using Things

Uuh… what?

For those who are new to the subject, “Getting Things Done” (or GTD) is a task management methodology created by David Allen and described in his book “Getting Things Done – The Art of Stress-Free Productivity”. To be honest, I didn’t read that book, I read the corresponding Wikipedia article, in fact, let’s quote it:

GTD rests on the principle that a person needs to move tasks out of the mind by recording them externally. That way, the mind is freed from the job of remembering everything that needs to be done, and can concentrate on actually performing those tasks.

How I got into it

First off, I have a sh*t ton of information to manage at any given time. I have my job, a bunch of internet stuff going on and I’m part of multiple musical formations, so needless to say it rarely gets boring. I used to be able to manage all my tasks in-brain. However, seems I’ve hit a critical mass these days. Phone didn’t stop ringing, eMails were making my inbox explode and I kinda had the time for none of it that day. When the information rush finally ended, I was sitting there thinking “Hmm.. out of all that mess, what were those 2 things I wanted to do immediately?” — no clue! That’s when I decided I’d need a tool to manage my stuff.

Why Things?

After fiddling around a bit, I stumbled upon a Mac OS Application labeled “Things“, by a small company named Cultured Code. It looked pretty much exactly like my always-wanted-to-have task-management-application. Only downside (at the time) I thought was the price. I didn’t really want to spend $40 for it, +$10 for the iPhone version to sync tasks and take them with me on-the-go, which makes us $50 for a task management solution. But maaaan did that application look great.

So I decided to let my colleague take a look. He’s the “king of tools” at work and he actually read David Allen’s GTD book, so he was the perfect judge for a first-impression. After watching the “Things” screencast, he was like “Yep, that’s it, it’s almost perfect… If I had a Mac I’d go out and buy it”. After that, I spent several hours browsing through articles and forum posts. I ruled out any solution that would make me send my task data to a third party server like Remember The Milk, I just hate that thought! In the end, the only serious (Mac) alternative to Things seemed to be The Omni Group’s OmniFocus. But supposedly, that one would be less flexible by being bound too tightly to the GTD principles or at least less fun to use than Things. On a side note, OmniFocus is also twice as expensive. That made me reconsider Things’ price as not being too expensive after all.

I downloaded the Things for Mac demo and bought the Things iPhone application to be able to test the syncronization, which is epic btw. I’m 5 days into using it and applying general GTD principles now and I really feel like staying on top of my tasks a lot better than before.

I have yet to buy the full Mac application of things but before, I’d like to see if I have the courage continuing to apply GTD in my everyday life. I’ll try to report back as the experience goes on…

To be continued…

Getting rid of a hanging network share in MacOS X

I originally posted this on the forum, so I’ll copy/paste the relevant parts over here.

ICEBreaker wrote:

Hi troubleshooters,

I wonder if you could help me troubleshoot a problem I have with my shared network volume. I have my iMac and PC connected to each other through the ethernet. The iMac is set to read/write the shared network volumes on my PC. The Finder is used to set up the SMB connection. Everything works fine. Mac applications are able to read and write files to the PC.

However, after a day or so (during which the PC has been kept on, while the Mac has slept) problems occur.

Attempts to read/write to the directory results in the following error message:

Sorry, the operation could not be completed because unexpected
error occurred.
(Error code - 1407)

Attempts to eject the shared volume results in the following error message:

A disk on 'pcxp' is in use and could not be ejected.
Try quitting applications and try again.

In terminal, I attempt to identify the open files:

lsof | egrep 'pcxp'

and get the following result:

lsof: WARNING: can't stat() smbfs file system /Volumes/Share
      Output information may be incomplete.
      assuming "dev=2f00000a" from mount table
Dock     96534 user [...] 896612 /Users/user/Shortcuts/pcxp

I try to kill the dock’s connection to the open file:

kill -9 96534

The dock is relaunched but the problem remains, this time with a new process number 97642.

When I try to restart my iMac, the desktop will close, and only my wallpaper remains. There, it will remain hung until I do a cold boot.

Can anyone figure out what is wrong. It’s pretty annoying to have to reboot my Mac daily.

Thanks a lot for your help!

And here’s my reply:

LMAO, I was about to reply having the same issue. Then, while trying to reproduce the steps I took, I figured out the solution πŸ˜€

So I *had* exactly the same problem here between my Mac Pro and my XP PC. Same usage pattern (PC stays on, Mac sleeps every night). Fortunately, I only *had* this issue once in about two weeks, but it *was* annoying as hell!!

Some additional info I can provide on the issue’s behavior:

First off, I had 3 smb filesystems mounted when it happened. Let’s call them [smb1], [smb2] and [smb3] here. So I did the following:

  • At first,
    ls -al /Volumes

    -> yields only the local mounts, no smb mounts whatsoever.

  • Next, running
    sudo umount /Volumes/[smb1]

    -> HANGS, yes it blocks the terminal, tried to kill -9 the umount process without any success!!

  • At this point, even a simple
    ls -al /Volumes

    -> also HANGS the terminal.

  • lsof yields the following:
    lsof: WARNING: can't stat() smbfs file system /Volumes/[smb2]
          Output information may be incomplete.
          assuming "dev=2d000005" from mount table
    lsof: WARNING: can't stat() smbfs file system /Volumes/[smb3]
          Output information may be incomplete.
          assuming "dev=2d000006" from mount table

I was right about to give up, post this answer and hard reset the machine again when I tried the following:

sudo umount -f /Volumes/[smb2]

All of a sudden, the finder flashed a window (had no chance to see what it was) and the previously hanging ls and umount processes were gone! The finder GUI listed the smb shares on the remote server again and everything seems fine again!

So the steps to solve the issue would be:

  1. Run “lsof” in terminal
  2. See about what smb mounts it complaints
  3. sudo umount -f [any_failing_smb_mount]

Be aware though, that unmounting a filesystem using the force flag may produce unexpected results, but I guess it’s better than hard resetting the Mac and thus hitting the HDDs every day πŸ˜‰


Dr. House killed my Mac!

It is possible! It took me like 9 months but today I experienced my first kernel panic on my Mac. If you don’t know what a kernel panic is, it’s basically comparable to a “Blue Screen Of Death” in the Windows world. NOW ya know what I mean, dontcha? The biggest difference is the frequency at which it happens. While it happens regularly on Windows (at least on nearly all Win machines I have ever dealt with), seeing it happen on a Mac is quite a unique event. It has been said lots of times but let me join the chorus: Even BlueScreens (well, kernel panics in this case) look better on Macs… w00t!! πŸ˜€

Oh, and just in case you’re wondering what Dr. House has to do with it: The KP happened while I was browsing through an EyeTV Recording of Dr. House πŸ˜‰

Dr. House killed my Mac!

I just hope this was a software caused KP, because if it wasn’t, chances are that my RAM is dying… which would suck… but let’s be optimistic.

Today’s OS X bug award goes to…

… the “I’m not sure what resolution I’m running!”-bug!

Steps to reproduce:

  1. Schedule an EyeTV Recording for a given time.
  2. Make sure the EyeTV GUI isn’t currently running.
  3. Be sure you’re playing a game, e.g. Nexuiz in my case, by the time EyeTV should start to record the show.
  4. Also be sure that game uses a different screen resolution than what your OS X normally runs
  5. While EyeTV’s still recording, quit the game and select the EyeTV window
  6. There you are!

OS X Menubar bug

Don’t know if this is reproducible and if it’s an OS X or an EyeTV bug, but it’s funny: I select the EyeTV window and the menu bar snaps to a smaller screen, also EyeTV’s full screen mode is like a ninth of my screen size. As I select another application, like the finder, the menu bar snaps back to the full screen width and everything’s back to normal.

[Updated] Web Designer’s Nightmare: GIMP PNGs darker on MacOS X 10.5?

I absolutely don’t know where that problem comes from, but there seems to be a rendering issue under MacOS 10.5 Leopard with PNGs created using the GIMP. I stumbled upon this while I was working on a website design I created some time ago. I don’t know if this might be a feature of one of the involved tools but I don’t think so.

Since I switched GIMP and MacOS X versions simultaneously, I’ll mention the versions here to ensure the difference is reproducible. Although you may not see it (depending on your monitor), there is a subtle difference.

Continue reading