webCDwriter
Installation Guide

Table of Contents

1. Installing cdrecord and mkisofs

This version of webCDwriter was tested with cdrecord 1.9 and mkisofs 1.13. In this section I describe how you can compile cdrecord and mkisofs yourself.

1.1 Get cdrecord

You can get cdrecord-1.9.tar.gz from here (it contains both cdrecord and mkisofs).

1.2 Unpack it

tar xzvf cdrecord-1.9.tar.gz

1.3 Compile it

cd cdrecord-1.9
make

1.4 Install it

Copy the binaries of cdrecord and mkisofs to a directory in your path.
cp cdrecord/OBJ/i586-linux-cc/cdrecord /your/dir
cp mkisofs/OBJ/i586-linux-cc/mkisofs /your/dir
Probably you will have to adjust the i586-linux-cc directory.
Alternatively you can specify the absolute filenames of cdrecord and mkisofs in the config of CDWserver.

2. Testing cdrecord and mkisofs

It is important to go through the tests in this section. First, you will need the arguments determined in this section for the configuration of CDWserver. Second, the server won't run if any of these tests fails. It is recommended to run the tests as the same user who should later run CDWserver.

2.1 Version of cdrecord

cdrecord -version
CDWserver was tested with "Cdrecord 1.9".

2.2 Get the bus,id,lun-triple of the CD-writer

cdrecord -scanbus

2.3 Try to get information from the CD-writer

cdrecord dev=bus,id,lun -inq

2.4 Version of mkisofs

mkisofs -version
CDWserver was tested with "mkisofs 1.13".

2.5 Determine the devicename of the CD-writer (eg. /dev/scd0)

Put a none-empty CD in the CD-writer, replace the x and try
dd if=/dev/scdx of=/tmp/cdimage.iso
This should copy the first track of the CD to /tmp/cdimage.iso. It is important that the user running CDWserver can do this.

3. Installing CDWserver

3.1 Compile the C++ source

cd CDWserver
make

3.2 Create the configuration-directory and copy the example config

mkdir /etc/CDWserver
cp config.eg /etc/CDWserver/config

3.3 Edit /etc/CDWserver/config

With cdrecordDevArg=auto and mkisofsMArg=auto CDWserver tries to autodetect your CD-writer. If that doesn't not work, you can set manually CDWserver stores the sessions and the temporary image file in the spoolDir. By maxMBytesInSpoolDir you have to tell it, how many bytes will be available.

3.4 Create log and spool directories

mkdir /var/log/CDWserver
mkdir /var/spool/CDWserver

3.5 Specify the Greeting and Insert-CD-Message

3.5.1 /etc/CDWserver/greeting

If this file exists, the contents will be send as a greeting when a user connects to CDWserver
You are connected to CDWserver!

3.5.2 /etc/CDWserver/waitForCD

This file could contain the message to inform the user to insert a CD
You have %d minutes to insert a CD.

3.6 Run CDWserver

Start CDWserver by
./CDWserver [stdout]

The option stdout lets you see the output normally going to /var/log/CDWserver/version.vlog. To make sure everything is OK, visit the http status port (by default http://localhost:10001/).

If the init process should start CDWserver at system startup, copy or link CDWserver/control to /etc/rc.d/init.d/ and make the appropriate links in the /etc/rc.d/rc?.d/ directories.

4. Compiling webCDcreator

webCDcreator is a client for CDWserver that can be run as a Java application or as a Java applet. As an applet it can run in Netscape Communicator or with the Java TM Plug-in from Sun. The applets need to be signed because they have to read the local files. See JAVA CAPABILITIES API and Java Security API for this. If you don't want to compile and sign the applets yourself go to 5..

4.1 Using JDK 1.1

If you are using JDK 1.1 (not JDK 1.2) install Swing and do
export CLASSPATH=.:/path/to/swing/swing.jar

4.2 Compile the Java source

cd webCDcreator
make

4.3 Run webCDcreator as an application

java CDcreator --help
will show the possible arguments of webCDcreator.

4.4 Signing webCDcreator for Netscape Communicator

You will need
  1. Netscape Signing Tool: A tool that you can use to sign jar files.
  2. A certificate for Netscape Object Signing. You can get a demo certificate from here.
Then you can sign webCDcreator by
export "certificate=My certificate name"
make 4netscape
You will find the signed webCDcreator.jar in the 4netscape directory.

4.5 Signing webCDcreator for Java Plugin 1.2

Sun provides an example how to create and run a signed applet.

For webCDcreator you can go through the following steps:
  1. Generate a new key-pair and self-signed certificate "test"
    keytool -genkey -dname "cn=User Name, ou=Unit, o=Organization, c=de" -validity 3650 -alias test
  2. Sign webCDcreator.jar using the certificate "test"
    export certificate=test
    make 4plugin
  3. You can export the public certificate "test" in a file test.x509 by
    keytool -export -rfc -alias test -file test.x509
You will find the signed webCDcreator.jar in the 4plugin directory.

4.6 Installing webCDcreator in your network

Go to the 4netscape or 4plugin directory and do the following:

5. Installing the signed versions of webCDcreator

If you trust my signed versions of webCDcreator, you can install them as follows:

6. Internationalization of webCDcreator

webCDcreator uses the JDK Internationalization APIs to support different languages and countries. The file webCDcreator/Messages.properties contains the default messages of webCDcreator.

6.1 Adding a new translation

If you want to translate a message to your language, you have to add a file webCDcreator/Messages_xx.properties. xx is the ISO-639 language code of the language. You could take my German translation webCDcreator/Messages_de.properties as an example. If you want to share your translation with others, you can send it to me. I will make it available in a future release.

6.2 Selecting a language

Running webCDcreator as an application you can use a language=en argument to set the language (en for English in this case). For the applet you can achieve the same by setting the parameter language to en.