README 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* $XConsortium: README /main/3 1996/07/15 14:01:10 drk $ */
  2. This directory contains demonstrations of the Dt Screen Saver API
  3. screensaver - Example of a simple screen saver that uses the DT Screen
  4. Saver API and techniques to make that screen saver
  5. available to all desktop users or your own session.
  6. The desktop provides a set of screen savers for use
  7. in desktop sessions. This set of screen savers can
  8. be previewed and selected from the Style Manager Screen
  9. dialog.
  10. Each screen saver is known to the desktop by the screen
  11. saver's action definition. The screen saver's action
  12. definition provides the desktop with a short localizable
  13. title for the screen saver, as well as the command line
  14. and options required to start the screen saver. When the
  15. desktop starts a screen saver, it is started by invoking a
  16. screen saver action.
  17. The set of screen saver actions available to a user's
  18. desktop session is defined by the DTSCREENSAVERLIST
  19. environment variable. The default DTSCREENSAVERLIST
  20. set is defined when you start a desktop session. A
  21. system administrator can change this set by creating
  22. a script in directory /etc/dt/config/$LANG/Xsession.d
  23. that modifies DTSCREENSAVERLIST. A user can do the
  24. same in their $HOME/.dtprofile.
  25. A desktop screen saver is a simple application that
  26. uses the DtSaverGetWindows() API to obtain a list of
  27. windows, and draws on those windows. The desktop handles
  28. the starting and stopping of the screen saver application.
  29. The 'screensaver' application is an example that shows
  30. how the DtSaverGetWindows() API may be used, how the
  31. screen saver action may be defined for 'screensaver' and
  32. how the screen saver can be integrated into the desktop for
  33. all desktop users or an individual desktop user. The screen
  34. saver action is named SampleScreenSaver and is defined in
  35. /usr/dt/examples/dtscreen/dt/appconfig/types/C/screensaver.dt.
  36. Making the screen saver available to all users
  37. ----------------------------------------------
  38. You must be root to make the screen saver available
  39. to all users. This example assumes you are building
  40. 'screensaver' directly in /usr/dt/examples/dtscreen.
  41. 1) Build the 'screensaver' application
  42. make -f Makefile.<platform>
  43. 2) Register the screen saver action with the desktop
  44. dtappintegrate -s /usr/dt/examples/dtscreen
  45. 3) Add the screen saver action to the list of available savers
  46. #create file /etc/dt/config/Xsession.d/myvars containing:
  47. DTSCREENSAVERLIST="SampleScreenSaver $DTSCREENSAVERLIST"
  48. 4) Make the /etc/dt/config/Xsession.d/myvars file executable:
  49. chmod 755 /etc/dt/config/Xsession.d/myvars
  50. The next time a user starts the desktop, the example screen
  51. saver will be available for use.
  52. Making the screen saver to your own desktop session
  53. ---------------------------------------------------
  54. 1) Copy the screen saver example to $HOME/dtscreen
  55. cp -r /usr/dt/examples/dtscreen $HOME/dtscreen
  56. cd $HOME/dtscreen
  57. 2) Build the 'screensaver' application
  58. make -f Makefile.<platform>
  59. 3) Register the screen saver action with the desktop
  60. cp $HOME/dtscreen/dt/appconfig/types/C/screensaver.dt \
  61. $HOME/.dt/types
  62. 4) Change the action EXEC_STRING path
  63. vi $HOME/.dt/types/screensaver.dt
  64. #change the EXEC_STRING to '<home>/dtscreen/screensaver',
  65. #replacing <home> with the value of $HOME
  66. 5) Add the screen saver action to the list of available savers
  67. #edit $HOME/.dtprofile and add:
  68. DTSCREENSAVERLIST="SampleScreenSaver $DTSCREENSAVERLIST"
  69. The next time a user starts the desktop, the example screen
  70. saver will be available for use.