2a5d216907c2b53231be833cb52ac75131457f91
[xscreensaver] / cde.txt
1 From: moredhel@earthling.net
2 Subject: Re: Changing Screen Saver in CDE
3 Message-Id: <862223755.19542@dejanews.com>
4 Newsgroups: comp.unix.solaris,comp.unix.cde
5
6 > I was wondering how you could add your own screen saver under CDE. I
7 > don't like the ones included. This is the one that comes up when I lock
8 > the screen. Also, where are they located?
9
10 The easiest way to do this is to just tell the front panel to run
11 something else when you click the lock symbol, switch off the "standard"
12 screen blank/lock, and then start your own in sessionetc.
13
14 Anyway, once you have a screensaver that you want to run instead, you'll
15 need to add 2 files to ~/.dt/types/, one line to add to
16 ~/.dt/sessions/sessionetc and a change to make to the Style Manager.
17
18 The two files are to change the behaviour of the Lock button in the middle
19 of the front panel.  To change the command run, edit the EXEC_STRING in
20 the .dt file:
21
22 Xlock.dt:
23
24 ######################################################################
25 #
26 #    Common Desktop Environment (CDE)
27 #
28 #    Action and DataType Definition File
29 #
30 #      Generated by the CreateAction tool
31 #
32 #      $Revision: 1.0
33 #
34 #      $KEY: 3080
35 #
36 ######################################################################
37 #
38 #    WARNING:
39 #
40 #    This file was generated by the CDE CreateAction tool.
41 #    If this file is modified by some other tool, such as vi,
42 #    the CreateAction tool will no longer be able to load and
43 #    update this file.  For this reason, changes to this file
44 #    should be handled through CreateAction whenever possible.
45 #
46 ######################################################################
47
48 ACTION Xlock
49 {
50      LABEL         Xlock
51      TYPE          COMMAND
52      EXEC_STRING   xscreensaver-command -lock
53      ICON          Dtkey
54      WINDOW_TYPE   NO_STDIO
55 }
56
57 ----8<----
58
59 Lock.fp:
60
61 CONTROL Lock
62 {
63   TYPE                  icon
64   CONTAINER_NAME        Switch
65   CONTAINER_TYPE        SWITCH
66   POSITION_HINTS        1
67   ICON                  Fplock
68   LABEL                 Lock
69   PUSH_ACTION           Xlock
70   HELP_TOPIC            FPOnItemLock
71   HELP_VOLUME           FPanel
72 }
73
74
75 ----8<----
76
77 And the line in sessionetc:
78
79 xscreensaver -lock -lock-timeout 20 -cycle 2 -timeout 3 -install&
80
81 ----8<----
82
83 And the Style Manager change is obvious - switch off the CDE blank and
84 lock.
85
86 You now have a screensaver and lock program that runs when you log in,
87 blanks your screen after 3 minutes, locks it after 20, and cycles through
88 a list of nice graphics every 2.  I've also set the resources on mine to
89 nicely fade in and out, rather than harsh cuts.  The really brilliant
90 thing about xscreensaver is that you can plug in *any* screen-filling
91 graphics program - xscreensaver handles the blanking and locking, and
92 controls the running of the graphics.  The programs it runs and their
93 arguements are controlled from the resource file, which comes with it and
94 needs to be put in /usr/openwin/lib/app-defaults/.
95
96 Clicking the "lock" in the front panel puts it straight into lock mode.
97
98 Hope that's enough to get you going.