printerNN.dt.src 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. XCOMM ######################################################################
  2. XCOMM
  3. XCOMM printerNN.dt
  4. XCOMM
  5. XCOMM Template file for configuring printers in the printer sub-panel.
  6. XCOMM
  7. XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
  8. XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
  9. XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  10. XCOMM (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary
  11. XCOMM of Novell, Inc.
  12. XCOMM
  13. XCOMM $XConsortium: printerNN.dt.src /main/4 1996/04/23 17:36:17 drk $
  14. XCOMM
  15. XCOMM #####################################################################
  16. XCOMM ##############################
  17. XCOMM
  18. XCOMM To configure a printer in the DT printer slide-up:
  19. XCOMM
  20. XCOMM 1. Identify which printer icon in the slide-up panel should be
  21. XCOMM associated with the printer. Icons are numbered from the
  22. XCOMM top beginning with 01. (E.g 01 is the top icon, 02 is the
  23. XCOMM next, etc.)
  24. XCOMM
  25. XCOMM 2. Copy this file to CDE_INSTALLATION_TOP/examples/types/printer<NN>.dt
  26. XCOMM where <NN> is replaced by the number of the icon. For
  27. XCOMM example, copy it to CDE_INSTALLATION_TOP/examples/types/printer01.dt to
  28. XCOMM configure the top printer.
  29. XCOMM
  30. XCOMM 3. Edit the "set PRINTER_NUMBER=nn" line below and replace
  31. XCOMM "nn" with the number of the printer icon. For example,
  32. XCOMM change it to "set PRINTER_NUMBER=01" for the top printer
  33. XCOMM icon.
  34. XCOMM
  35. XCOMM 4. Edit the "set PRINTER_NAME=name" line below and replace
  36. XCOMM "name" with the device name assigned to the printer in step
  37. XCOMM 1.
  38. XCOMM
  39. XCOMM 5. Invoke the ReloadApps action from the System_Admin
  40. XCOMM container of the General toolbox.
  41. XCOMM
  42. XCOMM ###############################
  43. set PRINTER_NUMBER=nn
  44. set PRINTER_NAME=name
  45. ACTION Print${PRINTER_NUMBER}
  46. {
  47. ARG_TYPE *
  48. TYPE COMMAND
  49. WINDOW_TYPE NO_STDIO
  50. EXEC_STRING lp -d${PRINTER_NAME} %(File)Args%
  51. }
  52. ACTION PrinterInfo${PRINTER_NUMBER}
  53. {
  54. TYPE COMMAND
  55. WINDOW_TYPE OUTPUT_ONLY
  56. EXEC_STRING \
  57. sh -c ' \
  58. (echo %|nls-8001-#"Printer#|; \
  59. lpstat -r -p${PRINTER_NAME}) | \${PAGER:-more}; \
  60. echo %|nls-8002-#Select#|'
  61. }