Posts mit dem Label OS X werden angezeigt. Alle Posts anzeigen
Posts mit dem Label OS X werden angezeigt. Alle Posts anzeigen

Samstag, August 23, 2014

show open iCloud Tabs in shell

I've got the idea from this macstories post. In the attached Python script you find not only the location where the OS keeps the information. But also how to access it.

After I had a look at the man page for plutil I started my own test.
plutil -p ~/Library/SyncedPreferences/com.apple.Safari.plist
This will display the informatio in a JSON looking format.
plutil -convert xml1 -o /tmp/iCloudTabs2.xml  ~/Library/SyncedPreferences/com.apple.Safari.plist
Converts the information to XML. Don't miss the -o or it will overwrite the original file. Instead you could also use -e xml to write to a file with the new extension.

The output contains the device, URL, page title and more. If I find some information on the iPad and want to save, I keep the tap open. The next time at the Mac the URL to download this with curl or wget is already there.

Montag, November 28, 2011

couchdb port installation trouble

Looking for a simple way to synchronise data from an Android phone I found a suggestion to use couchdb. Simply typing sudo port install couchdb didn't work. All suggestions found via google didn't help.

So I did, what I should have done at the beginning. I read the installing and error messages article on the couchdb wiki.

After this I did:
  • sudo port install erlang -universal

  • sudo port install couchdb-devel
and it worked fine.

[update 12.08.2012] Running sudo port upgrade outdated stopped with

Error: org.macports.configure for port couchdb-devel returned: command execution failed

So I removed couchdb and erlang, as it also was updated and redid the above steps. It failed again. Checking the log file it showed

this file was generated for autoconf 2.61.
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.

This was not, what I wanted to do. I tried to install couchdb instead (no -devel) and it worked. Next time I will try to install erlang without -universal

I had to start the couchdb demon multiple times before I was abale to connect. Not sure why.

Sonntag, September 05, 2010

some Java and Eclipse pitfalls on OS X

Could not compile Java code importing com.sun.net.httpserver.HttpServer. The error message is: Access restriction: Class is not accessible due to restriction on required library

fix: go to teh Java compiler sttings and open Errors/Warnings. Check the Deprecated and restricted API and change from Error to Warning.


Check downloaded files with ll -@ for com.apple.quarantine. Remove with sudo xattr -d com.apple.quarantine.


Some JNI libs need to be recompiled for Snow Leopard. Check with file for Mach-O 64-bit bundle x86_64.


Use System.out.println(System.getProperty("java.library.path")); in the line before the line before the class is loaded. Check if the library is in one of the paths listed. On OS X use /Library/Java/Extensions/.

Freitag, Januar 15, 2010

TrueCrypt "wrong password" on OS X

Installed TrueCrypt on OS X and plugged in an USB stick completely entcrypted with Windows XP. Surprisingly the device select dialogue showed not only the device but also two partitions. No matter what was selected TrueCrypt complained about the password.

Tested the stick under Windows again and worked fine. After reboot of the OS X system TrueCrypt worked also as expected. Only the device was shown and after entering the password the device was accessible.

Not sure if a reboot was needed after TrueCrypt installation. It might also be some "remembered" info about the stick that was gone after the last "use" was unsuccessful.

Sonntag, November 08, 2009

changing Java version on Mac crashed eclipse

Checking the javac version from command line told me I was using 1.5. To change this I changed the Current and CurrentJDK. This worked fine for Java programs run from the shell.

The next restart of eclipse failed. Remembering that there should be a new version for Cocoa by now I downloaded the new 64bit eclipse version. Crashed with the same error messages.

Changed -Dosgi.requiredJavaVersion in eclipse.ini to 1.6 -> crash

Added Info.plist in Eclipse.app the line to require a specific Java version -> crash

Searching the internet for a solution I encountered the changing the link to select a Java version will bite you. This should be done with Java Preferences (Spotlight). Unfortunately the tool didn't start. Setting the links back to A changed this. With this tool you change the ordered of the preferred Java version.

With this changes eclipse started - and noticeably faster. The Activity Monitor now shows Intel (64bit). On the shell javac is now also 1.6.

Samstag, August 08, 2009

iMac and MyBook FW800 trouble

I have a WD MyBook connected to my iMac via FW800. If not in use both are disconnected from power via a multiple socket outlet with a switch. If I switch this on a start the Mac the drive is not mounted automatically. Mounting it by hand doesn't work either.

My only solution so far was to unplug the Mac from the power outlet and switch it one. After a view seconds I plugged in the Mac and booted it. With this procedure the MyBook was mounted most of the time.

Searching for a better solution I found this alternative. This is not really simpler as the solution I found, but it helps, if in the case my failed.

  • unplug the power cord of the MyBook

  • unplug the FW800 cable on one side

  • keep the Mac running

  • plug in the power of the MyBook

  • plug in the FW800 cable


No the MyBook will be mounted automatically.

Montag, Dezember 08, 2008

burn ISO image on Mac OS X

This is my step by step instruction based on this Mac OS X Hints article and its comments.

on command line:

  • hdiutil burn image.iso



with the GUI:

  1. insert blank disk and select Disk Utility to be opened

  2. cmd-B or press Icon Burn or menu Images - Burn

  3. select the .iso or .dmg image and click Burn

  4. confirm the drive to be used

Mittwoch, Juli 09, 2008

javafx and Mac OS X

I installed JavaFX as bin package. Unpacked it into /opt/local/lib/javafx and moved everything from archive/openjfx-compiler/dist into it.

Like stated on the page I've set the execution bit and updated the path variable.
export PATH=$PATH:/opt/local/lib/javafx/bin

The first example was HelloCompiledJavaFX.fx.

Starting it lead to the error message:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

The default version of java and javac on OS X 10.5.4 is 1.5.0_13. As this example worked under linux with Java 1.6 I tried this.

As I'm new to the Mac, I don't know if it is possible to switch the installed Java version via System Preferences. But luckily Java has it's own way.

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

And now the JavaFX application runs fine.

Samstag, Juli 05, 2008

copy eclipse projects to OS X

The projects from the old 3.2 eclipse installation (linux) don't show up in the new 3.4 one (OS X). The projects are part of a Mercurial repository. The clone worked fine from view of Mercurial. But eclipse didn't show this projects.

Import from the workspace was not possible. It worked only after I moved this projects outside the workspace. But the projects should be locate inside the workspace. All machines should have the same file structure.

Adding the missing project again made the complete project with all is content visible. The original and the new .project file are equal.

A look at /Applications//eclipse/Eclipse.app/Contents/MacOS/eclipse.ini didn't reveal any obvious information about used projects.

I will try this on linux and Windows after I updated eclipse to 3.4 on this machines.

Montag, Juni 30, 2008

Mercurial on OS X

There is more than one way to install Mercurial on OS X. I used port, because this will provide me all the missing unix tools.

Calling hg resulted in a traceback: ValueError: unknown locale: UTF-8
The page showed me a solution - adding
export LC_ALL=en_EN.UTF-8
export LANG=en_EN.UTF-8
to .profile.

After this Mercurial works just fine.