Pedro's Space

A place to share my thoughts with the world.

Spatial Media Metadata Injector tool on M1 Mac

leave a comment »

Having just upgraded to a 2021 MacBook Pro (M1 Max) from my 2017 (Intel) model, there were always going to be the odd bit of software that there were issues running. The Spatial Media Metadata Injector app, used to inject Metadata into 360 videos so that the controls work when uploaded to YouTube was one of those. The app is available here:

https://github.com/google/spatial-media/releases

As this app hasn’t been updated since 2016, it’s not going to be a universal app, but even under rosetta, it closes immediately on launch.

As this is a python app, it can be launched via python from the command line: 

1. Install python if you don’t already have it, the easiest way to do this is to install it via homebrew with the command:

brew install python

If you’ve installed the apple silicon version of homebrew, then you’ll get the apple silicon version of python.

2. Download the source use from the above url and unzip it.  

3. Move the unzipped folder to somewhere permanent, I used:

/Users/peter/Projects/Python/spatial-media-2.1

4. Test the app with the following command (Modify path as required):

python /Users/peter/Projects/Python/spatial-media-2.1/spatialmedia/gui.py

Et Voila, the app launches.

However it would be nice to not have to use the terminal to run this every time, so use the shortcuts app to create a shortcut to run the command with a single action: ‘Run Shell Script’, into which you can paste the command that you tested.

You can then add the shortcut to the ‘Menu Bar’ folder in the shortcuts app. When you have at least one shortcut in there, an icon will appear in the menu bar through which you can run the shortcut.

Written by pedrocadiz13

14/11/2021 at 11:40 am

Posted in Computing

Java 8 on Mac OS X Yosemite

leave a comment »

I’ve recently had issues with my Macbook Pro that resulted in me doing a clean install of Mac OS X Yosemite. This was a good opportunity to ensure that I was using the latest version of as much software as possible including java.

Up until Java 6, apple provided their own version of java, but  versions 7 and 8 are now available directly from oracle. With java 6 being out of support, and 7 going out of support soon, I did not want to install anything older than java 8.

The only problem is that some applications are built around java, and the first time that you run them, they prompt you to install the legacy java 6 version from apple, even though java 8 is installed and is for the most part backwards compatible.

There is a solution:

Locate the file: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Info.plist

Find the <dict> entry and add the entries in bold as shown below, then save the file.

<dict>

<key>JVMCapabilities</key> 

              <array>               

                  <string>JNI</string> 

                  <string>BundledApp</string>

                  <string>WebStart</string> 

                  <string>Applets</string> 

                  <string>CommandLine</string> 

              </array>

              <key>JVMMinimumFrameworkVersion</key> 

              <string>13.2.9</string>

                <key>JVMMinimumSystemVersion</key> 

              <string>10.6.0</string> 

              <key>JVMPlatformVersion</key>

                <string>1.8</string>

                <key>JVMVendor</key> 

              <string>Oracle Corporation</string> 

              <key>JVMVersion</key> 

              <string>1.8.0_25</string>

   </dict>

 

You will now be able to launch apps with embedded java, without being prompted to download the legacy java 6 from apple.

So far the only application that I’ve found that won’t work with Java 8, is xDock for mac.

Tested with iAlertU and various adobe apps.

Written by pedrocadiz13

28/01/2015 at 9:58 pm

Posted in Computing

Tagged with

ReadyNAS Duo Sane Addon

leave a comment »

I spotted that there was a Sane add-on available for the readyNAS duo.

See: http://rnxtras.com/addons/sane-backends-readynas-4-sparc

I was curious to see if it would work with my ancient (now over a decade old, but still functional) Canon canoScan N650U.

As this is an old scanner, canon no longer support it and drivers are not available for 64bit operating systems, however it can be used on both Windows and MacOS with VueScan (https://www.hamrick.com/) but this has a more hefty price tag starting at $49.95 (~£30)

The Sane add-on is a commercial add-on, but at only $2.69 (£1.69) I though it was worth the risk.

Setting up the ReadyNas Sane add on

Having bought the add-on I installed it as an update to the readyNAS in the usual manner. Once the update was installed, and the ReadyNAS restarted, the  add-on showed up in the readyNAS UI, indicating that it was installed.

I connected my scanner to the USB port on the rear or the readyNAS. Unfotunately, the add-on does not give any indication that the scanner had been detected.

Setting up Sane on Windows

Setting up sane on windows was pretty straightforward, simple download sane from 

http://www.filewatcher.com/m/xsane-win32-0.991.zip.10243614-0.html

Extract the file, and copy the sane directory to the c:\ drive

note: sane must be installed in c:\sane, otherwise it will not work.

In order for sane to find the scanner on the network, edit the file c:\sane\etc\sane.d\net.conf and add the ip address of your readyNas on a new line to the end of the file.

in the same directory, check that the dll.conf does not have the net entry commented out (i.e remove the # symbol at the start of the line if it’s there).

You should now be able to launch xsane (in the bin folder), which will detect the scanner and allow you to preview and scan.

Making your sane scanner available as a TWAIN device

saneTwain provides a TWAIN driver that allows the sane scanner to be available to TWAIN capable applications such as Adobe Photoshop (more on photoshop later).

You can download saneTwain from:

http://sanetwain.ozuzo.net/downloads/setup136.exe

Simply run the installer to install.

This installs the saneTwain driver as well as a simple scanning interface called “ScanImage.exe”, that you can find in the program’s install directory.

TWAIN and Photoshop on Windows

Photoshop no longer ships with the TWAIN support, but you can download a TWAIN plugin for Photoshop here:

http://helpx.adobe.com/photoshop/kb/twain-plug-photoshop-cs4-cs5.html

This page also includes installation instructions. (Its simply a case of extraction the zip and copying one file!)

Note that the TWAIN plugin is 32-bit, so if you want to use your scanner, you’ll need to run the 32-bit version of Photoshop (I’ve tested this with CS5).

 

Setting up Sane on Mac OS X

Setting up sane on mac os is a bit more involved:

You’ll need to download TWAIN Sane from the following website:

http://www.ellert.se/twain-sane/

You’ll need the four files that correspond to your version of Mac OS (Mountain Lion or Mavericks)

  • TWAIN Sane Interface
  • Sane Preference Pane
  • Sane backends
  • libusb

Download the above installers and install them in the reverse order to the above list.

Open the sane preferences in the system preferences.

Ensure that net is checked. If you know which driver your scanner uses (in my case the plustek driver) you can uncheck everything except the net and the required driver.

Screen Shot 2014 01 10 at 17 20 45

Click the ‘configure’ radio button corresponding with the ‘net’ entry. The following dialogue will open.

Screen Shot 2014 01 10 at 17 23 08

Enter the IP address of your ReadyNas on a new line at the end of the file (in this example 192.168.1.2).

Click OK, you’ll need to authenticate to save the changes.

 

Sane is now set up.

You can test the set up by entering the following command in a terminal window.

scanimage > test.pnm

 

This should create an image file in your home folder called “test.pnm” (this might take a few seconds).

TWAIN and Photoshop on Mac OS X

As with the windows version of Photoshop, you’ll need to download and install the TWAIN plugin for photoshop (available at the same page linked to above).

Note that you’ll need to run Photoshop CS5 in 32 bit mode (There’s a checkbox to set this on the Get Info dialogue for the application). 

This will not work in Photoshop CS6, as it can only run in 64bit mode.

Apple Image Capture

It should be possible to get the scanner working with Apple Image Capture, however I’ve not managed to get this working at this point in time.

Snac

Although photoshop CS5 and CS6 can coexist on the mac, for reasons that I won’t go into, I don’t like having two versions of the same software on the same machine. 

Since I’d rather use the latest version of Photoshop, which won’t be able to acquire images via TWAIN or via Image Capture, I need another way of acquiring images (TWAIN sane doesn’t provide any GUI for image capture).

Enter Snac.

Snac provides a simple GUI for capturing an image from a Sane source and can also be configured to open a default application after the scanned image has been saved. By default it opens the preview app, but configuring it to open Photoshop CS6 does work.

Perhaps this solution is not as elegant as importing from within Photoshop, it is an usable workaround.

There is one limitation though; Snac can only save images in two formats: PNM and TIFF. 

You can download Snac from:

 http://www.wallner.nu/fredrik/software/snac/

 

Update: I’ve had an issue scanning in greyscale with Snac. It turns out the solution was to simply change the “Greyscale’  to ‘Grey’ in the available modes field in the Snac preferences.

 

Other TWAIN applications

TWAIN is an old technology, rapidly going out of favour so the only other TWAIN application I’ve been able to test is Adobe Acrobat Pro (mac). Unfortunately Acrobat hangs after scanning completes.

Conclusion

Setting up Sane on the readyNas has pros and cons. On the plus side, the scanner can be shared. On the downside, the scanner is in a less convenient location but as this is already the case with the shared printer, its an inconvenience that we already live with and some desk space has been feed up. Lack of 64 bit support on both platforms is not good either. 

It has made VueScan somewhat redundant, other than perhaps the rare occasion that I want to do use the scanner away from home.

 

Written by pedrocadiz13

10/01/2014 at 6:14 pm

Posted in Computing

Geektools, iTunes and appleScripts

leave a comment »

I’ve just rolled back my mac to a previous Time Machine backup to find that quite a bit of stuff had not been backed up. As a result I’ve had to set up geek tools from scratch.

I previously had a geeklet that displayed the information for the currently playing track in iTunes, but quick google had shown that it should also be possible to display the album art as well.  I downloaded a few scripts / geeklets  but couldn’t get any of them to work, or at least not as I’d like so I ended up creating my own.

So here’s a quick write up of what I did, but first here’s a quick description of how this works.

First we need a folder in the current users Pictures folder called iTunes. This will contain three images:

1. empty.png (Transparent image)

Empty

2. default.png

Default

 

3. iTunes.png

The geeklet will run a script to replace the iTunes.png  with the album artwork for the current track or the default image if there is no artwork or no song playing.

 To allow us to get started of make a copy of the default.png file and rename it to iTunes.png. This will give us a visible image to display at first.

Add a picture geeklet to display the iTunes.png.

Next we need to create a script to display the song info and update the image. I did this in a single script although other solutions do this in separate scripts. Open the apple script editor an paste the following code:

set myPath to ((path to home folder) as text) & “Pictures:iTunes:”

set artworkItunes to POSIX path of myPath & “iTunes.png”

set defaultPic to POSIX path of myPath & “default.png”

 

set the_string to “”

 

if running of application “iTunes” then

tell application “iTunes”

 

 

if (player state is paused) or (player state is playing) then

set aTrack to current track

if player state is paused then

set the_string to “iTunes now playing (paused):

else

set the_string to “iTunes now playing:

end if

 

(* Is there any Artwork? *)

if (count of artwork of aTrack) ≥ 1 then

 

set artData to data of artwork 1 of current track

set fileRef to (open for accessartworkItunes with write permission)

try

writeartDatatofileRefstarting at 0

close accessfileRef

on error errorMsg

try

close accessfileRef

end try

error errorMsg

end try

 

else

tell application “Image Events”

set defaultData to opendefaultPic

savedefaultDataasPNGinartworkItunes with replace

closedefaultData

quit

end tell

end if

 

 

set the_string to the_string & “\”” & name of current track & “\”

if artist of current track is not “” then

set the_string to the_string & “Artist: ” & artist of current track & “

end if

 

if album of current track is not “” then

set the_string to the_string & album of current track

end if

 

if year of current track is not 0 then

set the_string to the_string & ” (” & year of current track & “)”

end if

else

set the_string to “iTunes stopped”

tell application “Image Events”

set defaultData to opendefaultPic

savedefaultDataasPNGinartworkItunes with replace

closedefaultData

quit

end tell

end if

 

end tell

 

end if

return the_string

 

Save the script as itunesCombi.scpt

You  can now add a shell geeklet to execute this script with the command:

osascript <path to script>

for example:

osascript /Users/peter/AppleScripts/itunesCombi.scpt

important:  Set both geeklets to refresh every two seconds.

If you launch iTunes, the default image will be shown along with the message “iTunes stopped”. 

If you play a song with artwork, the artwork will be displayed, along with the track info. 

If you pause the song, the artwork is still displayed, as is the track info, but with an extra message indicating that the song is paused.

However, you’ll notice that if you quit iTunes, the picture geeklet displays still displays the album art for the last track played. Ideally we’d want to display the empty.png.

We could add an ‘else’ statement to replace the iTunes.png with the empty.png when iTunes is not running. However as the geeklet refreshes every two seconds, this would mean that the image is replaced every two seconds even when iTunes is not running.

A better solution would be to detect that iTunes has quit, then run a script to swap the image. To do this we’ll need to download and install “Do Something When”.

This is an old program, no longer in development (the developers website is no long available) however it can be downloaded from the following url and it does work in Mavericks: 

http://download.cnet.com/Do-Something-When/3000-2344_4-50417.html

We’ll need to create a script for “Do Something When” to launch, but we’ll need to create the script as an application, otherwise “Do Something When” will open the script in the Apple Script Editor. To do this:

1. Open Automator

2. Choose “Application”

3. Type “Run” in the search field.

4. Drag “Run AppleScript” from the results into your application.

5. Replace the contents of the code editor with the following code :

on run {input, parameters}

 

set myPath to ((path to home folder) as text) & “Pictures:iTunes:”

set artworkItunes to POSIX path of myPath & “iTunes.png”

set blankPic to POSIX path of myPath & “empty.png”

tell application “Image Events”

set defaultData to openblankPic

savedefaultDataasPNGinartworkItunes with replace

closedefaultData

quit

end tell

 

return input

end run


6. Save your application as “iTunesCleanup.app”.

Now we need to set up a new rule in “Do Something When”.  “Do Something When” is installed as a preference pane, so open it via system preferences.

In the ‘Rule Name’ field enter “iTunes Cleanup”

There are two drop downs labeled ‘when’, change the second one to quits, then in the first one choose ‘browse to application’ and browse to iTunes,

There are two drop downs labeled ‘what’. In the first, choose ‘open’ and in the second choose  ‘Select Application or Document’ and browse to the “iTunesCleanup.app”

Set the delay to 2 seconds and save.

Ensure that the rule is active, “Do Something When” is ON and that “Automatically Start on Login is checked.

Screen Shot 2014 01 08 at 12 43 30

And that’s it; the album art will be removed when iTunes is not playing.

Here are some shots of what to expect:

iTunes running, but stopped:

Screen Shot 2014 01 08 at 12 46 33

iTunes playing:

Screen Shot 2014 01 08 at 12 47 19

iTunes paused:

Screen Shot 2014 01 08 at 12 47 57

iTunes not running:

Screen Shot 2014 01 08 at 12 48 28

Written by pedrocadiz13

08/01/2014 at 12:51 pm

Posted in Computing

Airport Extreme

leave a comment »

I’ve just treated myself to a router upgrade, I’ve just bought a new Airport Extreme. 

Unlike previous routers that I’ve had, you need to configure the Airport through the Airport Utility, which is provided with mac OS X or can be downloaded for windows, instead of via a web interface, which is the more usual approach.

Also unlike other routers, the Airport Extreme allows multiple wireless networks to be created. I effectively have three:

  • Primary network on 2.5 GHz band.
  • Primary network on 5 GHz band.
  • Guest network.

The 2.5 and 5 GHz networks are essentially the same network, but the 5GH is only visible to devices with network adapters capable of accessing it, this includes my Macbook Pro of course, but none of the windows machines on my network.

Since 5 GHz networks are relatively rare, colisions are less frequent therefore the performance will be better. I’m seeing a visible improvement in page loading times and next to no buffering when watching BBC iPlayer.  

Some of this improvement will be the speed increase between the router and my MacBook, but as the Airport Extreme supports Gigabyte Ethernet, there’s also an improvement between the router and my cable modem and between the router and my NAS, as the NAS also supports Gigabyte ethernet.

Plugin a USB hard drive into the Airport Extreme essentially allows an ordinary USB drive to be used as a Network Drive. I’ve connected a 2TB Seagate drive which I use as a Time Machine backup drive. 

Using a network drive as a Time Machine drive is slightly slower, the first backup can take a while, but as I broke my last USB drive by picking up the Macbook, forgetting that the drive was plugged in, causing it to fall on the floor, its much safer now as it’s plugged in to the router in a cupboard under the stairs.

It should be possible to connect a USB printer to the Airport Extreme and use it as a shared printer, however not all printers are compatible (mine wasn’t).

Mac address filtering can also be set up on the Airport Extreme, as with any other router but the set up is different from what I’ve seen on other routers. The major difference is that when you set up mac filtering you must also set up the times that the device that has this mac address is allowed to connect. This could be used to prevent kids devices from connecting after their bedtime for example.

Overall I’m pretty happy with the Airport Extreme, my only gripes are that it only has three ethernet ports, most other routers have four and the issue with the printer compatibly although, that’s more an issue with the device drives from Canon than problem with the Airport Extreme.

 

Written by pedrocadiz13

13/10/2012 at 6:11 pm

Posted in Computing

Tagged with

Mountain Lion Upgrade

leave a comment »

I’ve just pulled an all-nighter upgrading the OS on my Macbook Pro from 10.7 Lion to   10.8 Mountain Lion.

Most of that time was spent backing up my existing OS to an external usb hard disk (I managed to grab a couple of hours shut eye while that was going on). However, I probably could have got away without making a backup (not something that I would dream of recommending) as the process went so smoothly.

The installation didn’t take long, and after a restart it was time to do some testing.

The first thing that I checked was the ‘Incompatible Software’ folder that the installer creates. Much to my surprise, it only contained a single kext file for an application that I’d forgotten to upgrade beforehand.

Mountain Lion uninstalls Java, but prompts you to download and install it if you use any java applications. It turns out that iAlertU uses java, so I was prompted to install it immediately after startup. Testing that all was well with my java web applications and IDE lead me to the only issue that I’ve found with the install process;  the apache web server was failing to start. The issue was that the installer had reinstalled the modules folder but had retained the original .conf files. As a result apache was trying to load modules that were no longer on the file system. Restoring mod_jk.so and mod_mono.so from a backup solved this.

I then moved on to testing some applications and started with the ones that I thought would be most likely to cause problems. I tested some Windows games running on the mac under Wine; no problems. Tried VMWare and some emulators (Dolphin Wii Emulator, E-UAE Amiga Emulator and ScummVM). No problems.

Developer, System, Video, Audio, Photo, 3D modelling tools: tried some products from each category no problems, in that any thing that I could run before at least launches, only time will tell if there are any issues whilst  actually using these tools.

I had read that there have been some performance gains by moving to Mountain Lion. One article that I read described applications as opening instantly. I wasn’t seeing any such gains, but I did notice that the Spotlight indexer was running, so I left my mac running and went for some welcome sleep and returned after the indexer had completed. I could see immediately what the author of that review was talking about; Safari and Mail open instantly and the startup times for Contacts and Calendar are visibly quicker. However, I don’t see any such gains for any Apple products such as Garage Band that are supplied separately from the OS or indeed any third party applications. But this does give a glimpse of what’s possible and I’d hope to see Safari / Mail like performance for many apps in future upgrades.

I’m not going to go in to the new features offered by Mountain Lion, there are plenty of reviews out there that go in to these.

If I have one criticism of Apple, I’d have liked to have known in advanced that the upgrade would have gone smoothly rather than taking a shot in the dark. Microsoft had upgrade advisors for Vista and Windows 7 and no doubt for Windows 8, that identify any potentially problematic software on your system prior to an upgrade. If only Apple could do the same! 

All in all, I’d say that the upgrade has been a worthwhile exercise.

Update: I’ve since found another minor issue since upgrading to Mac OS Mountain Lion; That is that when trying to access web content in the ~Site folder (i.e. the user site) the message ‘Forbidden 403’ is displayed instead of the expected content. The fix is fairly straight forward and can be found at:

http://support.apple.com/kb/TA25038?viewlocale=en_US

Written by pedrocadiz13

28/07/2012 at 2:56 pm

Posted in Computing

Tagged with

Tablet Comparisons: Blackberry Playbook / Motorola Xoom.

with one comment

My wedding aniversary is coming up. I got my gift from my wife a bit early; A Motorola Xoom tablet. PC World were selling it reduced by £170 to £329, so I suggested that my wife buy it for me before the offer ended. In return, I’ve bought her the Blackberry Playbook, which arrived yesterday. So here’s a short review for anyone looking to buy either of these tablets.

Let’s start with the Xoom: This is a 10 inch tablet which runs the Android 3 operating system, the first version of Android aimed specifically at tablets.
The OS is quite intuitive and easy to use, but does have a couple of annoyancies. Firstly, there are no close gadgets for most applications, and those that you can close are often still kept running in the background. The OS is supposed to take care of disposing of inactive applications, although this doesn’t always seem to work. Having said that, it can be handy at times; if you reopen the web browser, it opens in the same state as when it was closed as long as you haven’t switched off the tablet. That leads on to my second annoyance; The lack of a software shutdown option. The blackberry scores well on both these points.

The Playbook is a 7 inch tablet and as such is a bit more practical in that you stand a more realistic chance of squeezing the Playbook into a pocket than the Xoom. Pairing the Playbook with a blackberry mobile is a breaze. You simply run the setup on the Play book until it displays a 2d bar code, then run the blackberry bridge app on the phone and show the bar code to the phone’s camera. The bar code contains all the information needed to pair the two devices. An excellent innovation. Admittedly I haven’t paired my Xoom to an android phone yet so I cannot compare the experience.

Blackberry bridge allows the tablet to sychronise mail and contact with the paired phone. One limitation is that the Blackberrry Bridge applications are only available when the phone is connected. You can not access email on the tablet without the phone, even when the tablet has a wiifi connection.

While the Blackberry OS have both software shutdown and properly closes applications on shutdown it is much less customisable than Android. You can’t group application shortcuts by type. You are limited to dragging the more commonly used ones to your favorites ‘drawer’. With Android on the Xoom I can drag icons to anywhere on any of the five screens allowing me to organize my application shortcuts as I like. There is also a free application that allows me to group similar applications that can then be launched via a single icon for each group.

Android also supports widgets, applications that run on the desktop, such as clocks, calendars etc. The Blackberry does have clock and calendar apps, but not as desktop widgets.

While both OSes are functional, the Blackberry OS probably less so, despite some clever innovations. No one buys any computing device for the OS alone, we all want to run applications and it’s on this front that the Blackberry disappoints. Not in it’s capability, but in the available applications from Blackberry ‘App World’. While I can accept the quality over quantity argument (do we really need a choice of over a hundred fart apps in the android market app store?); I’m not convinced that this argument holds up in this case. Not only are there far fewer app in Blackberry app world, I’ve found that you have to pay for apps that would be free on other platforms.  The most annoying example I’ve found so far is the Chinese IME which allows the input of Chinese text. Included in Windows, included in Mac OS X, free in Linux, naturally, free in the Android market, but a paid app from the Blackberry app world. To be fair there are also occasions where the converse is true; The Docs to go application is pre installed on the tablet and allows both reading and editing of Word documents whereas on Android, the free version of Docs to go allows Word documents to be viewed, but if you want to edit them, you need to purchase the pro version.

Conclusion: The only compelling reason to buy a Playbook would seem to be if you already have a Blackberry phone, and while it may prove to be sufficient for my wifes needs (Once she’s shelled out for the IME), personally, I would be disappointed, especially having seen the Xoom which cost £70 less on which I’ve installed a host off applications, all useful to some degree (no fart apps!), all of which so far have been free.

Written by pedrocadiz13

23/09/2011 at 1:09 am

Converting from Windows to Mac OS X

leave a comment »

I’ve always liked to dabble in different operating systems, I ran an Amiga 4000 alongside a Windows PC for a few years (in the last millenium!), and occasionally take a look at the latest linux offering from Redhat and in a fit of nostalgia for the Amiga, I’ve also installed WinUAE on my laptop.  Over the last few weeks though, I’ve been looking at Mac OS X and so far I’m pretty impressed.

I couldn’t be described as a fanboy just yet; there are things that are better in Windows in my opinion, for example, the under used Windows Media Center is awesome, (although Plex on the mac is the closest equivalent I’ve found so far and is also pretty neat) but equally there are some things that Mac OS does better; the Time Machine feature is awesome.

Of course some applications are available for both Windows and Mac OS but inevitably there will be differences. I must admit I general prefer Microsoft Office for mac over it’s Windows cousin. One slight niggle though; as a Windows user I’m use to Windows Messenger, starting automatically, logging me in and running minimised when Windows starts. Messenger for mac does not have the checkboxes in it’s preferences that the Windows version has to set it to behave this way. However, a similar effect can be used by another awesome feature of the Mac OS; Automator.

Automator is a combination of a macro recorder and a script runner. You can even mix macro’s and scripts (although a macro is called ‘Watch me do’ in automator speak).

So here’s how I used applescript to get Messenger to behave in the fashion I’m used to on Windows:

1. Run Messenger.

2. Command click on the messenger icon and select ‘Options’ followed by ‘Keep in Dock’

3. Ensure that ‘Options, Open at Login’ is UNCHECKED.

4. Run Automator and create a new application.

5. Find ‘Run Applescript’ in the library and drag and drop it into the workflow.

6. Replace the code in the script with the following:

on run {input, parameters}

do shell script “open /Applications/Microsoft\\ Messenger.app”

tell application “Finder”

set visible of process “Microsoft Messenger” to false

end tell

return input

end run

This script runs messenger then hides the window.

7. Save the application with a suitable name.

Now we need to run the script when Mac OS starts:

8. Open the system preferences and choose ‘Accounts’ from the ‘System’ section.

9. Ensure you account is selected at the right hand side of the panel then click ‘Login Items’

10. Click on the ‘+’ and browse to the application (script) that you created in automator.

11. Click on the application followed by ‘Add’ (or double click).

12. Your application should now be listed in the Login Items list.

13. Close the System Preferences.

Now when you restart your mac, Messenger will start. The ‘Contact List’ window will be displayed briefly, but will then close.

The script doesn’t need to log you in, Messenger for mac logs in automatically when you run it as long as your account is set up.

Written by pedrocadiz13

23/08/2011 at 10:11 pm

Posted in Computing

Setting up Subversion on ReadyNAS Duo

with 5 comments

It’s always a bit of a pain trying to figure how to do something technical from information on blogs or forums. More often than not, the author has missed out some vital step or piece of information or you have to piece together what to do from a number of sources and figure out how to fill in the blanks.

So here’s my attempt at a more complete set of instructions on how to install and set up Subversion on the ReadyNAS Duo network attached storage.

Get what you need

First you’ll need to download the following addons:

If you want a basic web frontend for Subversion, you an also download:

WebSVN requires the PHP addon.

You’ll also need a secure shell client, Windows users can download putty.

Install the Add-ons

Once you’ve downloaded everything, install the add-ons on your NAS.

To do this:

1. Log in to the admin area of your NAS (https://<ip address of your nas or server name>/admin)

2. From the menu click ‘System’ –-> ‘Update’.

3. Select the ‘Local’ tab.

4. Click the ‘Choose File’ button and navigate to the .bin file for the addon that you want to install.

5. Click the ‘Upload and Verify Image’ button. You should see the message ‘The firmware update or Add-on image is valid. Click Perform System Update if you wish to install the image now.’

6. Click on the ‘Perform System Update’ button.

7. Repeat steps 4 – 6 for all the addons that you require.

Note that some addons will require the server to be restarted.

Pitfalls: If you get an error message at step 6 check that you’ve downloaded the version of the plugin that matches the processor in your NAS (x86 or sparc).

Now that you’ve got everything installed, we’ll need to enable the plug ins.

To do this:

1. Log in to the admin area of your NAS.

2. From the menu click ‘Services’ –> ‘Installed Add-ons’.

3. Ensure that Subversion is checked, and if you are using WebSVN ensure that both WebSVN and PHP are checked.

4. Click ‘Apply’ to apply changes.

Create a repository (SSL Method)

Next we need to create our first repository:

The plug in panel provides details on which commands you need to run to do this, but does not tell you how to run them. This is where Secure Shell comes in.

1. Run Putty.

2. In the ‘Host’ field, enter the IP address or name of your NAS server.

3. Ensure that the connection type is ‘SSH’.

4, Click the ‘Open’ button.

5. A command prompt like window will open and you will be prompted to enter a username and password. Enter ‘root’ as the username and the admin password for your NAS server as the password.

6. Create the repository using the command:

svnadmin create /opt/subversion/<name of your new repo>

7. Change the owner of the subversion files to ‘admin’ using the command (The previous command will have created the files as the ‘root’ user:

chown -R admin:admin /opt/subversion/*

8. Disable repository sharing with the following command:

echo ‘enable-rep-sharing = false’ >> /opt/subversion/<name of your new repo>/db/fsfs.conf

This last part is needed because of a bug in the version of SQlite shipping with the ReadyNAS

if you’ve set up WebSVN you should see your new repository listed at the url:

http://<ip address of your nas or server name>/websvn

Create further repositories with WebSVN

To create further repositories you can do this via WebSVN simply by entering the name of the repository you wish to create in the ‘Create New Repository:’ field and clicking the ‘Go’ button, but before you do so, read on!

Important: You won’t be able to view the repository list in WebSVN if there are no repositories set up; you’ll get an error message. The first repository must be set up using the secure shell method described above.

Migrate data from existing repositories

If like me, you’ve been using subversion elsewhere, you’ll need to get the data from your existing repositories migrated over.

You can use svnadmin dump and svnadmin load to do this.

Important: svnadmin load will fail if you try to load data into a repository that is not empty.

Important: WebSVN automatically creates the standard subversion trunk, branches and tags folders. Therefore you can’t load data into a repository created by WebSVN; you’ll need to use the SSH method of creating a repository described above to create a repository if you want to migrate data into it.

To export your data:

1. Open the command prompt and cd to the folder containing your subversion repositories

2. Execute the following command:

svnadmin dump <name-of-repository> > <name-of-repository>.dump

For example: svnadmin dump test > test.dump

To import your data

1. copy the .dump file to a share on your NAS server (I used the backups share)

2. Open a SSH session with putty and log in as root.

3. Execute the following command:

svnadmin load –quiet /opt/subversion/<name-of-repositoy> < /backups/<name-of-repository>.dump

For example: svnadmin load –quiet /opt/subversion/test < test.dump

4. Check that you can browse the repository in WebSVN.

And Finally

1. You’ll need to perform a svn relocate on your working copies. TortoiseSVN has a menu item to do this if you don’t want to use the command line. The Eclipse subversion plugin, Subclipse also provides a relocate function in the repository exploring view.

Alternatively, you can delete your working copy and check it out from the new location, if you have no local changes.

2. User access to subversion, by default is open to all users with a share on the NAS server. I’ve no idea how to change this; that will need to wait for a future blog. If you haven’t set up user shares, then you should at least set up one for yourself; you don’t want to commit as admin all the time, especially if these are multi user repositories.

Written by pedrocadiz13

24/07/2011 at 6:29 pm

Posted in Computing

Bankers

leave a comment »

Is it just me or has anyone else noticed that banks seem to be processing credit card transactions a lot quicker nowadays?  I’ve noticed that when I make a purchase, the transaction shows as pending when I log in to my account, before I’ve made it home from the shops.  Are the banks so desperate for cash that they’ve speeded up their processes in order to get debits deleted from our accounts in order to start charging interest a day or so quicker. I see no rush to process internet payments any faster, that still takes three working days to go through.  Seems a tad one-sided to me.

Written by pedrocadiz13

19/11/2010 at 8:39 pm

Posted in Uncategorized