Safari Web Inspector

Here’s another tip for Safari. With Safari 3 Apple has added a new way to view source on a website. It will should you the code for a site in a collapsible tree. This is great for debugging code. In addition to HTML it will also show you style sheets, images, javascripts, and “Other”. There is also a console section that will show any errors that come up when you load a website.

One of the coolest things is the network area. It will show you how long it takes to load each individual element on your page, it puts this out in a time line that shows what is getting loaded when.

For some reason the Web Inspector isn’t enabled by default, so you’ll have to do a little work to get it. Here’s how:

  1. Quit Safari
  2. Fire up the Terminal
  3. Type:
    $ defaults write com.apple.Safari WebKitDeveloperExtras -bool true
  4. Restart Safari
  5. Right click some where on the page, and click on “Inspect Element”

I know Apple tries to hide this kind of stuff because most everyday users will never need to use this feature, but I think they should have put this in the preferences. There is an advanced section in there, with some less than advanced features. I’m not afraid of the big bad terminal.app, but many are.

If apple truly want to compete in the browser war this would be some good ammo. That being said, I still use Firefox 99.9% of the time.

One away!

I’m sure everyone has heard by now the Mountaineers are 1 win away from the national title game. This makes the upcoming Back Yard Brawl against Pitt even more exciting.

I think that the late great Jack Fleming had it right:


Given WVU’s successful season and that Pitt sucks, I’m thinking we’ll be OK.

Safari Debug Menu

I rarely use Safari to browse the web. I’m a Firefox fan. There is just something to be said for software that will run on any machine I sit down at, OS X, Ubuntu, Solaris, Windows, etc.

That being said I recently came across a website that required Safari for OS X users. This was annoying, but I fired up Safari and browsed back to the page. Then I got an error message telling me I needed to be on at least Safari 2 to view the page. This was obviously a case of the web master not staying up to date, as I was running Safari 3. I was pretty disappointed about this as the page is doing live video streaming of 3 upcoming WVU basketball games that are on the road and will not be on TV.

Fast forward to this evening. My co-worker told me I could download an application that would enable a debug menu in Safari that would let me change my user agent string. I thought this was a cool idea, but didn’t really want to install an app if I didn’t have to. So I started doing some research on how I could accomplish the same thing. My guess was that it was just a system preference that I would need to set in the terminal. The app was probably doing this in the background, transparent to the user.

I was right. I turns out this hack was discovered back in 2003.

Here is what you need to do to get your debug menu in Safari.

  1. If Safari is running close it. Make sure you quit the application, not just close the window.
  2. Open the terminal.
  3. type:

    $ defaults write com.apple.Safari IncludeDebugMenu 1
  4. Open Safari again
  5. Enjoy your new menu

If you want to take the menu out, do the same steps, except change step 3 from a 1 to a 0.

Sure enough after enabling this menu, I was able to change my user agent string. The website thought I was on Safari 2, and the content loaded as it should. Looks like I’ll be able to watch the Mountaineers after all.

OSX 10.5 Printing to Windows Printer

I still have 1 windows computer left on my home network. It is in our living room and has the printer plugged into it. I had Treah’s macbook setup to print to it in 10.4. It was a pain to setup and required setting up several virtual queues on the windows machine (see this how to for more info). Needless to say I was not happy to see that following the 10.5 upgrade the printer was missing from her computer. Setting this up in 10.5 was much easier and was able to talk directly to the printer, I was able to delete all of the virtual queues. Although easier, it still wasn’t as straight forward as I would like for it to be. Here’s what I had to do.

I went to set up the printer and noticed a new windows option in the printer preferences. I thought this looked promising, however the add printer button was disabled:

I started to click around trying to figure out how to get this option enabled. I never found it. I did find something even better. If you right click on the toolbar you’ll see a customize option, this will pop up a screen allowing you to add and remove icons from the toolbar. One of the icons available to add was labeled “Advanced”. Drag and drop this icon to your toolbar and click done.

Now that you have the Advanced icon, click on it. After letting your Mac think for a couple seconds, you will be presented with the following form:

Change the type to windows, fill in the url as “smb://user:[email protected]_computer/printer_share_name”. You can fill in the Name and Location fields to be whatever you want. The only thing left is to pick you driver and hit add.

If all goes well you can now print to your windows shared printer.

November 2007
« Oct   Jan »