Thursday, December 31, 2009

Monday, October 5, 2009

Projectors in os x on Advent

I found that when I connected a projector, display went all garbled. Found suggestions that this was the 'mirrored display' mode of OS X, which is known to be broken in the graphics drivers on the Wind/Advent 4211.

There was a suggestion to enable the "show display settings in menu bar" or somesuch, which I did, and then hover the mouse button over the icon when plugging a projector in, press down twice, then enter. That disables mirror mode, which seems to be enabled by default when a projector is plugged in.

Did that. It works.

Then had to use DisplayConfigX to remove the 100Hz settings that the monitor didn't like, reboot, mac says it's now at 1024x768 60 Hz, projector says 1280x768 (it is 1280x800 native), everything looks about right in terms of aspect ratio.

Sunday, August 16, 2009

Recovering Safari crash at startup

Found that Safari wasn't starting up after one of the annoying crashes I have had lately. Google turned up an article that proposed deleting a whole host of files. In the end I just had to delete com.apple.Safari.plist from ~/Library/Preferences/ and it came back to life. The file did look like it had non-ascii garbage at the front before it was deleted, but the fresh version didn't (though it had some at the end).

Had to reset home page, plus settings like opening up browser pages in a new tab, fill in usernames and passwords when known, in Safari->Preferences.

Friday, August 14, 2009

MacFuse

A while back I installed MacFuse from Google. Now I want SFTP installed. But after downloading binaries from googlecode's page as suggested, it was a bit tricky to get the right settings.

Macfusion helped, because it does it all via a GUI. I initially thought I had to do it by the command line using -p 2222 and adding the defer_permissions option, because when I didn't have that option it thought everything was unavailable. See this page. Then I found that I could add -o defer_permissions to the SSHFS options in MacFuse, for that connection. Now it works fine!

Tuesday, August 11, 2009

Image programs for OS X

Wanted The Gimp, downloaded binary package. Needs 10.5.7 to run best - I have been resisting this upgrade in case it breaks my install.

Installed Hugin, which works really nicely.

Tuesday, June 9, 2009

Automator workflow for interleaving odd and even pages of PDF scans

I have made an Automator workflow that combines two PDFs, by shuffling (interleaving them), but after reversing the second one (second in terms of creation time). This means that you can scan a whole lot of pages (odd sides), turn them over and scan the other sides (even sides), then right click, choose an Automator workflow to combine them. They become Combined.pdf in the same folder - the originals are moved to the Trash.

Uses the python script automator action

This was something also wanted here.

The automator action starts with a Get Selected Finder Items action, then has a Run Python Script action with the following code.

import os
from CoreGraphics import *

def createPDFDocumentWithPath(path):
print path
return CGPDFDocumentCreateWithProvider(CGDataProviderCreateWithFilename(path))
def duplexPages(writeContext, oddfile, evenfile):
# open PDFDocuments for each of the files.
odd = createPDFDocumentWithPath( oddfile )
even = createPDFDocumentWithPath( evenfile )

# confirm that the number of pages is the same
maxPages = odd.getNumberOfPages()
if ( maxPages <> even.getNumberOfPages() ):
print "Documents do not have the same number of pages"
else:
# Shuffle the pages
for pageNum in xrange(1, maxPages + 1):
# start at first odd page
page = odd.getPage(pageNum)
print 'Page', pageNum, 'from', oddfile
if page != None:
mediaBox = odd.getMediaBox(pageNum)
writeContext.beginPage(mediaBox)
writeContext.drawPDFDocument(mediaBox, odd, pageNum)
writeContext.endPage()
# start at last even page
page = even.getPage(maxPages + 1 - pageNum)
print 'Page', maxPages + 1 - pageNum, 'from', evenfile
if page != None:
mediaBox = even.getMediaBox(maxPages + 1 - pageNum)
writeContext.beginPage(mediaBox)
writeContext.drawPDFDocument(mediaBox, even, maxPages + 1 - pageNum)
writeContext.endPage()
def realFilesOnly( item ):
return item.find(".") <> 0

# from http://stackoverflow.com/questions/249785/os-x-determine-trash-location-for-a-given-path
def get_trash_path(input_file):
    path, file = os.path.split(input_file)
    if path.startswith("/Volumes/"):
        # /Volumes/driveName/.Trashes/
        s = path.split(os.path.sep)
        # s[2] is drive name ([0] is empty, [1] is Volumes)
        trash_path = os.path.join("/Volumes", s[2], ".Trashes", str(os.getuid()))
        if not os.path.isdir(trash_path):
            raise IOError("Volume appears to be a network drive (%s could not be found)" % (trash_path))
    else:
        trash_path = os.path.join(os.getenv("HOME"), ".Trash")
    return trash_path
def main(input, *args, **kwargs):
dirname = os.path.dirname(input[0])    # extract folder to work in
# print dirname
files = input
# print files
# files = os.listdir( dirname )
# files = filter(realFilesOnly, files) # filter out special files
# print files # enable to see which files are selected
if ( len(files) == 2 ):
# files[0] = os.path.join(dirname,files[0]) # add path to files 
# files[1] = os.path.join(dirname,files[1])

# odd file is assumed to be the earlier one
if ( os.path.getctime(files[1]) > os.path.getctime(files[0]) ):
odd = files[0]
even = files[1]
else:
odd = files[1]
even = files[0]

print "Identified Odd: ", odd
print "Identified Even: ", even

outputFilename = os.path.join(dirname, "Combined.pdf")
print "Output to: ", outputFilename

pageRect = CGRectMake (0, 0, 612, 792)
writeContext = CGPDFContextCreateWithFilename(outputFilename, pageRect)

duplexPages(writeContext, odd, even)

# delete the original files
trashPath = get_trash_path( odd ) # find location of trash
os.rename( odd, os.path.join(trashPath,os.path.split(odd)[1]) )
os.rename( even, os.path.join(trashPath,os.path.split(even)[1]) )
else:
print "Incorrect number of files"

return files


It can be saved as a Finder Plugin to appear on the context menu for Finder items.

Monday, June 8, 2009

VoodooHDA drivers for OS X

Some activity says that microphone-enabling drivers may be available:

http://forums.msiwind.net/osx-drivers/almost-fully-working-voodoohda-speakers-headphone-ext-mic-t10871.html

"system-library-extension; if you have applehda.kext/appleazaliaaudio,kext/voodoohda.kext back them up somewhere and then delete them, then download the voodoo kext. next step launch kext helper and add the kext to the box, enter your password, reboot and then try skype or audacity.

for further help, use the search box. all of these answers are in the forums somewhere. in fact if you go look at the original voodoo posting i think they posted directions in there. if you installed os x to your wind firsthand then im sure you used kext helper at some point. "

Then there is a "new version" that includes preference panels (but looks like pref panel is only update and is a separate file).
http://forum.voodooprojects.org/index.php/topic,139.0.htm

However, people reported problems with the new version and waking from sleep.

Monday, May 11, 2009

Fixed crashing word

Used this article to fix Word settings so it doesn't crash now. Removed the file com.microsoft.Word.plist from ~/Library/Preferences folder, and put settings back how I wanted them :-(

Update 2009 09 06.

I discovered that the crash occurs sometime when going from two screens (Word on the external screen) to one screen. This suggests that it's simply because something isn't checking that the screen coordinates are valid.

Found that if I replaced the part of the above file between the data tags straight after the 2008\Data\Toolbars tag, with what's recreated when the file is deleted, it starts up and doesn't crash.

I have saved a working file in Evernote. Would save it here but then I can't access it when I'm offline.


xxxx



Sunday, May 3, 2009

Power management on Advent 4211

Found what looks like an updated power management kernel extension that specially fixes the iTunes choppiness and hopefully crashes, VoodooPower. Found it in this forum topic, which seems to have several suggested post-install instructions.

So far no choppiness in iTunes, and it hasn't crashed, but then I only just installed it.

Saturday, May 2, 2009

Printing 2 pages per sheet using CUPS PDF driver

I downloaded this CUPS printer driver package and installed it, it worked seemlessly and allowed me to use the advanced printing layouts to create PDFs by choosing a PDF printer.

Friday, May 1, 2009

Word 2008 crashes on startup

Now my Word 2008 install doesn't seem to want to start. Found this KB article that suggests deleting old preferences - I think I may have originally had a trial version of Word, though maybe not.

Held down shift key at startup and it works now. Will have to investigate deleting settings.

Sunday, April 12, 2009

Offline OS Maps with MG Maps

I worked out how to get offline OS Maps in the UK on Mobile GMaps, and posted on the forum here.

My post:
I have worked out how to change MapTileCacher.perl (v1.35) so that you can download OS Maps from multimap.co.uk and use them offline in MGMaps. Very handy for hiking, as these are arguably the best maps in the world. I've only done this on OS X - perhaps someone can apply this technique to other OS's and other places (like within Mobile GMaps itself). 

Both 25,000:1 and 50,000:1 scales are downloaded, corresponding to the cache tool's zoom levels 15 and 14 respectively. The 50,000:1 maps are also provided at zoom levels 13 and 12, but below that you end up with pretty standard Live maps, which are handy for locating yourself, but no better than other map providers'. 

Thanks to Christian Streng's post at http://forum.mgmaps.com/viewtopic.php?t=1116&postdays=0&postorder=asc&&start=250, which set me off in the right direction. 

Firstly, you need to set the User Agent for the wget or curl fetch. If you don't, I think Multimap will 95% of the time give you a 403 forbidden response, at least it did for me. For OS X, at line 75 add a User Agent to the curl call (I don't know what you need to do with wget, I'm on OS X): 
Code:
  $wget = "curl -A Safari/3.2 -# -o TempTile.$pid "; 
  $systemRefererParam = ""; 

Secondly, put the following in place of the Osmarender map type (or your own choice of map style that you don't use). This code works out what the correct URL should be, which is a binary tile system like Live maps only broken into six digit segments. I spent a while finding the right 'miXXX' string in the middle - these combinations (where the string depends on the zoom level) give you the 50,000 or 25,000:1 maps as described above, at different zoom levels. You can zoom in further, but there is no point because you just get a blocky, scaled, version of the 25:000:1 map. (There are many other miXXX strings that give you maps for only parts of the country and/or only certain zoom levels - these ones gave me maps for all the places I tested, which wasn't all that many, but spread right across the country.) 
Code:

elsif(index($MapType,"Osmarender") != -1)     # ************ multimap for UK OS Maps ******************** 
  { 
    $digit = ((($y & 1) << 1) + ($x & 1)); # 'randomise' server access mc0, mc1, mc2 or mc3 
    $url .= "http://mc" . $digit . ".multimap.com/ptiles/map/"; 
    # the following selects the map type to use - only certain combinations of zoom and map type work, and some 
    # map numbers different from these work in some areas, but not UK-wide. Hopefully these particular ones 
    # do work UK-wide. 
    $url .= ($zoomLevel+1) >= 16 ? "mi932" : ($zoomLevel+1) >= 13 ? "mi904" : ($zoomLevel+1) >= 6 ? "mi916" : "mi915";  # select map type 
    $url .= "/" . ($zoomLevel + 1) . "/"; 
    
    # Multimap uses quadrant tiles like Microsoft Live, but splits them up into six-digit long segments. 
    # e.g. http://mc1.multimap.com/ptiles/map/mi902/16/031313/131331/311.png 
      
   $mmchars = 0; 
    for($i=$zoomLevel-1; $i >= 0; $i--) 
    { 
        # put a / every six characters 
        if ( ($mmchars == 6) || ($mmchars == 12) ) 
        { 
          $url .= "/"; 
        } 
        $url .= ((((($y >> $i) & 1) <<>> $i) & 1))); 
        $mmchars++; 
    } 
    $url .= ".png"; 
  } 


The $zoomlevel+1 business is because zoom level 15 in MapTileCacher.perl corresponds to zoom level 16 in Multimap, and so forth. 

With this you can use the cache tool, selecting the Osmarender map type, and run MapTileFE.perl as normal, but instead of Osmarender, MapTileCacher.perl will download lovely OS Maps from multimap. 

Saturday, April 11, 2009

MiniCommander J2ME for phone

It's Midnight Commander for your J2ME phone! Can unzip zip files, which is very handy for getting zipped MG Maps caches to the phone because my phone's bluetooth can't support sending folders all at once.


Friday, April 10, 2009

Offline maps with MG Maps

Huge list of software for mobile phones
 
Some interesting ones
 
http://www.basenav.com/ allows you to scan your own maps, but haven't found a use for it yet.

MG Maps 

http://www.mgmaps.com/index.php supports offline maps, works very well.

Go to the MapCacher site and choose which area you want to download by dropping pins on the map. Choose which zoom levels you want to cache. Then hit the Generate! button to download a .map file to the local system.

Execute ./MapTileFE.pl from Terminal, passing it the .map file BUT WITHOUT THE .map EXTENSION. It will call MapTileCacher.perl for each level of zoom you specify, creating a MGMapsCache folder which can be sent to the phone by Bluetooth.


Instructions on forums

Download above perl tools here.

Instructions for getting offline maps http://forum.mgmaps.com/viewtopic.php?t=725
Instructions for using offline maps here http://forum.mgmaps.com/viewtopic.php?p=2745#2745

Setup

I had to to rename the .perl.pl file to .perl, so other script can find it.

Use chmod u+x to allow execution, then just run ./MapTileFE.pl.

Monday, April 6, 2009

Word 2008 Mac Option/Control Key and navigation

By default, Word uses the option key instead of Ctrl-key like I have set up Mac to do, to go one word left or right for example (and Shift combinations). 

Found I could change this behaviour by Tools/Customise Keyboard and then changing the WordLeft and WordRight behaviours. 

Also set ParaUp and ParaDown, and their xxxExtend variants.

Removed the FileNew shortcut, and unwanted EndOfLine and 
Changed Bold to Command+N, Normal to Command+L, Italic to Command+G

Sunday, March 22, 2009

Setting up GMail on W880i

Using these settings, I can send and receive email once internet was enabled on the phone. I set it up so that it doesn't check automatically.

Friday, March 20, 2009

Internet on W880i

Went to Sony Ericsson site and got settings sent; installed, I get internet on the Solo 20 tariff from O2.

But it's a bit slow, I think it's GPRS not 3G.

There are settings for O2 given here, and instructions on putting settings into the W880i here. I haven't checked that these are broadly the same as what getting the settings from SE achieved.

Tried to connect mac through bluetooth but didn't get it to work.

Thursday, March 5, 2009

Ogg doesn't play over Airtunes

iTunes doesn't stream ogg over to the Airport Express. There is a bit of software which can do it though, for $25:


Once again, MP3 seems to be the best choice - with hindsight.

Tuesday, February 24, 2009

Play ogg files in iTunes

Downloaded a Quicktime plugin version 0.1.8 from Xiph.org, as suggested. Dropped into /Library/Components and it plays Ogg.


Monday, February 23, 2009

Voodoo power management to replace coolbook

Somewhere along the way Coolbook, which I paid for, has stopped working. I checked and there are kexts that allow the speedstep functionality to work without CoolBook.


The kexts changed their names to VoodooBattery.kext and VoodooPower.kext, but I downloaded and tried them to see if they stopped the fan going a lot, kept the temperature down and extended the battery life.

Edit:

Found more in dept discussion here:


Have had a couple of crashes since, on both AC and battery power. Maybe need to change plist file referred to in first forum topic.

Noted a few problems: Dvorak keyboard needs to be re-added after crash, I have two battery icons on the task bar, and (this is weird) when on Dvorak keyboard the Ctrl key combination now works on the Dvorak key (like in Windows) not the qwerty key (as it used to). But now realise there are two Dvorak keyboards - the one that says (option key symbol) Qwerty is different and that explain the difference.

Helpful post:
you can add the bootflag via osx86-tool, which you find here: http://pcwizcomputer.com/osx86tools/
download it, start it, click on "add efi strings / boot flag", fill "FSB=133 memoryType=19 memorySpeed=677" (without the " of course ^^) in the top left text-field (should be empty), then on apply changes at the bottom.


Found a person in the second forum page 7 i think that says that it doesn't work with msiwindosx, which IIRC is what I installed - gives stuttering iTunes and kernel panics. This is what I have seen. Time to uninstall? I'm pretty sure that the problem only happens on battery power.

Found that edowar on that forum is recommending the GenericCPU ??? .kext over the Voodoo ones. Tried to uninstall the Voodoo ones and try that instead, but ended up uninstalling it too because it also caused stuttering when on battery power. There are two versions at least listed, tried this one:

Friday, February 13, 2009

MAMP (PHP, MySQL, Apache), JQuery

Installed MAMP to get MySQL, Apache and PHP. Works pretty well out of the box. Can change location for your root in the MAMP control panel, I put it at username/Public/www.

Had some issues with file permissions when I wanted to edit the .php files from the Windows machine at mum and dad's: I had to share the Public folder using the Sharing preferences, using SMB. Then I had to change the permissions on the www subfolder, maybe using the finder properties where there is a permissions list.

I used JQuery a few months back to get Ajax functionality - it's lean and capable and easy to learn, and has good tutorials.
Found an article that gave me an idea how to fix bluetooth being turned off - remove Personal Area Networking (PAN) from BT facilities of the mobile phone pairing. Tried this to see if it worked, and it seems to be. I posted info on the forum:

http://forums.msiwind.net/post83961.html#p83961

Thursday, January 29, 2009

Bluetooth turns off strangely

The bluetooth icon went all greyed out, and the menu showed that it was off but the option to turn it on (in the bluetooth preferences pane) was greyed out.

The suggestion to run Bluetooth File Exchange which would offer to turn BT on, worked, from the following page:

http://forums.msiwind.net/mac/bluetooth-woes-osx-t4102.html

Monday, January 19, 2009

Successful BIOS update to 1.0A

Followed instructions from Cantisque on July 4th 2008. Basically download HP's disk tool and win98 files from files.extremeoverclocking.com, and use the MSI 1.0A utility. But I actually used the Advent 1.0A BIOS file from my previous blog entry, by changing the .BAT file to refer to the Advent BIOS image not the MSI one.

Seems my BIOS 1.08 is the reason my page up and down keys don't work - but now they do go!

Update went smoothly, page up and down now work, thankfully. And Home and End.

Updating to 10.5.6

After much searching I found that the following article seems to be the best update path for 10.5.5->10.5.6.


The biggest problem is that I would need a USB keyboard.

Eventually I figured I could use the on-screen keyboard (Preferences something), 
but when I did the update I lost the screen again, the old blue screen and mouse curson. It seems that is something a bit unique to my computer, and maybe one or two others. I revived my old advice put on forums.msiwind.net and here to use the terminal to fix the drivers - this time the kexts were already on the HDD though. But of course the keyboard had stopped working in the terminal too.

Eventually I found a USB keyboard and fixed the display drivers as before, then ran the package from the forums to fix the keyboard and trackpad. Weirdly, when I rebooted the Ctrl key was stuck down until I pressed it again - making clicking anything do weird things.

Failed attempt to update BIOS to 1.0A

Using the 1.0A file at:


I used the technique here, but put on an SD card:


1. Prepare pendrive with working BIOS version. You only have to copy file with BIOS on your pendrive and change file extention to "rom". Nothing more. So if you have EN011IMS.109, rename it to EN011IMS.ROM.
2. Insert prepared pendrive in to USB port
3. Remove the battery and disconnect power cord.
4. Press and hold power button
5. Connect power cord.
6. Release power button.
7. Press power button twice
8. Press "Del" to enter BIOS setup
9. Go to "Recovery" tab
10. Select "Proceed with flash update" and press Enter
11. Update process will begin. DO NOT PRESS ANY KEY OR REMOVE POWER CORD!
12. After process is finished, press Enter and turn off your Wind (you can remove your power cord now).
13. Insert battery and connect power cord.
14. Start your Wind, go to BIOS setup and load default settings ("Load setup defaults"). Save and exit BIOS.


Unfortunately the BIOS doesn't seem to have the Recovery tab :-(