Saturday, September 26, 2009

CyberGuard / SnapGear - restoring http access

If you've got locked out of your CyberGuard / SnapGear firewall, as long as you still have SSH access you can regain access without doing a factory reset.

From the command prompt type "enableweb"

/> enableweb
The web interface has been enabled on ALL interfaces, for HTTP and HTTPS.
Please ensure you review the administration access control options.


As it says, this will re-enable access on ALL interfaces, including Internet, so you need to review the choices, FAST!

Wednesday, September 23, 2009

Google Sync on iPhone - only one instance allowed

Google Sync for Apps to iPhone, Blackberry, Android etc is very cool and useful, but has a limitation on the iPhone that you can only have one Active Sync connection.

If you try to create a second one you get the error message

"Account Already Exists
Only one Exchange Active Sync account can be configured"



Shame!

Tuesday, September 22, 2009

Synology Diskstation - share music to iTunes

My Synology DS-109+ is a great device. Fast and with a great feature set.

One of those features is the ability to publish music to your local network.

To do so, first enable the service - its off by default. Find the iTunes link on the left, and click.

Tick the box "Enable iTunes service to allow all iTunes clients in the same network subnet to browse and play music in the "music" shared folder" and give your Diskstation a name.

The playlist feature is cool, of course





Sunday, September 20, 2009

OSX - bulk convert to PDF

OSX has a convert utility that you can use to bulk convert documents in PDF. IN essence if the OS support viewing and printing them, you can convert them.

To convert a single file you can use

/System/Library/Printers/Libraries/convert -f path/to/source.file -o destination.pdf

If you want to convert in bulk you can use AppleScript.

Open Script Editor from /Applications/AppleScript, then in a new script copy and paste

on open input_documents
repeat with this_document in input_documents
set this_document_path to POSIX path of this_document
--display dialog this_document_path
do shell script "/System/Library/Printers/Libraries/convert -f " & quoted form of this_document_path & " -o " & quoted form of this_document_path & ".pdf"
end repeat
end open

then from File Menu select Save As. In File Format select Application. Give it a name, and then you can drag and drop your files onto it, and hey presto converted to PDF.

Friday, September 18, 2009

MSI WInd - updating to 10.5.8 on msiwindosx86.iso

So my Wind needed to be updated to 10.5.8. There aren't many instructions around as to what will break, but something always does.

I used Carbon Cloner to clone the HD to another USB drive. Although it wasn't bootable, it was a complete copy including my user profile, apps etc. So if it went horribly wrong I had a backup.

This time, I removed the HD and put into a SATA / USB case. I booted from it, and it booted fine. Then I updated to 10.5.8. And then restarted.

Well it started OK, but, instead of showing the login screen, the screen went weird all scrambled.

So this is why the drive is in an external case!

Shutdown the Wind, connect the drive to another Mac, and remove some items from /system/library/extensions:

AppleIntelGMA950.kext
AppleIntelGMA950GA.plugin
AppleIntelGMA950GLDriver.bundle
AppleIntelGMA950VADriver.bundle
AppleIntelIntegratedFramebuffer.kext

rename extensions.kext, restart and off we go.

Checking it seems that Quartz Extreme is not working... don't remember if it was before!

Update: the fix for Quartz Extreme is to re-install CyberGreg's drivers. Google for "MSi OSX86 Upgrade Pack v1.5".

Update 2: I also had the sleep problem. Found "SleepEnabler.kext", installed via kext helper.


Super!

Monday, September 14, 2009

Vodafone 3g on OSX - now native Intel

Up to now, the Vodafone software for OSX has included PowerPC code ie not Universal Binary. This is an Activity Monitor snapshot


Step forward v3.04.06.00, which is now Universal, and even has a re-worked interface.

Download it from here


install and launch. It replaces the Vodafone folder, and all the PowerPC bits. But, this version does not work with 10.6 Snow Leopard.

It sports a new tabbed interface. The first tab shows the status of your network connections

the second tab allows managing your connections

the third has a very useful data useage summary

and the fourth tells you what devices are connected

I have just one complaint, other than the lack of Snow Leopard compatability..

Its uses a LOT of CPU, a real CPU hog!


Update: new version, Snow Leopard compatible, from the above link v3.04.07.00

Saturday, September 12, 2009

Unable to install iPhoto

iPhoto 8 was supplied with my MacBook Pro 13". But at some point its got corrupted, and when I launch it I get an error.

So the obvious thing to do is re-install. After inserting the DVD and launching Install Bundled Software, I select to do a custom install, but iPhoto is greyed out, and not selectable.

Step forward Pacifist from www.charlessoft.com. After downloading and launching I open the Install Bundled Software package and after a few minutes it shows me the package list. Right click on iPhoto and select Install to Default Location. Every few minutes it would say that something already exists, and I would select 'replace'.

If you have, say, MacBook Air that doesn't have DVD, you can use Remote Disc to copy over the iPhoto package. The packages are in /Volumes/Applications Install Disc/System/Installation/Packages/.packages.

That path is invisible so either use Onyx to show invisibles, or copy from the above path and from the finder do 'apple+shift G' and paste in the path.

Or, after the DVD had mounted, using Remote Disc, you can open the disc from within Pacifist.

Friday, September 11, 2009

Google Docs - bulk upload

Here's a cool way to bulk upload to Google Docs. It works with all Google accounts eg plain vanilla gmail ones where your account is name@gmail.com as well as Apps accounts where your account is name@domain.com.

First, on OSX you need Java 1.6. You see which you have from the Java Preferences application in /applications/utilities. Of course it would be too easy to call it 'Java 1.6'... its Java SE 6


Drag Java Se 6 to the top of the list and then quit Java Prefs - it auto saves.

Second you need to get the Java applet from here code.google.com/p/google-docs-upload/

If you have wget you can run

$ wget http://google-docs-upload.googlecode.com/files/google-docs-upload-1.2.jar

Then from the command line you run

$java -jar google-docs-upload-1.2.jar ~/Documents/1test/ --recursive --username name@gmail.com

It asks for your password, and then after a few moments, its done.



I did find a couple of weird things.

It doesn't create the enclosing folder, so if upload /docs it won't create docs. You need to have it in a sub folder eg /upload/docs, and it will create the 'docs' folder in which you'll find your docs.

And for some reason it sets the folder on my Mac to be read only.

Wednesday, September 9, 2009

Removing entries from Firefox's auto complete

Over time Firefox accumulates a lot of cruft in its autocomplete list. If you want to delete them, here's how (from support.mozilla.com/en-US/kb/Form+autocomplete).

If you want to remove one of your previous form entries from Firefox's history:

  1. Click on the form field and press the down arrow key to display all the saved entries. You may type the first few letters of the entry to limit the number of entries displayed.
  2. Use the down arrow key or the mouse pointer to highlight the entry you wish to delete.
  3. Press Shift+Delete. The entry will be removed.
  4. You may repeat the process for any number of entries for a particular form field.

If you want Firefox to forget ALL of your previous form entries, you need to clearing form history:

  1. At the top of the Firefox windowOn the menu bar, click on the Tools menu, and select Clear Recent History.... A dialog box will appear.
  2. In the dialog box, set Time range to clear: to Everything.
  3. Click on the down arrow beside Details, make sure only Form & Search History is check marked.
  4. Click Clear Now. The dialog box will disappear and your form history will be erased.

Friday, September 4, 2009

Using SARG on OSX 10.5

If you use Squid on OSX then likely you'll want to analyse your log files.

I've been using SARG (Squid Analysis Report Generator) for some years on OSX 10.4 and apart from the index sort going wrong now and again, its worked well.

Now I need to run it on 10.5, and thats a problem. The 2.08 version comes packages DMG and the installer runs OK, but always I get the error

    SARG: (index) Cannot open file: index.sort
So I thought I would see if I can get 2.231 going. First I downloaded it from http://www.d2m.com.br/community/sarg_port/sarg2.231-mac-os-ppc-build.zip. There's no installer just a .zip with its files.

After unzipping I placed this inside the applications folder, and then modified sarg.conf to have the same input and output files and directories, and the local locations for languages, exclude_codes etc. Doesn't work. SARG still expects the log file to be in
    /usr/local/squid/var/logs
and wants to output into
    /var/www/html
This is how to get it running:
  1. download SARG 2.231 http://www.d2m.com.br/community/sarg_port/sarg2.231-mac-os-ppc-build.zip
  2. unzip etc and put in /Applications
Then from terminal run some commands:
    sudo sudo mkdir /usr/local/sarg2.231
    sudo cp -R /applications/sarg2.231/languages /usr/local/sarg2.231/languages
    sudo cp -R /applications/sarg2.231/exclude_codes /usr/local/sarg2.231/exclude_codes
    sudo cp -R /applications/sarg2.231/images /usr/local/sarg2.231/images
This creates the directories SARG is expecting to find in /usr/local and copies in the various resources.

Now you can copy or move you logs to, say

    /applications/sarg2.231/logs

and then you can run SARG with the

    -l switch to specify the log file
    -o switch to specify the output directory

Then run the command to process your log file
    /applications/sarg2.231/bin/sarg -l /applications/sarg2.231/logs/squid-access.20090715.log -o /applications/sarg2.231/reports

SARG runs and you see the output

SARG: Records in file: 30052, reading: 100.00%
SARG: Successful report generated on /applications/sarg2.231/reports/2008Jul13-2008Jul15

You can then open
    /applications/sarg2.231/reports/index.html

to read the output.

Here's the lst of SARG options and switches from man sarg


-h
Show summary of options.

-a [hostname|ip address]
Limits report to records containing the specified hostname/ip address

-b filename
Enables UserAgent log and writes it to filename.

-c filename
Uses filename as the exclude files to select records that are not counted.

-d date
Uses date as the timelimit during logfile processing. Format for date is dd/mm/yyyy-dd/mm/yyyy

-e email
Sends report to email (stdout for console).

-f filename
Reads configuration from filename.

-g e|u
Sets date format in generated reports.
e = Europe -> dd/mm/yy
u = USA -> mm/dd/yy

-i
Generates reports by user and ip address.
NOTE: This requires the 'report_type' option in config file to contain "users_sites".

-l filename
Uses filename as the input log.

-n
Enables ip address resolution.

-o dir
Writes report in dir.

-p
Generates reports using ip address instead of userid.

-s string
Limits report to the site specified by string [eg. www.debian.org]

-t string
Limits records counted in statistics based on time-of-day. Format for string is HH or HH:MM or HH:MM:SS.

-u user
Limits reports to user activities.

-w dir
Uses dir for temporary files.

-x
Writes messages on processes to STDOUT

-x
Writes debug messages to STDOUT

-convert
Convert the logfile's date/time field to human-readable.

-split
Split the log file by date in -d parameter.