From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075321606429.tru64-unix-managers.marc@archive.invalid> From: "Richard G. French" Date: Thu, 06 Jul 1995 23:42:54 +0000 To: tru64-unix-managers Subject: SUMMARY: CDE and PostScript Viewer X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075321606429 I asked how to get CDE to work so that you could double-click on a PostScript file icon and have it open a PostScript file. Got two extremely helpful responses from the folks at DEC: ---------- You'll need to modify a small section in /usr/dt/appconfig/types/C/datatypes.dt: from: ACTION Open { LABEL Open ARG_TYPE POSTSCRIPT TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/dt/bin/error.ds \ "Cannot open - No Postscript viewer available." \ "Information" \ "OK" DESCRIPTION Your system does not provide a postscript viewer. \ Attempting to open this file displays an error \ dialog box. } to: ACTION Open { LABEL Open ARG_TYPE POSTSCRIPT TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/bin/X11/dxvdoc -f ps %Arg_1% DESCRIPTION Your system uses dxvdoc, a compound document viewer from Digital. \ You may review the Diagnostic Information via File menu\ for error conditions. } BTW, these changes have been incorporated in the next version of CDE ADK kit. I would be interested in getting your general feedback on this product. Vipul Patel CDE Team ---------------------------------------- And this from Dr. Tom Blinn, stalwart Alpha guru from DEC: Open the Application Manager from the front panel. Open Desktop Applications from the App Manager. Open Create Action from DT Apps. Supply an action name, e.g., dxvdoc. Fill in the command, probably this: /usr/bin/X11/dxvdoc $1 Fill in some help text, like "PostScript file viewer" or the like. You want the window type to be "Terminal (auto-close)", and so it will work if you don't enter a file name, put a prompt in the box for "When Action Opens, Ask Users For:" such as "Enter .ps file" In the Datatypes section, click on "Add..." and file in the stuff to define PostScript files. For instance, include files that match names of *.ps and containing the string "%!PS-Adobe" at the beginning of the file (byte offset 0). Then you'll be able to double-click on a *.ps file and have it start dxvdoc to view the file if the file has the right starting text. ============== I tried this and it worked like a champ. I'm just starting to get the hang of CDE but features like this are really nice. I'm looking forward to the next release when some of the quirks may have stabilized. -Dick French