Archive for the ‘Apple/Mac’ Category

Google API’s and Mac

July 7, 2008

I have an old iMac that I’ve been using as a server. Because I like Linux, and because it was easier to configure LAMP (Linux, Apache, MySql, PHP) than the similar components in OS X, I installed Kubuntu 6.06 on it (I’ve always liked the KDE desktop better than the Gnome desktop, which is the default for Ubuntu). Everything was fine until I decided I wanted to try out a Google API.

Google APIs require PHP 5.1.4 or higher (actually it was needed for the Zend engine, which is required for the Google API). But Ubuntu 6.06 (and Kubuntu 6.06) didn’t have upgrades to PHP 5.1.4. After a lot of trials and failures, I decided to fall back on Apple’s OS X and install MAMP (Mac, Apache, MySql, PHP). This particular machine could only take OS 10.3.* on it, which limited the MAMP I could use. But it included PHP 5.1.6, so I was happy. For a while.

I got everything up and running again, and even figured out how to get local network access working. Then I got back to the Google API. The first step, with MAMP, however, was to secure it, since the default install is with user “root” and password “root.” So far, that wasn’t a problem since MAMP on this computer was only accessible on the local network, firewalled from the Internet. But using a Google API requires access to and from the web.

The MAMP application has a FAQ page, accessible from the start page, that looks really helpful, but isn’t. You can get there by clicking in the FAQ button at the start page:

MAMP start page

Of course, the part about which versions of the included programs are installed is helpful. But I had already checked that before I downloaded MAMP. It’s the part right below that, under the “How can I change the password for the MySQL database?” that is unhelpful.

MAMP FAQ page

First of all, mysqladmin is not in that location (/Applications/MAMP/bin/mysql4/bin/mysqladmin). It’s in /Applications/MAMP/Library/bin. The php config file location is closer to what’s listed: /Applications/MAMP/bin/phpMyAdmin/config.inc.php

Second, trying to run the suggested command in tcsh got me nowhere. It turns out the default shell was changed to bash in OS 10.3, but upgrades (which this is) keep tcsh as the default. Fortunately, bash is available, but the default has to be changed in the terminal preferences.

So, just to make sure bash is really there, go to the /bin directory in the terminal (using the Finder will just show the documentation):

bash in the Finder

Change the directory to root level by typing “cd /.” Then type “cd /bin” to get to the /bin directory. Then type “ls” to list everything in that directory (see bash listed in the screenshot):

While the terminal is open, go to the Terminal preferences:

Preferences

Notice the path listed is for tcsh:

tcsh set

Change it to /bin/bash:

bash path

Close the Preferences window, quit the Terminal application, and relaunch it. bash will be at the top of the Terminal window instead of tcsh now.

Now running the command listed in the FAQ page (with the path modification) will change the password in MySQL.  But before you actually press the Enter key to run the command, highlight the new password and copy it using the edit menu at the top of the screen.

/Applications/MAMP/Library/bin/mysqladmin -u root -p password NEWPASSWORD

(where NEWPASSWORD is the password it is to be changed to). The php config file will also need to be edited. I have eMacs on this machine, which worked nicely.  Don’t try to do it in Text Edit.  That will not work nicely at all.  Open the config.inc.php file (in MAMP’s phpmyadmin folder) in a code editor like bbedit or emacs. Find the lines

$cfg['Servers'][$i]['user']           =   'root';          //MySQL user
$cfg['Servers'][$i]['password']       =   'root';         //MySQL password

Replace ‘root’ in the password line with the one you copied. Save the file and close it.

Now, according to the MAMP faq page, it’s finished. Not.

It turns out there’s also a couple scripts to change in MAMP, documented over on network0.  There’s also a handy section on securing MAMP itself by password protecting the htaccess folder using an online .htaccess password tool (http://www.tools.dynamicdrive.com/password/).  So now that I’ve got it locked down it’s time to figure out how to open it up for Gdata on that Google API.  🙂

Advertisements

Online video clips

July 4, 2007

It’s time to share the pain here.

I have been trying to convert my presentation from the ALA preconference program two weeks ago to a video clip and make it available online, following a suggestion from Susannah Fox.

Converting it to a quicktime video wasn’t so bad, except that converting the whole thing creates a rather large file. So I decided to split it up. I finished part 1 and uploaded it to YouTube for a test, and linked to it from the North County Regional Library Sandbox to see what it looks like embedded in a page. Unfortunately, after many trials and gnashing of teeth, I have found that no matter how good the quality is, once the clip gets into YouTube, it is reprocessed and scaled down to a resolution of 320 x 264. The problem is that clips display in a larger window, so it has to scale back up, and becomes blurry.

For anyone interested in a how to do it, Clay Redding pointed me to this post on Digital Life: From iMovie to YouTube a.s.a.p.. Although I was exporting from Keynote to Quicktime, I was then importing it into iMovie and exporting it again in different formats. I finally just used the custom settings on the Keynote export window. It didn’t make any difference to YouTube. So I tried Google Video. As long as it displays at the “original” size, which is about half the size of the space it displays in, it is sharp. But like YouTube, it gets blurry when scaled up.

So, while I work out the issues involved in getting a good copy up and displayed, here are some pointers on exporting from Keynote for anyone who many be interested:

First, make sure everything transitions automatically, including the slides, and any “builds” within the slide. This means change any “click” transitions to automatic, and give them specific transition times:

Inspector box in Keynote

When you have it ready, or want to take it for a test spin 🙂 go to the file menu and select “Export”

Export from Keynote

First, note all of the options. Exporting to PowerPoint works fairly well, but you will have to do some cleaning up afterwards. PDF is good for creating a set of printed handouts. Images and HTML are totally useless if you have any animation, sound or builds in the presentation. I tried the iDVD option simply because I had never used it. It might be what you want if you like a pre-canned delivery with limited options after the fact. The Flash export actually worked very well for me, but unless you are uploading to your own website, rather than linking to an online service like YouTube, it is not much use.

Custom drop down menu

O.K, so once you choose Quicktime, you can get to the custom settings by clicking on the Formats drop down menu and clicking on “Custom.” The Custom Quicktime Settings window will automatically appear.

You can go with the automatic size settings, or choose “Custom” from the drop down menu for video (this part of the presentation did not have any sound, so I selected “No Audio”), and put in specific numbers. It helps to keep a 4:3 ratio (which gives 1.3333~ when the width is divided by the height). In fact, Google Video pretty much requires the 4:3 ratio.

Export dialog window

Click on the “Settings” button to get to the real meat. If the Data Rate box is set to Automatic, you will have control over the Compressor quality (in the box on the bottom). Set it to Best Quality (multi-pass)

Custom settings, automatic data rate

Even if you set the compressor quality to best, it will change back to high if you select a specific data rate:

Custom settings, specific data rate

(Google Video requires at least 260 Kbps, but prefers 750). You can change the compression type; I tried some of the others, but the H.264 worked best for me. If you are going to import it into iMovie, you might be tempted to just use no compression. Don’t do this unless you are using a superfast processor with a gazillion gigs of RAM. It tries to create a file that is about 4 or 5 gigabytes (and that’s just from a small presentation), and will just freeze keynote.

Custom settings, compression options

You can also choose a different frame rate (the box on the left). It will default to 12 or 15. I suspect YouTube and Google Video just step it down to 15 no matter what is selected, although Google Video specifies “at least 12 frames per second.”

Custom settings, framerate options

Once you have all your selections set, click the OK button, which will take you back to the Custom Quicktime Settings window. Click the Next button and choose a place and file name, then click the Export button. You can sit and watch the progress in slow motion, but it might be a good time for a long break walking the dog or something:

Export progress window

It will take a while, and use a lot of processing power (the fan on my MacBook always kicks in after a minute or so until it finishes the export). If you want more options, select the highest quality compression, and import it into iMovie, where you can make further adjustments. Editing in iMovie may be another post, once I get the second part of the presentation done, which has a lot of animation and sound. 🙂

Flock browser for Macs

May 26, 2007

I have been slogging through applications, plug-ins, extensions, and widgets for anything related to blogs and blog posting on Macintosh (OS X). Since I download anything that looks like a possibility as I come across it, I invariably end up with a lot of stuff sitting around waiting for my attention. Sometimes it may be weeks before I actually get to a downloaded file, and have no idea what it is or why it’s there until I install it and try to use it. Such was the case with Flock, a browser for quick picture uploading. But it had mentioned something about blog posting (which is why I downloaded it).

So here’s the first post from Flock! The blogging part isn’t as obvious as the photo-uploading features. In fact, it looks like the blog part is really supposed to be an enhancement to the photo-uploading feature (you can drag and drop a photo you find on the web into a web-snippet bar to “hold” it, then drag it from the snippet bar into your post). But it’s findable through the menus, or the customizable toolbar. It pops up a blog editor which operates in editor mode or source code mode (for those who like to have total control).

The browser itself is like Safari and Firefox in the look and feel. It supports tabbed browsing, and will import your bookmarks from Safari or Firefox when it is installed. It even has extensions, like Firefox. In fact, on the site, there’s an interesting promise and caveat (snipped via the Flock websnippet tool):

Very soon you will be able to add your favorite extensions and we’ll convert them on the fly for you. Extensions written for other platforms can still be used in the Flock browser, but there is no guarantee that they will work correctly.

So for Mac bloggers, here’s the site:

Flock

[addendum: the tagging tool is for technorati tags only, so I had to edit the post here to add my own tags ]

[addendum #2:  once I had posted, my categories showed up in Flock.  Unfortunately, I can’t add categories, but it does show the ones I have already used on the blog.]

technorati tags:, , , , , ,

Testing and more testing

May 10, 2007

Somehow I have ended up with a copy of ViaVoice for Mac OS X. It appears to be the newest version, although I recall hearing something about it not being updated in the last couple years. This could be a problem for a new macbook. I decided to give it a try anyway.

The package comes with an instruction book and CD, a headphone/microphone combination attached to a USB adapter, and an audio plug to connect the USB adapter box to the audio output port on the computer. There are also a few other things I haven’t figured out yet.

I inserted the CD into the macbook slot, decided to actually read the instructions in the book and try tp follow them, and found the first minor glitch. The book assumes the CD will start on its own. I helped out and opened the CD. From there it is pretty much a no brainer, going step by step through plugging all the devices in and positioning the headphone/microphone, then going through an initial test to see if all the parts are working. Audio: check. Microphone: problem. It suggested I close the setup assistant and start over. Same thing. It suggested I restart the computer after plugging in the USB. O.K. Once again, the message: “It appears that your microphone may not be connected. Check your connections, close SetUpAssistant, and repeat this setup test again. You may need to restart your compuer after plugging in the mic.” Hmmmm. Back to the book: Getting Help; Obtaining Technical Support: “A solution to your problem might already exist! Before contacting technical support, check the Frequently Asked Questions database and the Tested Systems list. The Internet address is http://www.ibm.com/viavoice. Click the support link in the left panel on the web page. Then, select your speech product.”

I typed in the url and ended up at IBM software through a redirect. Clicking on the support link took me to their websphere section. Backing up and trying the support & download link at the top and searching through their software by name and category got me nowhere. There is no more viavoice on their site. There is a Websphere Voice, however. But there is no Macintosh version (I should have paid more attention to the discussion about ViaVoice a couple months ago). Nothing, nada, nowhere.

So I made a trip to friend Google and found: Nuance – IBM ViaVoice Release 10 Mac OS X Edition. Hey! The picture looks just like the box I have here! O.K., so after navigating through the site, I found this knowledgebase article: “Error message: ‘The microphone does not appear to be connected’ when using OS 10.2.” It actually has some very good information there, like turning ON the speech and microphone recognition in System Preferences. In OS 10.4 that turns on the native speech recognition, but ViaVoice still couldn’t get through. So, the next step was to reboot and try it again. Next: Remove the ViaVoice folder from the Applications folder, and the ViaVoice login from the users folder. But there is no ViaVoice login in the users folder. Sooo, Spotlight! then trash all the ViaVoice files (about 20 of them!), and empty the trash. Reboot, re-install, reboot, download and install the update, reboot, and try again.

Oooookay, first there’s the warning on the update download page, saying this is only for OS 10.2. But I download, reboot, install, and reboot anyway. It says to start the setup assistant from a specified path in the Finder menu, but it’s not there. Spotlight! again. This time it acted like it was recognizing the microphone, but not me. After a couple tries, and taking off the headphone, I tried one last time, fairly shouting the passage. Amazingly, that worked. So I put the headphone back on, and shouted into the microphone. Finally past that hurdle, I got to the testing voice quality. I spoke slightly louder than normal, and it said the quality was good. I tried again in a normal voice and the quality dropped to poor. After getting it back up to fair quality, I moved to the next section, which is to read passages as they are displayed.

I don’t think it’s supposed to be this hard. It’s beginning to dawn on me why I ended up with this: last one to arrive, having missed out on the previous conversation about how bad it is? But giving in to a masochistic streak, I finished the setup, and now have no idea what to do with it, especially since I’m now hoarse from reading aloud. On the upside, the reading passages were interesting.

Old World Mac

February 9, 2007

I actually have a couple of these hanging around (all the way back to a Mac Classic II!) But they’ve stayed in the background as I play with machines that are more likely to be still in use today. A couple weeks ago a friend mentioned he had an old powerpc and, being a windows guy, didn’t know what to do with it. So, trying not to look too excited, I offered to help him out, thinking, “Yes! Another linux box!”

When I showed up at his “warehouse” (he’s got about 50 computers at any given time, in various stages of completion), he took me to the latest delivery items, carefully stacked up, and pulled out a beige powerpc. We went to plug it into a monitor, when we noticed the adaptor plug for the monitor. As he went to look for a Mac mouse, I thought, “Uh oh, this bodes ill.” But it booted up, displayed on the monitor, accepted the mouse, and was running Mac OS 9.2.

Blinking through the fog covering my memory of OS 9, I got to the control panel and was able to see it had 384 MB of RAM, and at least 4 GB on the hard drive. As I was trying to remember where to find the processor information, my friend, who was in a hurry to pick up more computers, suggested I take it with me and work on it. The only proviso: I’d have to give it away (which is what he does with all the computers he refurbishes).

So home it went with me. I got a monitor from my dad (with the same give-away requirement) and found an old mac keyboard and mouse. The first thing I did was pop in an OSX disk just to see if it could install. OS 10.2 did fine, but there was a smug little message when I tried to upgrade to 10.3, telling me it just wasn’t going to work out. But I found it actually had a 6GB hard drive, and did indeed have 384 MB of RAM, as well as a 233MHz processor. There was a CDROM and floppy drive, a modem port for an external modem, an ethernet card, and serial ports. No firewire. No USB.

There was some more “This bodes ill” thinking as I started looking stuff up on the Web, and found just what Old World Mac means. Yeah, you can get Linux on them, but they’ve got to have OS 9.2 on them because that’s what Linux boots from, and it’s a real bear to get it on and working (I checked both Mandriva and Ubuntu). Figuring whoever got the computer would probably be happier with OS 10.2, and without the headaches of Linux on an Old World Mac, I abandoned that effort.

The OS9 disk has a nifty little feature in its Initialize Disk tool: write zero’s on the disk to completely wipe the disk for a totally clean install. But it’s hidden in the menus when you get to the Initialize window. So I went looking, found it, and let it run. It took at least an hour. Then I created two partitions: one 200 MB, and one 5.8 GB, both with the HFS+ file system.

I installed OS9 on the larger partition, then downloaded the 9.2 upgrade. Knowing some of these older computers do not like burned disks, I burned a copy of the 9.2 upgrade at 2X. It worked fine, except version 9.2.2 requires version 9.2.1 be installed first. Back to the Apple site, and pop in another CD-R.

After getting everything upgraded to 9.2, I moved the system folder to the smaller partition. Then I installed OS 10.2 on the larger partition. There was about 3.75MB left over. I stretched an ethernet cable across the house and plugged it in to get the rest of the OS updates. It still had Internet Explorer set as the default browser. So I downloaded Firefox and made a few changes to the dock. Then I went looking for someone to give it all away to.

Hello Freecycle! I posted a message in the local Freecycle, and the setup was picked up 5 days later. I threw in a couple unused program disks I had laying around, and a copy of Software for Starving Students. He seemed happy. And now I know all I want to about Old World Macs.