Mac OS

Hello to my iMac 5K 2019

As previously noted, my trusty Mac Pro Early 2008 has been end of life for some time. It entered Apple’s vintage and obsolete products list back in 2015 and the last supported Mac OS version is 10.11.6 dates from 2016. Over it’s time, filled with hard drives, memory upgrades and a replaced graphics card. Switching to SSD for the system drive in 2014 gave it a new spring of life. Still a decently speedy machine, but it kicks out some heat. Over recent years, 3rd party application updates have been dropping backwards compatibility so after 12 years use, it is time for something new.

While the iMac has been at “Don’t buy” status for some time on MacRumors, with the prospect of a 2020 iMac rumoured to have a substantial redesign. The 2019 MacBook Pro (or its expected 2020 update) having been much improved over the prior generation would have been an option, however the ‘Covid-19 lockdown‘ triggered the decision to act. With everyone home based, there is less reason pay a premium for a Mac Book Pro and having found a base configuration 2019 5K iMac on Apple’s Refurb store (≈£230 less than a non-refurb) seemed very good value in comparison.

iMac 5K 2019

Upgrading the memory to 24GB was quick and easy and inexpensive using the 16GB kit from Crucial and an inexpensive 2TB external drive serves as a TimeMachine backup drive.

The most painful part of the process was the time taken to encrypt the drives and to transfer data with the Migration assistant.  I now have a fast machine which doesn’t blow heat into the room. The 5K screen looks great compared to the 12 year old 23 inch cinema display. I have no problem with the size of the bezel, it frames the screen from the background in my room. It will be a little bit more of an issue when I eventually add a second screen.

Having skipped four major OS versions to Catalina 10.15.4, I expected a lot of change. The increase in security permissions checking was a little annoying at first – but less annoying than a compromised system. I was looking forward to Dark Mode, but sadly I found that I don’t like it. The white on black text is too high contrast for me, and it presents a heavier font weight – making differing text styles less clear. Further, the Mac OS X application windows rely on a shadow rather than border chrome to define the edges. These shadows are ineffective as visual cues when everything is dark, so it is back to light mode for me. Being able to run current versions of XCode, Photoshop, XD and others, and the much improved quality and speed of video playback on the 5K screen are more than worth cost of this machine.

I’ll be continuing with my trusty Matias Tactile Pro 2 (used daily since 2006). I’ve never understood why anyone would choose to use laptop-style keyboards with a desktop. Apple hasn’t offered a decent keyboard since the Apple Extended Keyboard II.

Posted by creacog in Apple, Mac OS, 0 comments

Baby steps: Trying out Unity development for Oculus Go

My aim was to get hold of Oculus Go, experience and understand current UX for that environment and see how easy (or not) it is to develop for.

  • I am not new to programming, but I have been hands off for a few years
  • I had never used Unity
  • I am new to VR/XR

Notes from my getting started experience over the last few weeks:

Posted by creacog in 3d, Developer, Mac OS, Oculus, Oculus Go, Unity, VR/AR, 0 comments

Mac Pro early 2008 approaching the end of its useful life

UPDATE: Within Safari, I disabled: Canvas accelerated drawing and full page accelerated drawing. Since then, there have been no further system freezes. (As per the message here: https://discussions.apple.com/message/31166261#message31166261 )

My Mac Pro (Early 2008) I think is finally coming to the end of it’s useful life. Over 10 years since taking ownership I can’t complain. This 14Gb 8 core machines has served me well with only a few minor repairs along the way:

http://blog.creacog.co.uk/2009/12/10/macpro-early-2008-video-card-dies/

http://blog.creacog.co.uk/2011/02/28/apple-cinema-hd-23inch-dies-then-resurrects/

http://blog.creacog.co.uk/2012/09/09/mac-pro-wake-from-sleep-restarts-instead/

There is I think a hardware fault developing. It occasionally freezes. Mouse pointer still active, but nothing clickable and no keyboard interactions. Forum users suggest the video card is a likely culprit (https://discussions.apple.com/thread/5022785) and a good clean may fix it.

Mac OS  10.11 El Capitan is the last version of the system to support this hardware. Until now, most software has continued to run happily on that system, but I am starting to see El Capitan drop out of the support list for key software. Crucially today, Adobe CC updates drop support for Mac OS 10.11.

Creative Cloud upgrade needed

Can I hang on to see the iMacs expected to be released this or next month? Or do I part with a load of cash on a Mac Book Pro 2018? Or even consider PC if I want to get more into Oculus platforms? Unfortunately the old machine has no trade-in value – I remind myself in terms of total cost of ownership over the last 10 years or so, this has been the best value computer I have ever had. I can’t see any replacement coming close with so few options for upgrading/repairing memory or storage.

Posted by creacog in Apple, Mac OS, 0 comments

switched to svn via https on mac os x

I finally decided it is time to switch to accessing subversion repositories via apache and the https scheme rather than ‘file://’ scheme. Search revealed many articles touching the subject, but none providing exactly what I need. So documenting:

  1. The problem and motivation
  2. Up to date?
  3. Getting apache to serve https
  4. Configuring apache to serve subversion
  5. Migrating existing working copies to the new scheme
  6. Reference links to articles that helped

Problem and motivation

My main development machine is a Mac Pro running 10.6.4. My development projects are all kept outside my home directory on a second disc, one project per folder. Each project folder contains a subversion repository folder named ‘svn’ along with one or more working copies.

For the last few years I have checked out working copies using the ‘file://’ protocol. This seemed the simplest and most efficient approach in this single-user environment. I use svn clients such as SvnX, and Subclipse and occasionally the command line (for which having the svnbook to hand is a must). I have groaned previously about DreamWeaver’s subversion integration ‘attempt’ failing to support the file protocal (remains unchanged in CS5).

There are a couple of things I want to solve:

Firstly, I occasionally use VisualStudio in Windows7 running in parallels on this machine to work with ASP.NET. In the past I’ve simply pointed it at the working copy via the network drive. Of course this means that I can’t undertake svn operations through Win7 since that working copy’s URL is alien to the Windows 7 instance. Not too much of an issue since it’s only a matter of switching back to a Mac window to do svn business. However there is an annoying problem with VisualStudio’s code completion where it is unable to correlate markup within an .aspx file with it’s .aspx.cs file when the site is on a parallels network drive. To solve this I need to check out a working copy to the Windows7 local disk.

Second, I have taken to getting out and about with my MacBook Pro. If I want to work on the move I need to check-out a working copy.

For both these situations using the ‘file’ protocol is inappropriate. Attempts to check work back in are bound to generate svn errors as multiple svn systems attempt to obtain exclusive locks on the repository.

If however we can get to a single user/process touching repository files we can solve this problem – enter apache.

Up to date?

First thing I did was get my subversion installation up to date. At time of writing 1.6.12. Installer available from CollabNet. Just run the installer and follow the instructions. Note: this version installs into a different location to that installed by Apple. You may need to tell your client tools the location of the subversion to use.

That said, this isn’t going to help with DreamWeaver all that much. DW’s Subversion functionality is tightly tied to specific versions. Should you dare  touch a working copy with a later version (which changes some of the meta data) DreamWeaver will cease to work with that working copy. More information at this Adobe technote. So for now as far as I am concerned, until Adobe start releasing ‘upgrader extensions‘,  DW’s subversion functionality remains useless and turned off with ‘.svn’ files cloaked and svnX used for commits.

Getting apache to serve https

In the short term I have no plans to open access to my repositories via the net. However it is a future possibility so I think it worth getting going with https from the outset is worth it.

Mac OS X of course uses Apache for web-sharing. However it’s default state is not configured to serve SSL. To do so, we need a secure certificate and some configuration changes. As I am the only person accessing this machine, and I trust myself, I have no need to obtain a certificate from a commercial authority.

Steps taken to create the certificate and configure apache to use it…

Create a certificate authority

mkdir /Library/Certs
cd /Library/Certs
perl /System/Library/OpenSSL/misc/CA.pl -newca
[ENTER](to create new certificate)

Generate private key

openssl genrsa -des3 -out webserver.key 1024

generate a non-password protected copy of the key

openssl rsa -in webserver.key -out webserver.nopass.key

Generate a certificate request

openssl req -config /System/Library/OpenSSL/openssl.cnf \
-new -key webserver.key -out newreq.pem -days 3650

Sign the certificate request

perl /System/Library/OpenSSL/misc/CA.pl -signreq

You should now have created…

/Library/Certs/demoCA/
/Library/Certs/newcert.pem
/Library/Certs/newreq.pem
/Library/Certs/webserver.key
/Library/Certs/webserver.nopass.key

Tell Apache to include SSL

We now need to edit apache’s httpd.conf. You need to ‘sudo’ to acquire sufficient privileges to do so, and need to take care. Optionally make a backup copy of httpd.conf.

cd /private/etc/apache2/
sudo cp httpd.conf httpd.conf.bak
sudo pico httpd.conf

Find the following line and uncomment it by removing it’s # prefix

Include /private/etc/apache2/extra/httpd-ssl.conf

Use CTRL-O then CTRL-X to exit pico and we now need to edit the file we just included…

cd extra
sudo pico httpd-ssl.conf

Go through the file finding the following attributes ensuring they are uncommented and point to the SSL files we just created…

SSLCertificateFile "/Library/Certs/newcert.pem"
SSLCertificateKeyFile "/Library/Certs/webserver.nopass.key"
SSLCACertificateFile "/Library/Certs/demoCA/cacert.pem"
SSLCARevocationPath "/Library/Certs/demoCA/crl"

You should now be able to restart apache either through System Preferences… > Sharing > Web sharing, or

sudo apachectl graceful

You can access any errors via the Console application. If all is well you should be able to enter https://localhost/ into your browser’s address bar and get a result.

Configuring apache to connect to and serve subversion

Firstly, we are going to require a login. In my case I am going to create 3 login IDs. One for my normal workstation. Others for access via Win7 and my MacBook pro. So although all the work in the repro is by me, I can see which environment was used.
To do this, we will create an authorisation file containing the three users and place it somewhere sensible. For me…

cd /Volumes/projectdisc/projects
mkdir subversion
cd subversion
mkdir authfile
cd authfile
sudo htpasswd -c svn_passwd mpuser
sudo htpasswd svn_passwd mbpuser
sudo htpasswd svn_passwd win7user

you should now have svn_passwd contianing 3 users and their password hash strings. Returning to apache configuration, you may have noticed that the last line of httpd.conf reads…

Include /private/etc/apache2/other/*.conf

This includes, in alphabetical order, any further files ending .conf in the subfolder ‘other’. We will use this to add a svn.conf file to that folder…

cd /private/etc/apache2/other
sudo pico svn.conf

Will open an editor with empty/new file svn.conf. The first line of which will be:

LoadModule dav_svn_module /usr/libexec/apache2/mod_dav_svn.so

After this, we will add configuration blocks, one per project repository…

<Location /svn0000-svntest>
DAV svn
SVNPath /Volumes/projectdisc/projects/0000-svntest/svn
AuthType Basic
AuthName "subversion"
AuthUserFile /Volumes/projectdisc/projects/subversion/authfile/svn_passwd
Require valid-user
SSLRequireSSL
</Location>

Using keys ctrl-o then ctrl-x will save the new file and exit pico.

This configuration block tells apache to redirect svn0000-svntest to the repository at path /Volumes/projectdisc/projects/0000-svntest/svn. It requires a valid user authenticated against the file at /Volumes/projectdisc/projects/subversion/authfile/svn_passwd. Since this location will only ever be served through SSL, basic AuthType is ok and secure.

For apache to pick up this change, we need to restart it:

sudo apachectl graceful

One further step we need to make is to ensure apache is the only user/process to have control of the repository files. This shouldn’t be an issue as we are migrating access to be always via https and don’t want the file protocol used any more…

cd Volumes/projectdisc/projects/0000-svntest/
sudo chown -R www:www svn

At this point you should be able to access the repository through your browser with url http://localhost/svn0000-svntest

You will receive an alert indicating that the certificate is not trusted. You can tell safari that it should always trust this certificate.

To add further repositories, we simply need to change ownership as above, then add the detail to the configuration by simply duplicating the code block above with the Location text and SVNPath modified accordingly. The rest can remain as is.

Migrating existing working copies to the new scheme

My existing working copies each use the file:// url scheme. We need to convert them to use the new https scheme. This is pretty easy assuming you already have the Location added to svn.conf. Just cd to the working copy folder, use svn info to reveal the working copy’s url and relocate…

cd Volumes/projectdisc/projects/0000-svntest/wc
svn info
svn switch --relocate file:///Volumes/projectdisc/projects/0000-svntest/svn/trunk/wc https://localhost/svn0000-svntest/trunk/wc

If you are prompted that the certificate is invalid, use option p to permanently trust the certificate.

Reference links to articles that helped

Reading the following, articles that helped me work out what I wanted to do…

Along with chapters 3 and 10 of Subversion Version Control: Using The Subversion Version Control System in Development Projects ISBN-10: 0-13-185518-2 also on Safari books online.

Posted by creacog in Apple, Mac OS, Subversion, 0 comments

flash in the pan

So, Flash player 10.1 is available in beta and includes mobile device oriented new features such as multi-touch gestures. Smart! Makes sense with Adobe strategy of delivering to emerging mobile devices. However there are a few million of us already using desktops and laptops with track pads, mouse wheels and mouse trac-balls who are feeling a bit ‘inhibited’. Flash is being used more and more to deliver applications either via browser or the AIR runtime. Such applications immediately feel somewhat inferior when a user cannot scroll or pan a view as they normally would native applications. Arguably ‘Rubbish’ rather than ‘Rich’ RIA in such cases.

For a long time the MOUSE_WHEEL event has been part of the Flash API but only officially supported on the Windows platform (in browser). Original reasoning for not implementing support for the Mac platform can no-longer be argued as all Macs for a number of years have been shipped with the Mighty Mouse (2005) and now Magic Mouse or Trackpads. All of which facilitate mousewheel style interactions. All of which go further and support horizontal as well as vertical scrolling interactions or ‘panning‘. There are JavaScript workarounds for in-browser Flash on a Mac such as this solution on hasseg.org or this SWFObject based pixelbreaker solution. Fortunately Flash applications delivered via the AIR runtime can respond to MOUSE_WHEEL events without any such workarounds. However MOUSE_WHEEL currently only facilitates vertical scrolling in any case.

We need to facilitate horizontal as well as vertical scrolling (panning) of content in response to events from ubiquitous input devices.

A few prominent applications I use often, which suffer:

  • TweetDeck : AIR based. High discoverability of lack of horizontal scrolling support
  • Adobe online store UK : In browser Flex application – Flash being used in an attempt to emulate HTML – no vertical scroll wheel support for Mac users
  • Adobe Flash builder : Design view (Java application with Flash based view)
  • Adobe Catalyst : Art-board view (Java application with Flash based view)

Adobe actively invite comment and suggestions on their products. More widely/easily through the Feature request/bug report form. They have opened up the bug tracking system for a number of products. Flash player being one of them. There is an active bug report with regard to this issue and I would encourage anyone with an opinion to contribute to the discussion and/or add weight by voting. Just sign up and access FP-1262. There is an active drive from within Adobe to help from the community to improve the quality of Flash Player and AIR.

As for the solution I think I’d like to see something along the lines of… Extending the flash.display.InteractiveObject with a ‘panEnabled‘ boolean property defaulted to false which, when true, allows the object’s Panning behaviour/event broadcasting (akin to doubleClickEnabled mechanism). So, when panEnabled is true, if the mouse pointer is over the InteractiveObject, and the user makes a ‘pan’ gesture, the frontmost panEnabled InteractiveObject broadcasts flash.events.MouseEvent.MOUSE_PAN events containing with the additional properties : offsetX and offsetY. Text based InteractiveObjects should default to panEnabled = true. Further, I’d quite like to see mechanisms to facilitate behaviours of nested pan-able objects. E.g. on a Mac, the front-most display object gets scrolled until it can scroll no further, then if the user continues the scroll input, the containing display object then scrolls.

In rounding up, the best place to contribute your opinions on this subject and have them heard by Adobe is here : FP-1262.

Posted by creacog in Adobe, AIR, Flash Platform, Flex, Mac OS, 0 comments

Editor bug in Mac OS X 10.6.1

UPDATE 22 June 2010 : Further to my even earlier bug report (FB-9398FlashApe has posted a work around by changing a Snow Leopard system preference.

UPDATE 10-Dec-2009: I’m pretty convinced now that this is an editor bug, not a Mac OS X bug. Essentially the editors are using default OS behaviour which I think is tailored for natural language editing rather than programme-code editing. Original post follows…

I’m currently finding in some applications that “word1.word2.word3” is being treated as a single word as far as the Option-Left Arrow and Option-Right Arrow is concerned on my Mac. This keyboard shortcut should hop word by word. But currently hops from one end to the other. Not an issue for most users, but pretty serious for a programmer working with dot-notation syntax.

I first experienced this working with ActionScript in Adobe’s Flash Builder Beta 2 and logged a bug report, but further investigation reveals that some unrelated applications show the same behaviour. I have now logged a bug with Apple, but in the meantime I would be interested to know if others are experiencing the same? Or if you are running 10.6.1 and not seeing this issue? Please add a comment – I’m still trying to work out if it is something installed on my system. I don’t think it is basic user preferences as I am seeing the same in another user-account on this system.

Editors incorrectly treating “word1.word2.word3” as a single word re opt-left and opt-right:

FlexBuilder 3 MXML and AS editors
FlashBuilder 4 Beta2 MXML and AS editors
Apple Mail
Apple OS textfields including:
Spotlight
Finder window findfield
Safari: form-textfields + google search field
editors with *correct* opt-left opt-right behaviour
TextWrangler
Adobe Flash CS4 IDE ActionScript Editor
Adobe DreamWeaver CS4 editor
Apple XCode editor
Apple Finder – filename clicked and editable when renaming
Firefox form-textfields and goodle search field
  • FlexBuilder 3 MXML and AS editors
  • FlashBuilder 4 Beta2 MXML and AS editors
  • Apple Mail
  • Apple OS TextFields including:
  • Spotlight
  • Finder window find-file
  • Safari: form-textfields & google search field

Editors showing correct opt-left opt-right behaviour:

  • TextWrangler
  • Adobe Flash CS4 IDE ActionScript Editor
  • Adobe DreamWeaver CS4 editor
  • Apple XCode editor
  • Apple Finder – filename clicked and editable when renaming
  • Firefox form-textfields and goodle search field
Posted by creacog in ActionScript, Apple, Flex, Mac OS, 0 comments

No CMD-SPACE in Flash Builder since Snow Leopard

Ok so CMD-SPACE is the default short cut to launch Spotlight. But I wanted that combo for ‘content assist’ with Flex/Flash Builder. Until installing Snow Leopard, that is what I had for a few years, and Spotlight relegated to CTRL-SPACE. However since SnowLeopard, the CMD-SPACE combo is not transmitted to Flash Builder. I assume this is down to Snow Leopard somehow reserving the combination. So begrudgingly I have returned to defaults…

Spotlight : CMD-SPACE
Flash Builder content assist : CTRL-SPACE

Posted by creacog in Flash Builder, Flex Builder, Mac OS, 3 comments

flash.display.BitmapData gotcha – well gotme for a while

The documentation is correct, so i have no excuse, but I didn’t initially read much beyond the signature of the constructor…

public function BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF)

I needed a transparent bitmap. Reading the default “transparent:Boolean = true”, I assumed by simply supplying width and height, a transparent bitmap is what I would get. Not so! I got a white rectangle. The reason being, that the default fill colour is 100% white. (The first pair of FFs representing the alpha in ARGB).

At first it would seem slightly unintuitive for the second default to conflict with the first, until one realises that the ‘transparent’ flag is there to indicate whether the object will support transparency or not. Not to state that it should be initially created transparent. Supporting transparency increases data size from 24 bits per pixel to 32 bits per pixel.

So what i should have done :

bmd = new BitmapData( width, height, true, 0 );

Posted by creacog in ActionScript, AIR, Flash Platform, Flex, Flex 3, Mac OS, 0 comments

updated svn+ssh with DreamWeaver article

After various Mac system and security updates found that ssh+svn would result in errors…

svnserve: Command not found.
svn: Connection closed unexpectedly

Updated my previous article on using svn+ssh with DreamWeaver with a solution.

Posted by creacog in Adobe, DreamWeaver, Mac OS, Subversion, 0 comments

apple security update 2009-001 breaking PowerPC apps ?

Since installing this update I observe on my intel based mac that two PowerPC based apps now crash immediately on launch. Logging “Exited abnormally: Illegal instruction” to the console. The two applications affected so far on my system are CanoScan Toolkit X and more importantly Retrospect. Unfortunately the installers for both applications also fail with the same error. I worked around the canon issue by installing the LiDE 35 driver (for my LiDE 50) – then using “Import image…” in Preview. However not found a workaround for Retrospect yet. Looks to me like Rosetta is not working properly, although I have one PowerPC process running “RetroRun”.

Annoying and scary for my backups to be crippled in this way. Investigating. Not sure it was the security update as yet, only ‘evidence’ being the timing of the failures.

Update: Solved…

The following typed into terminal, followed by a re-start fixed the problem…

sudo update_prebinding -root / -force

As per instructions by Charles Minow in this thread on the Apple support discussions.

Posted by creacog in Apple, Mac OS, 0 comments