From: moredhel@earthling.net
Subject: Re: Changing Screen Saver in CDE
Message-Id: <862223755.19542@dejanews.com>
Newsgroups: comp.unix.solaris,comp.unix.cde

> I was wondering how you could add your own screen saver under CDE. I
> don't like the ones included. This is the one that comes up when I lock
> the screen. Also, where are they located?

The easiest way to do this is to just tell the front panel to run
something else when you click the lock symbol, switch off the "standard"
screen blank/lock, and then start your own in sessionetc.

Anyway, once you have a screensaver that you want to run instead, you'll
need to add 2 files to ~/.dt/types/, one line to add to
~/.dt/sessions/sessionetc and a change to make to the Style Manager.

The two files are to change the behaviour of the Lock button in the middle
of the front panel.  To change the command run, edit the EXEC_STRING in
the .dt file:

Xlock.dt:

######################################################################
#
#    Common Desktop Environment (CDE)
#
#    Action and DataType Definition File
#
#      Generated by the CreateAction tool
#
#      $Revision: 1.0
#
#      $KEY: 3080
#
######################################################################
#
#    WARNING:
#
#    This file was generated by the CDE CreateAction tool.
#    If this file is modified by some other tool, such as vi,
#    the CreateAction tool will no longer be able to load and
#    update this file.  For this reason, changes to this file
#    should be handled through CreateAction whenever possible.
#
######################################################################

ACTION Xlock
{
     LABEL         Xlock
     TYPE          COMMAND
     EXEC_STRING   xscreensaver-command -lock
     ICON          Dtkey
     WINDOW_TYPE   NO_STDIO
}

----8<----

Lock.fp:

CONTROL Lock
{
  TYPE                  icon
  CONTAINER_NAME        Switch
  CONTAINER_TYPE        SWITCH
  POSITION_HINTS        1
  ICON                  Fplock
  LABEL                 Lock
  PUSH_ACTION           Xlock
  HELP_TOPIC            FPOnItemLock
  HELP_VOLUME           FPanel
}


----8<----

And the line in sessionetc:

xscreensaver -lock -lock-timeout 20 -cycle 2 -timeout 3 -install&

----8<----

And the Style Manager change is obvious - switch off the CDE blank and
lock.

You now have a screensaver and lock program that runs when you log in,
blanks your screen after 3 minutes, locks it after 20, and cycles through
a list of nice graphics every 2.  I've also set the resources on mine to
nicely fade in and out, rather than harsh cuts.  The really brilliant
thing about xscreensaver is that you can plug in *any* screen-filling
graphics program - xscreensaver handles the blanking and locking, and
controls the running of the graphics.  The programs it runs and their
arguements are controlled from the resource file, which comes with it and
needs to be put in /usr/openwin/lib/app-defaults/.

Clicking the "lock" in the front panel puts it straight into lock mode.

Hope that's enough to get you going.
