Bazaar Launcher (dock icon) for Mac OSX

Bug #505692 reported by jjh on 2010-01-11
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar Mac Installers
Wishlist
Gordon Tyler

Bug Description

Problem:
On the bazaar explorer website with instructions for installation on Mac OSX http://doc.bazaar.canonical.com/explorer/en/install-osx.html it says I should make a shortcut on my dock (launch bar / Finder bar / task bar / whatever else you call it) to ease the launching of bzr explorer. This is a good idea, but not a trivial task, and no help is given.

Suggested solution:
Update the site with more specific instructions

More specific instructions:
I found out the following way to create a dock icon for the OSX Dock bar:
1.) Open Apple's Script Editor application
2.) Enter the following applescript:
-- open the bazaar explorer
-- the "&> /dev/null &" appendix makes that applescript does not wait for the shell script to terminate.
do shell script "/usr/local/bin/bzr explorer &> /dev/null &"

-- try to activate the python window (=the bazaar explorer)
repeat 12 times
 try
  tell application "Python" to activate
  exit repeat
 on error
  delay 0.5
 end try
end repeat

3.) Save the applescript as application
4.) Download a nice logo from http://wiki.bazaar.canonical.com/LogoOptions and apply it to the application
5.) Drag the application to the dock

I am attaching a .zip file of the resulting "Bazaar Explorer.app" bundle.

Even better solution:
Offer an application bundle (like the one I am providing here) so it is automatically installed with Bazaar Explorer

Tags: mac Edit Tag help

jjh пишет:
> ** Attachment added: "Zipped "Bazaar Explorer.app" application bundle for launching bzr explorer from the MacOSX dock"
> http://launchpadlibrarian.net/37701724/Bazaar%20Explorer.zip
>

Thanks for the feedback. We need some Mac developer to integrate this
into either Mac installers or bzr-explorer itself.

jjh (jjh-nospam) wrote :

if found that my suggested applescript works fine in my situation, but there is a problem for a more general use:

the "&> /dev/null &" appendix (see original post above) makes that applescript does not wait for the shell script to terminate.
but unfortunately, redirecting the output of bzr explorer to /dev/null also breaks the way bzr explorer usually asks for passwords (e.g. when pushing over ssh)

possible solutions:
a) can bzr explorer be configured so it uses a dialogue box instead of the commandline to prompt for passwords?
b) using ssh keypairs on the client and server instead of password authentication
c) otherwise, we will need an open Terminal.app window that can prompt the user for passwords - but i would appreciate not having to see a terminal window everytime i want to use bzr explorer

Changed in bzr-explorer:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: mac
Ed Holzwarth (eholzwarth) wrote :

Thank you for creating this app -- this or a native equivalent should definitely be included in the Bazaar OSX installer.

Unfortunately the way it was built requires Rosetta on Snow Leopard, which I'd rather not install, so I created my own in the AppleScript editor using the script you wrote. Would you mind posting the icns file you used? I'd rather not spend 20 minutes downloading images from the wiki and building an icon :\

Regarding the password prompt issue in Terminal -- can it can be avoided with passwordless login, or not?

It seem we are 95% of the way to a great Bazaar GUI experience on the Mac, so this missing 5% is pretty frustrating.

Thanks

jjh (jjh-nospam) wrote :

@Ed, posting the icns file:
See the .zip file I posted above, it contains my applescript application with the logo applied. You can copy the logo from it by going File > Info, selecting the icon in the info-panel, hitting Mac-C. Then you open your application's info panel, select its default item, and hit Mac-V to paste my icon unto your application. See http://support.apple.com/kb/ht2493 for a more verbose description of how to copy icons.

Mitsuhiro Koga (shiena-jp) wrote :

Hi, all
I also made a similar application program.
After starting Terminal by the following codes, this application program executes bzr exploer.

osascript 2>/dev/null <<EOF
tell application "Terminal"
activate
do script with command "clear; $bzr explorer; exit"
end tell
EOF

Because this application program is a shell script, it is possible to execute it also with Intel Mac and PPC Mac.
Moreover, because Terminal is seen, the password can be input.

dixius99 (dixius99) wrote :

Just wondering what the osascript line is supposed to do in the example above (I'm not good with AppleScript). When I try to execute, I get "A number can’t go after this identifier."

Mitsuhiro Koga (shiena-jp) wrote :

I'm sorry. It was my insufficient explanation.
The above-mentioned example is a part of the script of the attached application.
Please input the following code if you execute it from the command line.

osascript 2>/dev/null <<EOF
tell application "Terminal"
activate
do script with command "clear; bzr explorer; exit"
end tell
EOF

dixius99 (dixius99) wrote :

I think I should have read your note more closely. Thanks for the great application!

Gordon Tyler (doxxx) wrote :

This is the installer's responsibility, so I'll take a look at including this in the next installer.

affects: bzr-explorer → bzr-mac-installers
Changed in bzr-mac-installers:
assignee: nobody → Gordon Tyler (doxxx)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers