Archive for February, 2008

Set Safari’s window size with one click of the mouse

Safari window sizeOK, here’s a hint I think a lot of you Windows switchers are going to love, and I’m sure more than a few long time Mac users will appreciate as well. I love Safari. I think it’s the best web browser out there. My primary Mac is a MacBook Pro that I use in a dual monitor setup at home, connected to a 24″ widescreen monitor, and on it’s own when at work or on the road. I use Safari all the time, no matter where I’m at, and one thing that can be annoying is having to manually move/resize my Safari window whenever I switch between single and dual monitor set up. Since Safari is always running, this is something I have to deal with at least twice a day.

For the longest time I got around this by using an AppleScript, which I placed inside my ~/Library/Scripts/Applications/Safari/ folder (where “~” represents my home folder). Then whenever I’d switch monitor setups, I’d simply run that script from within Safari via the AppleScript menu on the top right side of the menubar. The AppleScript menu can be enabled using AppleScript Utility located in the /Applications/AppleScript/ folder. For those interested, this is the script I used:

    tell application "Safari"
    set the properties of front window to {bounds:{1, 23, 1200, 1194}}
    end tell

You can copy and past that code into Script Editor and save as a script with an appropriate name like “Set Window Size - External Display”. Just substitute your own values inside the curly brackets. The values correspond with x,y screen coordinates measured in pixels from the top-left edge of the screen, and indicate the location of the top left and bottom right corners of the window. In this case, my script told Safari to set the top left corner of the front window to 1 pixel from the left and 23 pixels down (to accomodate the menu bar), and the bottom right corner to 1200 pixels from the left and 1194 pixels down.

This script has worked well for me for several years, but it wasn’t quite as convenient as I would have liked since it required me to navigate and click on the Script menu, then click on the script I wanted to run. Being the lazy computer user I am, I’ve longed for a solution that would take one less click and would be even easier to activate. Then one day, I came across a useful hint in the ehmac.com forums about this simple javascript that you could save as a bookmark that would make Safari’s window full-screen:

    javascript:self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);

This was in response to a Windows switcher who really missed a simple way to make his browser window go full screen like Windows does when you click the maximize window. Thought it was pretty handy, so I added it to my Safari Bookmarks bar and called it “Full Screen” and left it there untouched for several weeks. Turns out I never want my Safari window to fill my screen since my displays are all fairly large and wide.

I guess today I had an epiphany. Lightning had just struck my brain (that had to hurt)*. If a Javascript can set my window full-size, then it should be able to set the window to any arbitrary size. Looking at the full screen javascript, it was ridiculously obvious how to modify it to fit my needs. Simply substitute the desired width and height in the resizeTo section like so:

    javascript:self.moveTo(0,0);self.resizeTo(1200,1170);

You could even specify a custom window position by changing the x,y coordinates in the moveTo section if you wish.

Bookmark bar iconsThis in itself is quite brilliant, but still a bit inelegant having bookmarks named “Full Screen” and “Big Monitor” taking up all that space on your Bookmark bar. So I came up with some nice simple bookmark names that visually represented what I wanted to accomplish in a way that would look a bit like an icon, and take a minimal amount of space on my bookmark bar, as seen in the image to the right. So from left to right, I have |-| to resize the Safari window for my small display, |+| to resize the window for my large display and |‹ ›| to resize the window full screen.

This is how they appear in my Bookmarks window:

Window bookmarks

Just to clarify, the “|” character is achieved by pressing shift+\, and the ‹ › characters are created by pressing shift+option+3 and shift+option+4 separated by a space on a Mac. These symbols are smaller than the standard less than and greater than symbols “< >” and make for a nicer looking icon in my opinion. I was also trying to make all three “icons” appear as similar in size as possible for consistency sake and to strengthen the illusion that they are icons. What you name your bookmarks doesn’t make any difference to how they work, so be creative if my choices don’t fit your likes or needs. If you think you’ve improved on my names, let me know in the comments!

Having one-click access to these controls directly within the window is not only more convenient, but also more intuitive. It may not seem like a huge improvement over my previous AppleScript solution, but when you do the same operation multiple times a day, every day of your life, all those clicks really add up. Sometimes, it’s the little things that make all the difference.

7 comments February 29th, 2008

I feel so dirty…

MS-DOS NightmareToday at work I had to make a DOS boot disk so I could secure erase the hard disk in a really old PC before it got disposed of. I had to call upon knowledge and experience I haven’t used in years and that I’d rather hoped I would never have to again. I won’t bore you with the details, but suffice it to say, what should have been a 5 minute operation ended up wasting over an hour and a half of my time between a bad floppy disk, incorrect instructions I was given and stupidly bad source files for the scrubber utility that included a misnamed program file. So after overcoming all the other obstacles, I still had to figure out why I was getting a “bad command or filename” error in the middle of what was supposed to be an automated process.

It was really surreal, and took me back to a dark time in my life when I had to deal with those kinds of problems on a daily basis. A time I never want to have to revisit again. I feel so dirty. I’m going to have to spend an extra amount of time using my Mac to try and cleanse me of this disgusting feeling.

It amazes me that PCs still ship with floppy drives in them to this day. Apple’s first floppy drive-less computer, the original iMac will celebrate it’s 10 year anniversary this year. It’s been over 9 years since Apple dropped the 3.5″ floppy drive from all it’s products. Really punctuates the Windows PC industry’s bizarre obsession with outdated technologies, doesn’t it?

5 comments February 27th, 2008

Switching ISPs: Good-bye, Bell Sympatico. Hello TekSavvy! [Update 1]

Sympatico In Trash[Update 1] We Canadians put up with a lot of abuse from our telecom/internet providers. As if high prices and poor customer service weren’t enough to endure, we’ve also put up with data transfer caps on supposedly “unlimited” internet connections and now our supposedly high-speed internet connections are only high speed for some types of data, but not others. To quote an early 90’s infomercial marketing slogan, stop the insanity!

Our government, via the CRTC, have been trying their best to inject some competition into the Canadian telecom market for a few years now, but phone number portability and competition in the DSL and home phone markets will only make a difference if customers actually start switching. It’s understandable that the majority of Canadians are reluctant to switch from one of the major providers to a relative newcomer, but really, what have you got to lose besides maybe a little inconvenience?

Up till now I was content to pay a premium for my Sympatico high-speed DSL internet service from Bell for the peace of mind of knowing I was dealing with a large incumbent that had the resources and experience to give me a reliable connection. I switched to Bell from Rogers when Rogers threatened to cancel my service because I was exceeding their monthly data transfer allowance. Bell’s Sympatico service had no such limits.

But recently, Bell Sympatico implemented traffic shaping to limit the speeds of P2P filesharing transfers during peak hours to a maximum of 30KB/s. I was resigned to live with that, provided it didn’t get any worse.

As someone who hosts their own webserver, I’ve always wanted a static IP address, but because I only run it as a hobby, I couldn’t justify the $100/month it would cost me to get a business internet account, which is usually the only way to get a static IP from Bell or Rogers. To make matters worse, business accounts are usually even more limited on data transfers than consumer accounts. So I’ve been resigned to using dynamic DNS solutions to keep my artofgeek.com domain name properly pointed to my server at home.

Last weekend, I was seeking advice about email server configuration on the ehmac.ca forums and user John Clay was kind enough to respond recommending I switch ISPs to one that doesn’t block mail traffic and offers a static IP. He then mentioned that TekSavvy, a local Ontario DSL ISP offers static IPs for just $4 extra per month.

That sounded too good to be true, but I was definitely intrigued. A quick visit to the TekSavvy Solutions website later, and I was pleasantly surprised to find that I could get the same speed of DSL service with unlimited bandwidth AND a static IP address for $4 LESS per month than what I was paying Bell. The icing on the cake was that TekSavvy does not shape traffic or block any ports AND, you can use any standard DSL modem to get your connection.

So let me sum up:

  • Same speed as my existing Sympatico service.
  • Unlimited bandwidth usage.
  • Static IP address for hosting my server.
  • No port blocking of any kind.
  • No traffic shaping or speed limiting (hurray for Bittorrent!).
  • Can supply your own modem.
  • $4 less per month than what Bell is charging me.

That’s $43.95/month. Wow. Game over. I’m sold. So I called Bell today to cancel my service, followed by a call to TekSavvy to subscribe to their DSL High Speed Internet Unlimited residential service.

Now to be fair, you still have to buy a DSL modem, which TekSavvy charges $100 for, plus $10 for shipping. But here’s where TekSavvy’s open modem policy comes in. A 5 minute Google search, and I found speedtouch.ca that sells the exact same modem TekSavvy was going to sell me (the Thomson SpeedTouch 516) for $50 + $12 for shipping. Bell was charging me a perpetual $2/month to lease my modem, and you have no choice but to buy or lease their modem. So as long as my new DSL modem lasts more than 2.5 years, it’ll pay for itself, and I’ll save an additional $2 per month after that.

So that’s it. With just a bit of hesitation, I took the plunge. My service is scheduled to switch over from Sympatico to TekSavvy on March 18, 2008. There will be a bit of downtime during the switch, but hopefully not more than 6-12 hours. Afterwhich the Art Of Geek website should be even more reliable than it’s ever been. The most common cause for the site being inaccessible has been the dynamic IP changing every time my modem or router had to be rebooted. This will no longer be an issue. To top it all off, I will be free to run my own email server if I want to, and I can look forward to getting my bittorrent files downloaded in record time again. Needless to say, I’m really stoked about the switch.

So if you’re curious about how the switch goes, check back here after March 18. I’ll be sure to update the Art Of Geek blog on how it goes.


Update 1 - 2/21/2008, 1:10 pm: My Thomson SpeedTouch 516 (link to pdf) DSL modem just arrived from speedtouch.ca. I’m all excited to get it set up, unfortunately, I have to wait another 26 days for my service to get cut over…

15 comments February 19th, 2008

Why on earth did Microsoft buy Danger Inc.???

Microsoft - Danger SidekickBefore I owned an iPhone, and a Nokia E61 before that, and a BlackBerry 7290 before THAT, I briefly owned a Danger HipTop on the FIDO network. I returned it and went with a BlackBerry mostly because of the sheer size of the HipTop. I just couldn’t justify carrying that brick around. If only it had been smaller, I might have kept it. I’ve long had a bit of a fascination with the HipTop series of devices from Danger, and they have improved on the size of their device over the years, but I don’t think the size improvements for the most part have kept up with the industry. They’re still fairly bulky.

That being said, they had a pretty decent hardware design concept, a very usable OS (although the interface was a tad childish for my taste) and a promising platform/application distribution strategy. But one thing they have never been is particularly successful in the overall handset market. So I’m a bit confused (and saddened) by this latest news that the Borg has gobbled up Danger, Inc.

“Sure, the folks in Redmond didn’t get their grubby mitts on Yahoo! (yet), but at least they picked up a little something for their mobile division, namely: Danger. According to news just crossing the wires, the monolithic company has picked up the Sidekick-creators for an undisclosed amount, and will subsequently fold the phone-maker into its mobile wing. Is there a Windows Mobile version of the Hiptop in our future? Survey says yes.”

There’s no doubt this has something to do with RIM and iPhone’s threat to Windows Mobile, as well as the impending Google Android threat, but at first glance, it’s difficult to understand what Danger might have to offer Microsoft.

Danger used to be a hardware designer, so Microsoft may be looking to enter the handset market with this purchase. But if they wanted a cool hardware design, they could have done better than Danger, who aren’t exactly selling HipTops by the truckload. Why not buy Motorola’s mobile business instead? Motorola is officially considering divesting itself of it’s mobile phone unit, after all. I don’t think this has to do with hardware though. For one, Danger has all but given up on the hardware, just one look at Danger’s website makes that imminently clear. Other than in a YouTube video, I can’t find pictures of their HipTop anywhere.

Microsoft also runs the risk of pissing off their existing Windows Mobile license owners. Something they can’t afford to do right now. They did that in the DAP market when they launched the Zune, which has failed to make any serious inroads against the iPod/iTunes juggernaut while at the same time weakening their existing PlaysForSure Certified for Windows Vista licensing effort (what was up with that rebranding move anyway?!?).

I also find it hard to believe that Microsoft sees any real value in Danger’s software, given that Microsoft has their own mobile phone OS. Microsoft has demonstrated long ago that it doesn’t need to pay for a good software idea, they can simply borrow it and make it their own. So what is it then?

I believe the answer to that question lies in these images from Danger’s website. One depicting the “Danger experience” and the other of their new business model:

Danger services solution
Danger business model

These images depict a total solutions company. A company that can offer everyone in the ecosystem value, and more importantly provide a source of income from all levels. Microsoft’s current offerings only directly targets the OEM handset makers and the end users and completely leaves out the service providers, where most of the money is. Meanwhile, Microsoft’s two biggest competitors, RIM and Apple, have already figured out how to tap into the service provider revenue stream. RIM by providing the backbone service to it’s mobile email offering, and Apple by giving it’s partners a very compelling phone to lure subscribers with, as well as back-end services like the iTunes WiFi Store as well as email/information services through partnerships with other providers such as Google and Yahoo!.

Danger, once largely a handset OS/hardware company has already done all of the legwork to turn itself into an end-to-end solutions company. So by buying Danger, Microsoft acquires much of the knowledge, technology and relationships it needs to shift from being simply the maker/licensor of the Windows Mobile OS into a complete solutions provider in a bid to better position itself against the offerings of it’s competitors.

Overall, this seems like a smart move, but how easily it can be accomplished has yet to be seen. Danger’s technology has been about open standards and the use of Java. It’s no doubt going to take a lot of work to integrate it with Microsoft’s proprietary OS and APIs, but probably not as much work as trying to develop a similar solution from scratch, especially considering Microsoft is late to the party and was obviously completely unprepared to deal with not one, but two giants suddenly entering the market.

Unfortunately, there’s very little doubt that the current Danger mobile OS’s days are numbered, much to the sorrow of current HipTop/Sidekick fans. Less clear is the fate of the HipTop swivel screen form factor. Microsoft might choose to develop it further and use it to release it’s own handset (a.k.a., the Zune phone), or they might continue to license it out for others to build and brand as their own. What they choose to do really depends on how big the market is for the swivel device. Given that it wasn’t that wildly successful to begin with, Microsoft might just let it die a quiet death.

So HipTop/Sidekick fans, what’s worse? The form factor disappearing altogether, or living on it’s existance running the uninspiring Windows Mobile OS? Sound off in the comments or discuss it in the Art Of Geek forums!

1 comment February 11th, 2008

Show your colours, Canadian iPhone owners!

Canadian iPhoneHey there fellow Canadians! Do you have an unlocked iPhone operating on a Canadian GSM network? If the answer is yes, then stand proud as you’re a member of an elite group of people who are willing to stop at nothing to talk, text, surf, work and play on the best mobile phone out there! So what better way to show others you’re proud to be part of this distinguished group but to plaster the Canadian flag across your screen for all the world (or just passers-by) to see!

I did some searching and couldn’t find a Canadian flag wallpaper anywhere on the web, so I decided to take matters (and PhotoShop) into my own hands and create one. I figured I’m probably not the only one who has wanted to do this, so I’m making my simple creation available for others to download and enjoy.

Canadian Flag iPhone WallpaperSo how do you get it on your iPhone? Just right-click (or ctrl+click) the image on the left and choose “Save linked file” (or whatever the equivalent is on your browser/OS of choice) or click the image to open the full size version in a new window and drag it to your Desktop. Then add it to iPhoto and put it in a Photo Album that you have set to sync with your iPhone in iTunes and sync your iPhone to transfer it over. On the iPhone, open Settings–>Wallpaper and choose the image from the appropriate photo album and voila! Windows users, just do the equivalent steps for Windows using your photo organization/sync method of choice.

More advanced users may choose to copy the file directly to the iPhone’s wallpaper folder using scp or sftp. If you fall into this category, then you already know what you’re doing, so you don’t need me to spell it out for you.

Enjoy!

P.S. If you’re wondering how I got the screenshot of the iPhone lock screen, I followed this hint from ZDNet.

Add comment February 8th, 2008

Unlock for 1.1.2/1.1.3 out of the box iPhones released [Update 1]

1.1.2, 1.1.3 OOB iPhones unlocked[Update 1] Good news for those who have been waiting for an unlock solution for iPhones that ship with firmware 1.1.2 or 1.1.3 out of the box. An iPhone hacker named George Hotz (a.k.a. geohot) has just posted an unlock solution for you.

Details and instructions are a little technical though, so unless you understand everything that he says in his blog post, you might want to hold off until someone posts an easy to follow tutorial and we have more reports from people who have done it successfully. Reading through the comments on geohot’s blog post, someone posted this link to one page in a very long thread on the Hackint0sh forums which explains things step by step, but please note that I haven’t tried this myself. I cannot vouch for the quality of the unlock or the accuracy of the tutorials, so proceed at your own risk.

Most users will want to hold off until someone packages this unlock into a simple one-button iPhone application. I’ll post an update once I’ve seen one.


Update 1 - 2/8/2008, 2:12 pm: A reported success story was posted in this ehmac.ca thread. They did a pretty good job of documenting the steps they used, so for those brave souls who want to try it, hope this helps!

Add comment February 8th, 2008

Previous Posts


Forums

Feeds

Categories

Tags

Browse By Date

February 2008
S M T W T F S
« Jan   Mar »
 12
3456789
10111213141516
17181920212223
242526272829  

Recent Comments

Links

Recent MacDailyNews Headlines

Recent Ars Technica Headlines

Recent Kotaku Headlines

Blog