RSS

Category Archives: macosx

ATG 9.1 on Mac OS X 10.6

Using the instructions from Ronald Pulleman (which focus on ATG 2007.1), I tried installing ATG 9.1 on Mac OS X 10.6.2. Below are the instructions for reproducing what worked for me.

Make sure you know what is officially supported by ATG, since Mac OS X is not. Also make sure you have the Installation Guide handy, part of the ATG 9.1 documentation set.

Below I refer to the .profile file for adjusting environment variables. Make sure you apply these environment variable changes each time. If you do not use bash, then replace .profile with whatever your shell reads on startup.

Install and configure MySQL

  • Have MySQL installed; I picked MySQL 5.1.45 (64-bit), but 5.1.32 would have been supported.
  • Add this your .profile:

    export MYSQL_HOME=/usr/local/mysql-5.1.45-osx10.6-x86_64
    export PATH=$MYSQL_HOME/bin:$PATH

  • In your System Preferences application, start MySQL and make it start automatically at boot.
  • Change the password of the root user, for obvious reasons:

    mysqladmin -p -u root PASSWORD newpass

  • Make MySQL use the InnoDB engine by default, this is required for ATG: Create the file /etc/mysql/my.cnf with the following contents:

    [mysqld]
    default-storage-engine=innodb
    sql-mode=TRADITIONAL

Install and configure JBoss

  • Install JBoss; I used JBoss 4.2.3-GA (community edition), while the (paid) JBoss EAP 4.2.0 CP05 would be the ATG-supported version.
  • Add this to your .profile:

    export JBOSS_HOME=$HOME/jboss-4.2.3.GA
    export PATH=$JBOSS_HOME/bin:$PATH

  • Modify the JVM arguments in the startup script, if you want to comply with the ATG recommendations for JVM parameters. Edit the bin/run.sh file and modify the JAVA_OPTS setting as follows:

    JAVA_OPTS="-server -Xms2048m -Xmx3072m -XX:MaxPermSize=768m -XX:MaxNewSize=768m -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.client.gcInterval=3600000"

Integrate MySQL with JBoss

  • Download the MySQL JDBC driver Connector/J, I got version 5.1.12.
  • Copy the Connector/J JAR file to the server/atg/lib directory under the JBoss home directory:

    cp ~/Downloads/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar $JBOSS_HOME/server/atg/lib/

Install and configure ATG

  • Download ATG 9.1 from the ATG support site, this is a JAR file.
  • Unpack it and then execute the contained .bin file:

    unzip ATG9.1.jar
    sh ATG9.1.bin

    Choose JBoss as the application server. I suggest you make sure there is no space in the name of the destination director (I chose ~/atg-9.1).

  • Put your license keys in the home/localconfig/ directory (below the ATG installation directory).
  • Create the file home/bin/dasEnv.sh with just one line in it:

    export ATGJRE=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java

  • Create the file home/localconfig/atg/dynamo/service/jdbc/JTDataSource.properties with the following contents:

    JNDIName=java:/MySqlDS
    $class=atg.nucleus.JNDIReference

Initialize the ATG database

  • Under the JBoss directory, create the file server/atg/deploy/mysql-ds.xml with the following contents:

    <datasources>
    <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://127.0.0.1:3306/atg000</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>atg</user-name>
    <password>atgpass</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    <metadata>
    <type-mapping>mySQL</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>

  • Log in to the MySQL command line client mysql:

    mysql -p -u root

  • Create a database user for ATG:

    USE mysql
    INSERT INTO user (host, user, password) VALUES ('%', 'atg', PASSWORD('atgpass'));

  • Create a database for ATG:

    CREATE DATABASE atg000;

  • Allow the atg user all access privileges on the atg000 database:

    GRANT ALL PRIVILEGES ON atg000.* TO atg;
    FLUSH PRIVILEGES;

  • Exit the mysql client (you can use Ctrl-D).
  • Create the ATG data structures in the database by executing the DDL scripts on MySQL (this typically takes less than a minute):

    cat DAS/sql/install/mysql/das_ddl.sql DPS/sql/install/mysql/dps_ddl.sql DSS/sql/install/mysql/dss_ddl.sql DCS/sql/install/mysql/dcs_ddl.sql | mysql -D atg000 -u atg -patgpass

Run ATG

  • Deploy an ATG application to JBoss.
  • Start JBoss: Go to the JBoss directory and execute:

    bin/run.sh -c atg

  • Using a browser visit http://127.0.0.1:8080/dyn/admin/ to see the DynAdmin tool.
 
10 Comments

Posted by on 30 March 2010 in atg, darwin, jboss, mac, macos, macosx, mysql

 

The New OS Challenge: Data Integration and Synchronization

>Today’s OS challenge
In the past, operating systems had a limited function, synchronizing access to internal and external hardware, file systems, memory, processes, etc.

Nowadays, user’s demands far exceed these ‘simple’ requirements, expecting data integration and synchronization. People use different (portable) machines, applications and different (online) storage realms, and these all need to integrate in a customer-focused manner.

Examples: image manipulation, bookmarks, data exchange
For example, on Mac OS X images can be manipulated with all sorts of relatively cheap programs these days (e.g. Skitch, LittleSnapper, Acorn, Pixelmator, Picturesque, etc.) All these programs have a different focus and provide different functions, with some overlap. However, when you try combining the functions of these programs, you are facing a real challenge. What format do you use for data exchange? PNG is a good choice for one-way image manipulation, but then don’t try changing something in the middle of your process.

This challenge becomes even larger when you try exchanging vector images between multiple applications, like Keynote, Pages, NeoOffice, Novamind, Microsoft Office, etc. Both SVG and OpenDocument are formally standards, but they are currently far from practical for inter-application data exchange. On the Mac platform, EPS and PDF are typically the best bets. An established practical standard is lacking.

Another example is your bookmarks. How do you synchronize your bookmarks between Firefox, Safari, Opera and Internet Explorer? Each vendor starts to deploy his own web-based synchronization service (MobileMe, Opera Link, etc.) and there are some that go a bit further already (XMarks, Delicious) but we need one solution for all browsers that integrates with different operating systems.

Finally, notice how online data exchange services have started to emerge. For example Quicksnapper, Skitch.com, MobileMe, Flickr, YouTube, etc. These services make it easy to share data over the internet, but they are typically focused on one type of data (images or video, for example) and fail to integrate with different sorts of applications. Their focus is typically limited.

Dropbox is a positive exception here, providing a generic data exchange experience that is seamless across Mac OS X and Windows platforms, transparently working with all sorts of applications and providing limited history/backup/versioning support. However, optimally, applications should be adjusted so they recognize and support this platform.

And what if you want to view and edit your files on the fly from your mobile device, like an iPhone?

Network computer?
In the past, companies like Sun MicroSystems attempted to resolve these issues with a largely closed environment: the network computer, sporting a central server for sharing all applications and data. Although there are still (business) environments where this is an excellent solution, the majority of the customers requires more choice and an open system.

Operating system support
This is where an operating system like Mac OS X can make a big difference. OS X is already much appreciated for the system-wide services it provides, like spell checking, hyphenation, speech, etc. But these don’t go far enough.

For application interoperability, Apple should extend their vision, provide a platform and produce some guidelines. These should enable application developers to write interoperable programs that support tomorrow’s applications, collaboration and synchronization tools and data exchange methods, including versioning support.

This may require a strategic shift, as Apple is currently trying to make money off MobileMe, which is a closed and proprietary platform that has limited features and is based on an expensive yearly subscription model. Such a model is hardly suitable for large groups of customers that will look elsewhere for their data exchange requirements.

 

Favourite Mac OS X Feature Requests (Updated)

>Here are some of my favourite Mac OS X feature requests, just aimed at improving my efficiency when using the Mac:

  • when replying to a sent email from Mail, make sure the To:/CC: addresses are the same as the original (currently, in Mac OS X 10.5.6, the To: address is set to my own address);
  • make the Finder allow me to show folders first;
  • allow me to put mount points in the Locations bar in the Finder (currently only folders below the mount points can be put in there);
  • make Cmd-` work while dragging from a Finder window, inside the Finder (perhaps this is even a bug on my system?);
  • allow me to configure Dashboard widgets are pre-started before I activate the Dashboard, this saves me quite some time;
  • resize windows from any corner – at least make this an option;
  • in the Finder, have a Go-back keyboard shortcut for going back to the previous location (like Cmd-LeftArrow in Safari and Firefox).
 
Leave a comment

Posted by on 27 April 2009 in dashboard, features, finder, mac, mac os x, macosx, mail, widgets

 

iTerm Suggested Improvements

>iTerm is the best terminal emulator on the Mac, IMHO. It’s more customizable than the Leopard Terminal application and supports transparency, tabs, select-to-copy, middle-button-paste, a full-screen mode (with Cmd-Enter), etc.

Here are some suggestions for bringing iTerm closer to perfection, in order of (subjective) importance:

  • bug: scrolling a view while more output is added (for example when monitoring an active log file) does not work reliably, the view constantly jumps to the end of the output;
  • feature: have an option to briefly show tab titles while switching tabs; this is especially useful in full-screen mode, since the tabs are then not visible;
  • feature: have a keyboard shortcut for moving tabs to the left or to the right;
  • bug: when changing monitors (e.g. disconnect an external monitor), while iTerm is in full-screen mode, iTerm does seem to notice the resolution change, causing iTerm to show as an odd borderless window;
  • bug: if iTerm is active and you switch from the current Space to another and back, then iTerm is no longer on the foreground, but the Finder is;
  • bug: when switching to full-screen mode and a tab other than the first is active, then the contents of the first tab are briefly (~1 second) shown before the contents of the active tab are shown again.
 
Leave a comment

Posted by on 11 February 2009 in iterm, mac, macos, macosx, terminal

 

>Mac OS X, fonts and headless Java

>If on Mac OS X your custom font is not available in headless Java, try installing it in /System/Library/Fonts/ instead of /Library/Fonts/.

Don’t ask me why, but this solved the issue I’d been struggling with for days. Below is the background.

Font installed
I purchased a font called “standard 07_55” from the miniml.com site and installed it via the font catalog program, which copied the .otf (OpenType) file to /Library/Fonts/:

  $ ls -lae /Library/Fonts/standard*otf
-rw-r--r--@ 1 ernst admin 11996 Oct 8 15:39 /Library/Fonts/standard 07_55.otf

It was accessible from the user account on the Mac, which is confirmed by running a text editor program.

Java program to list all available fonts
The following Java program lists all available fonts:

  public class ListFonts {
public static void main(String[] args) {
String[] fonts = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for(int i=0; i<fonts.length; i++) System.out.println(fonts[i]);
}
}

Running the program from the graphical environment
When I ran this program is from Aqua, it worked well and displayed all fonts, including the installed “standard 07_55” font:

  $ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
$ javac ListFonts.java
$ java -cp . ListFonts | grep tand
KufiStandardGK
standard 07_55

Even when I added -Djava.awt.headless=true it still worked fine:

  $ java -Djava.awt.headless=true -cp . ListFonts | grep tand
KufiStandardGK
standard 07_55

Running the program via a remote connection
However, when that same program was run via a remote connection (SSH), then the program would not start up like this:

  $ java -cp . ListFonts | grep tand
Exception in thread "main" java.lang.InternalError: Can't connect to window server - not enough permissions.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1723)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at apple.awt.CGraphicsEnvironment.(CGraphicsEnvironment.java:23)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at ListFonts.main(ListFonts.java:3)

This is understandable, since this is a remote connection, it cannot access the window server. So I started the Java program in headless AWT mode, and then it did run. However, now it does not show the font anymore:

  $ java -Djava.awt.headless=true -cp . ListFonts | grep tand
KufiStandardGK

Solving the issue
The fix? Simple: as root, move the font file to /System:

  # sudo mv /Library/Fonts/standard*otf /System/Library/Fonts/

I hope this helps someone else with a similar issue.

 
Leave a comment

Posted by on 10 October 2008 in aqua, font, fonts, headless, java, mac, macosx

 

>Quick review of Pixelmator

>While still looking for a real Mac OS X image manipulation program to replace GIMP, I did a quick review of Pixelmator.

After starting Pixelmator, it’s obvious the developers have put a lot of time and effort into making this application look and feel like a charm. Although the black transparent look is not conform the standard Aqua look and feel on Mac OS X 10.5 “Leopard”, this does not reduce the usability of the application.

Pixelmator has more features than Acorn or Seashore combined together, but not as many as Photoshop or GIMP. But although there are a lot of features, for me just a few are important, since I need them on a day-to-day basis.

My findings based on a quick review:

  • There seems to be no way to remove a color profile, although color profiles can be assigned. This can be worked around by copying all and pasting from clipboard.
  • There is no Paste as New Image option.
  • An Autocrop feature seems to be unavailable.
  • A Crop to Selection features seem to be missing; and since a Paste as New Image option is also missing, this cannot be easily worked around. There is a Crop tool, but this is in my workflow not productive, since in the absence of an autocrop feature I typically (a) use the magic wand to select an outer part of an image, (b) invert the selection (c) crop to the selection.
 
3 Comments

Posted by on 8 September 2008 in image, image editor, image manipulation, mac, macos, macosx

 

>Features missing in Acorn

>I really like the looks of Acorn, a powerful little image manipulation program for Mac OS X. However, there are some hurdles for me adopting it to replace GIMP:

  • It’s not easy to remove all tranparency from an image. It requires creating a new background layer, filling it with white color and then flattening the image. In GIMP, it’s one command.
  • There is no support for viewing or removing color profiles. It seems a color profile can be removed by selecting all of the image, copying the selection to the clipboard and then creating a new image from the clipboard.
  • There is no support for quantization, to reduce the number of colors to produce an indexed color image.

Still, Acorn looks very promising. It looks and feels like an excellent Mac OS X-citizen. It seems strong in filters and automation, but that’s not what I am looking for…

 
Leave a comment

Posted by on 8 September 2008 in acorn, image editor, mac, mac os, mac os x, macos, macosx, osx