Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!rti!mozart!sasjfp From: sasjfp@unx.sas.com (Jeffrey L. Phillips) Newsgroups: comp.sys.apollo Subject: Re: invoking the dm editor from inside a Bourne shell Message-ID: <1990Aug24.131611.23303@unx.sas.com> Date: 24 Aug 90 13:16:11 GMT References: <1990Aug16.231437.28459@Neon.Stanford.EDU> <4c41b6e2.20b6d@apollo.HP.COM> Organization: SAS Institute Inc. Lines: 32 In article <4c41b6e2.20b6d@apollo.HP.COM> valante_g@APOLLO.HP.COM writes: >In article <1990Aug16.231437.28459@Neon.Stanford.EDU>, >ammon@Neon.Stanford.EDU (Daniel Ammon) writes: >> >> Is there anyway to get a (Bourne) shell script to bring up a file >> in the dm editor? Right now I am calling vi, but I would also like >> to be able to bring up the editor you get when pressing the EDIT key. > >from the shell, you can execute: > >/com/xdmc ce This is nice, but will not work from any foreign windows, ie. xterms. This will create an error like this: ?(xdmc) Error executing DM command "ce" - stream is not a pad (display manager/Pad manager) One way to get around this (if you use xterms, at least) is to prefix it with /usr/bin/X11/dmwin. This creates a DM window so that an 'xdmc' command can be executed. Here is an example: #!/bin/sh /usr/bin/X11/dmwin /com/sh "xdmc 'ce $1'" You may have to play with the quotes to get it right, but it works in foreign windows like xterms. Enjoy. -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Just because I don't know what it means doesn't mean I'm lying." Jeff Phillips Email: sasjfp@dev.sas.com