Looking Glass is based on Java technology bringing 3D windowing and
visualization to your JDS system. Currently the proof of concept
LG3D-CORE demo is available for download at
This page explains how to prepare and install lg3d-core on to your
beginning the process of setting up your LG3D environment, you need
to first check to make sure that your system meets the necessary
System = "Sun Java Desktop System Release 1 or 2".
this tutorial is based on SJD no other Linux flavour will be
"2 GHZ or faster"
is recommended by Sun Microsystems that you have a fast processor; I
am personally using a 2.3GHZ SMP.
"512 or more"
Card "3D accelerated graphics card with supported drivers for
OpenGL, version 1.2 or greater.
intending to use LG3D with full screen resolution a 24-bit display
depth is required!
now we have that information out of the way lets start by collecting
some information on your system just to make sure we cover the
minimum system requirement.
a Terminal session within you SJD Graphical interface.
The next couple of steps are simple commands
executed in the new Terminal Window that you have just opened.
the Project Looking Glass requires a colour depth of at least 24 bits
and many systems are configured by default with 16 bit colour depths
the Project Looking Glass will not run correctly as it is supposed
to. So for you to be able to identify your current display depth
there are many ways to do it but the two most popular methods used by
myself are mentioned here:
# cat /etc/X11/XF86Config | grep DefaultDepth
executing this command you are using the standard Unix - Linux "cat"
command to display the content of the XF86Config config file,
followed by a pipe sign and the simple "grep" command. By using
the "grep" command you are gripping the only information that you
are interested at this point in time and discarding all the other
Now assuming your screen depth is set to the
minimum depth of 24 this is the result you should expect to see from
the above command:
Now the second option to display your current
screen depth is a simple command that you can run to view the same
information as the one above:
# xdpyinfo | grep "depth of "
again assuming your screen depth is set to the minimum depth required
this is the result you should see from the above command:
of root window: 24 planes
you have run the above commands and you are satisfied that you meet
the necessary requirement go directly to step four omitting step
three. Or if the result does not meet the requirements i.e. display
"DefaultDepth = 24" or "depth of root window: = 24 planes"
then continue with step three.
within a terminal session you have earlier open, run the sax2
Command: # /usr/X11R6/bin/sax2
SaX: root Password: "enter
root password" if you are not yet logged in as root.
the SaX2 application has opened:
and Resolution Properties
the "colour selection panel", click on the menu and choose
"16.7 Mio. [24 Bit]".
that on the "Resolution(s) for 16.7 Mio. [24 Bit] colours"
tab, select the preferred resolution for your desktop.
example the maximum resolution available to my monitor is 1280x1024
so I have selected the following options:
]1280 x 960
800 x 600
640 x 480
you have made your choice press "OK" followed by the
you should be back to your original sax2 window and to complete the
configuration select "Finalize …"
you click on Finalize, a new window will pop up and it is recommended
that you do run the test to make sure that the new setting will work
blue test screen should appear, adjust it as required so that you
screen is nicely laid out in the middle of your monitor once you are
satisfied click the "Save" button on the display and then
"Ok" when you return to the SaX2 window, followed
by "Yes" to exit from SaX2
the test screen did not appear correctly, leave the system IDEL for
30 seconds, the test will exit after that period and your previous
desktop session will be restored. At this point you should then try
alternate resolutions at the 24-bit colour depth to find a resolution
that works for your monitor.
you are satisfied with the settings and your test goes correctly log
out and re-login to your desktop session and verify that the colour
depth is now 24-bit or higher by using the same commands provided at
the beginning of this step.
four is quite simple all you real doing is downloading the necessary
components for the installation of LG3D Project on to your existing
Java Desktop System.
will need to register at the java.net web site before you are able to
download any software so therefore if you have not previously
then you will need to open and create an account:
and click on the "Register" link at the top of the page.
your preferred user name and e-mail address and then press the
will receive an e-mail message with instructions on how to set a
password for your account. Once you have entered your password and
accepted the java.net website terms of participation you will be
installation instructions assume that you download all of the
components into /tmp/lg3d, so before you start downloading execute
the following command:
# mkdir /tmp/lg3
Now you should be ready to start downloading, so
Java 2 SDK, Standard Edition 1.5.0 Beta 2
installation instructions will also assume you download the RPM
version of the JDK Standard Edition for your Sun Java Desktop System.
Follow down the directory structure j3d-core Experimental
Builds 1.3.2-build4 and in that sub-folder download
Advanced Imaging API (JAI) 1.1.2 JDK
Select the "JDK(TM) Install: Bundle for installation in a JDK
Download". After reading and agreeing to the Software License
Agreement, choose the "Linux JDK Install" the file you are
actually looking for is "jai-1_1_2-lib-linux-i586-jdk.bin"
Looking Glass installation package
down the directory structure lg3d-core stable builds.
the link named release_0.5
and select a directory we created earlier on to download the file to.
downloading all of the components, install them by following the
that you have all the necessary components to install and configure
lg3d-core it is a good time to begin the installation, first of all
if you have closed the terminal session you had opened before open a
new one and log in as root.
# su - root
Password: enter root password
our first step in the installation process you are going to install
the Java 2 SDK.
I am assuming that you have download all of the components into
Command: # cd /tmp/lg3d
This will simply take you to the directory where
all your files have been downloaded to.
# sh jdk-1_5_0-beta2-linux-i586-rpm.bin
above command is now extracting the rpm file and installing it onto
Well you are now getting closer to seeing your
lg3d working on your system. Now you need to install the Java 3D SDK:
If you are not already in the directory that contains all your source
files for LG3D run the first command otherwise just start at the next
Command: # tar
The above command is using the tar archiving tool
to extract the java3d-1_3_2-build4-linux-i586.tar.gz file.
# cd /usr/java/jdk1.5.0/jre
Now you are entering the directory where all your
java files live, this directory was actually created when you
installed your jdk01_5_0.
# /usr/java/jdk1.5.0/bin/jar xvf
The above command looks complicated but it is
actually quite simple, you have first entered the directory where you
wish to extract the java3d jar file and then all you did was actually
extract the jar file from your source directory /tmp/lg3d
At this point there is only one extra Java
installation needed before you can actually install the Project
Looking Glass files. So now you will install a Java API and the API
you are going to install is the Advanced Imaging API for Java. For
those wondering what a API is – it is a (Application Program
Command: # cd /usr/java/jdk1.5.0
to your java installation directory where you are going to run the
Command: # sh
The above command is extract the
lg3d/jai-1_1_2-lib-linux-i586-jdk.bin file into the current
Now all your java is installed and before you go
any further you can delete some unwanted files.
Command: # cd /tmp/lg3d
now returned to your source directory.
# rm jdk-1_5_0-beta2-linux-i586.rpm
Command: # rm jdk-1_5_0-beta2-linux-i586-rpm.bin
# rm -r java3d-1_3_2-build4-linux-i586
last three commands you have run have removed the source files you
used to install the Java utilities required to run the Looking Glass
Ok the installation of the Java software is now
done, but just before you continue, you need to set some variables to
your environment. I am assuming that you do not normally run as root
but a normal user so your first step will be:
from the shell as root so that you once again become your normal
Command: # exit
Several environment variables now need to be set
in your shell profile. Here are examples appropriate for bash / sh or
you are running on the default bash shell you need to run the
Command: # echo "JAVA_HOME=/usr/java/jdk1.5.0" >> ~/.bash_profile
Command: # echo "PATH=$JAVA_HOME/bin:$PATH" >> ~/.bash_profile
you are running on the sh & ksh shell you need to run the
Command: # echo "JAVA_HOME=/usr/java/jdk1.5.0" >> ~/.profile
Command: # echo "PATH=$JAVA_HOME/bin:$PATH" >> ~/.profile
to set the same variable for the root user:
# su – root
the above steps so that you will also have the root user’s
it is the time you have been waiting for as it is time to Install the
"Project Looking Glass Developer's Release"
Command: # cd ~
Command: # tar -zxf
files will be extracted to a directory named lg3d in the current
directory which if all has gone well that should be your home
my point of view this is the most exiting step through the whole
process as you are about to Run "Project Looking Glass"
are two ways to run Project Looking Glass (i) in a window within an
existing desktop environment or (ii) as a full-screen desktop.
that only the full-screen desktop mode supports a key Project Looking
Glass feature, the integration of native, unmodified X11
easiest way to verify that your Project Looking Glass installation is
correct is to run the demo within an existing desktop. Once you are
satisfied it is working correctly, you can then configure your system
to run Project Looking Glass full-screen.
that running Project Looking Glass in a desktop window is a good way
to develop and test 3D applications and enhancements to the Window
Manager (Scene Manager).
Running Project Looking Glass within
an existing desktop environment
In this mode, a Project Looking Glass session runs
in a window in your desktop. This is the simplest way to run Project
Looking Glass but this mode only allows you to run Project Looking
Glass 3D applications, such as the CD chooser. X11 applications, such
as xterm will appear in the X session that you launched the Project
Looking Glass session from.
into your account and change directory to where you installed Project
Command: # cd ~/lg3d/bin
start the Project Looking Glass session:
Command: # sh lg3d-dev
you have successfully installed Project Looking Glass you should see
the familiar Project Looking Glass desktop in a window on your
Running Project Looking Glass
mode allows you to run Project Looking Glass in full-screen and gives
you the ability to launch other application, including native X11
applications. To do this you must first shutdown your X session
before starting Project Looking Glass.
run Project Looking Glass you must first shut down xdm. Since this
process is respawned automatically if you kill it you must first
disable this service using the chkconfig command:
again launch a terminal session and log in as root:
Command: # su - root
to disable the xdm from respawnning automatically every time you kill
it, run the following command:
Command: # /sbin/chkconfig -d xdm
0:off 1:off 2:off 3:off
4:off 5:off 6:off
close any desktop applications and save any open files. Then shutdown
the display manager:
From the same terminal session run the
Command: # pkill gdm-binary
if that does not work:
# pkill X
Starting the Project Looking Glass
To start a Project Looking Glass desktop session
from the console not within an X session, login as your self enter in
your password, become root and change directory to where you
installed Project Looking Glass:
Command: # cd ~/lg3d/bin
With the above command you are changing to the
directory where Project looking glass was installed.
Command: #su - root
it time to start the Project Looking Glass desktop session
Command: # sh lg3d-session
steps of the way went successful, after a few seconds the Project
Looking Glass desktop should appear.
re-activate the X Display manager so that you can launch your Default
Graphical interface, enter the following command as root, and then
reboot your system:
# /sbin/chkconfig -a xdm
END OF TUTORIAL ###
you have problems starting the desktop session, refer to the
section for assistance.
the Project Looking Glass desktop and start dreaming of new ways to
enhance the desktop user experience with 3D! When you're ready to do
development, skip over to the Project
Looking Glass Developer's Guide
for information about developing with Project Looking Glass.
on the 15th July, 2004 by Ricardo Wagemaker and based upon
documentation provided by Sun Microsystems imbibed with first hand