Local Printing on a Windows XP Tarantella Client running the Sun JVM
Updated November 1, 2007
When switching from Microsoft's JVM plug-in for Internet Explorer to the JVM offered by Sun in any of its JRE or JDK packages, Tarantella's client device print mechanism no longer works. This problem also occurs with Netscape, Mozilla, and Firefox browers. Here is typically what you see:
Open the Java console and log in to the Picture Perfect host. Look for a message similar to this.
When you install a Sun JVM plug-in for your favorite browser, and then run an applet, the Java 2 security specification is imposed. Tarantella 3.2 applets aren't designed to work with these restrictions. The good news is, with the Java 2 security model, access to local resources is managed through the use of policy files.
The main security policy file, java.policy, allows administrators to specify which applications and which URLs can access local resources outside of the conventional Java sandbox. We can use the policy file to grant permission for the Tarantella print applet downloaded from a Picture Perfect host to access the various local resources in order to print to a local printer.
To get Tarantella "follow me" printing to work on a PC running a Sun JVM on Windows XP, follow this procedure.
1. Collect a list of printer drivers from your Windows clients. One way to optain this information ist to use regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\
For each printer listed there, note the value of the Driver key.
2. On the Tarantella server, edit /opt/tarantella/etc/data/printertypes.txt and add the following. For PCL, add the list of driver .DLLs that you found in the registries of the clients, separating each driver name with a semi-colon:
With any luck, your browser window will indicate that the printer is ready:
This fix has been tested with IE6 SP 2 and Firefox 1.0.7 through Firefox 2.0.0.7 with Java 1.4 and Java5. It does not work with Java6 on Firefox 2.0.0.7. Let us know about other configurations and we will post your name and your results here.
When switching from Microsoft's JVM plug-in for Internet Explorer to the JVM offered by Sun in any of its JRE or JDK packages, Tarantella's client device print mechanism no longer works. This problem also occurs with Netscape, Mozilla, and Firefox browers. Here is typically what you see:
Open the Java console and log in to the Picture Perfect host. Look for a message similar to this.
Tarantella 3.20.907: Windows platform not supported: unknown. Printing not possible. Please inform an Administrator.Tarantella 3.20.907: Trying native methods to get printer infoTarantella 3.20.907: Can't print Can't Print (No browser privileges):java.security.AccessControlException: access denied (java.io.FilePermission nullTTAWinPrint.exe read). Printing not possible. Please inform an Administrator.The reason we don't see this issue with Microsoft's JVM is because Microsoft IE6 simply does not implement the Java 2 Platform Security Specification. Instead, it allows applets to read, write, and execute files beneath the user's C:\WINDOWS\JAVA\TEMP directory. So, while printing seems to work okay, its security model leaves a lot to be desired. It is disconcerting to learn that the Tarantella applet requires execute access to all files on all drives attached to the PC. It's even more surprising to learn that the Microsoft JVM happlily obliges!
When you install a Sun JVM plug-in for your favorite browser, and then run an applet, the Java 2 security specification is imposed. Tarantella 3.2 applets aren't designed to work with these restrictions. The good news is, with the Java 2 security model, access to local resources is managed through the use of policy files.
The main security policy file, java.policy, allows administrators to specify which applications and which URLs can access local resources outside of the conventional Java sandbox. We can use the policy file to grant permission for the Tarantella print applet downloaded from a Picture Perfect host to access the various local resources in order to print to a local printer.
To get Tarantella "follow me" printing to work on a PC running a Sun JVM on Windows XP, follow this procedure.
1. Collect a list of printer drivers from your Windows clients. One way to optain this information ist to use regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\
For each printer listed there, note the value of the Driver key.
2. On the Tarantella server, edit /opt/tarantella/etc/data/printertypes.txt and add the following. For PCL, add the list of driver .DLLs that you found in the registries of the clients, separating each driver name with a semi-colon:
[unknown] PostScript=pscript5.dll PCL=dlxbrzim.dll;E_FMAIABA.DLL;UNIDRV.DLL;hpz2ku10.dll3. On each PC, locate the java.policy file for the its browser's JVM (example: C:\Program Files\j2re1.4.2_06\lib\security\java.policy) and add this entry:
// Access for Tarantella applets
grant codebase "http://*/ppwb/-" {
permission java.net.SocketPermission "*:3144", "accept, connect, listen, resolve";
permission java.util.PropertyPermission "user.dir", "read";
permission java.io.FilePermission "${user.dir}\\nullTTAWinPrint.exe", "read, write, execute";
permission java.io.FilePermission "${user.dir}\\TTAWinPrint.exe", "read, write, execute";
permission java.io.FilePermission "<<ALL FILES>>", "read, write, execute";
permission java.io.FilePermission "c:\\windows\\temp\\*", "read, write, execute, delete";
};
grant codebase "https://*/ppwb/-" {
permission java.net.SocketPermission "*:3144", "accept, connect, listen, resolve";
permission java.util.PropertyPermission "user.dir", "read";
permission java.io.FilePermission "${user.dir}\\nullTTAWinPrint.exe", "read, write, execute";
permission java.io.FilePermission "${user.dir}\\TTAWinPrint.exe", "read, write, execute";
permission java.io.FilePermission "<<ALL FILES>>", "read, write, execute";
permission java.io.FilePermission "c:\\windows\\temp\\*", "read, write, execute, delete";
};
4. Force the JVM to re-read the policy file by typing "r" in the Java console window, or by closing the browser and restarting it. Tarantella 3.20.907: Windows platform not supported: unknown. Printing not possible. Please inform an Administrator. Tarantella 3.20.907: Trying native methods to get printer info network: Cache entry not found [url: http://pphost/ppwb/cgi-bin/ttaprinter.cgi?os=unknown&driver=hpz2ku10.dll, version: null] network: Connecting http://pphost/ppwb/cgi-bin/ttaprinter.cgi?os=unknown&driver=hpz2ku10.dll with proxy=DIRECT Tarantella 3.20.907: Found printer type pcl from key "unknown", value "hpz2ku10.dll".
With any luck, your browser window will indicate that the printer is ready:
This fix has been tested with IE6 SP 2 and Firefox 1.0.7 through Firefox 2.0.0.7 with Java 1.4 and Java5. It does not work with Java6 on Firefox 2.0.0.7. Let us know about other configurations and we will post your name and your results here.



