Subject: FVWM: Emacs does not print when started from FVWM-Buttons

From: Andreas Schumann <[email-masked]>
Date: Tue, 13 May 1997 20:46:25 -0400 (EDT)

Hi,

I'm running Redhat LINUX from an Intel Pentium using FVWM2.

When I start Emacs from my button bar

*FvwmButtons (Title "Emacs", Action `Exec emacs &', Icons emacs.xpm)

the print function in Emacs does not work. Normally my environment is set
in /etc/csh.cshrc to (using tcsh)

setenv PRINTER "dj500"

in order to print from a C-Shell or a program started from a C-Shell.
However, this setting is obviously not available for programs started from
the button bar? 

Does anybody know how to solve this problem?

Any help is appreciated!

Andreas Schumann
Department of Mechanical Engineering
Queen's University
Kingston, Ontario, Canada
K7L 3N6
e-mail: [email-masked]

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Tue, 13 May 1997 20:06:23 -0500 (CDT)

>However, this setting is obviously not available for programs started from

Create a shell script to run when you click the button rather than just
running emacs.  Using sh, you could do something such as:

#!/bin/sh
export PRINTER=hp300
/usr/local/bin/emacs -display :0.0
exit

Change the path to emacs, whatever the path to emacs is on your
system, the display you're on, and your PRINTER variable, and you should
be set.
Then replace that entry for the button to run the shell script instead of
emacs.

Cheers,
Scott

>e-mail: [email-masked]

---
Scott Smith, UNIX geek		      | 
				      |  Windows NT -- the real secret behind
[email-masked]		      |  behind what happened at Chernobyl.
http://www.lackluster.net/~holeboy/   |

---

From: Andrew J Cosgriff <[email-masked]>
Date: Wed, 14 May 1997 11:37:39 +1000

"holeboy" == holeboy  <[email-masked]> writes:

holeboy> On Tue, 13 May 1997, Andreas Schumann wrote:
>> in order to print from a C-Shell or a program started from a
>> C-Shell.  However, this setting is obviously not available for
>> programs started from the button bar?
>>

holeboy> Create a shell script to run when you click the button rather
holeboy> than just running emacs.  Using sh, you could do something
holeboy> such as:

holeboy> #!/bin/sh
holeboy> export PRINTER=hp300
holeboy> /usr/local/bin/emacs -display :0.0
holeboy> exit

Alternatively, you could add a

(setenv "PRINTER" "hp300")

to your .emacs

Enjoy,
 Andrew.
-- 
 - Andrew J. Cosgriff -                  [email-masked]    (PGP/MIME ok)
 +61 3 9905 1165 (bh) 9905 4746 (fax)    http://www-personal.monash.edu.au/~ajc
     "It's not the bullet that kills you, it's the hole" (Laurie Anderson)
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (sumeet singh)
Date: Wed, 14 May 1997 10:06:13 +0800 (SGT)

> e-mail: [email-masked]

	Instead of running emacs directly from the button run a
small script to do your environment setting and then to exec emacs.
It would be something like this.

*FvwmButtons (Title "Emacs", Action `Exec em', Icons emacs.xpm)

chmod u+x em

where em is a file like:

#! /bin/csh -f
setenv PRINTER "dj500"
exec emacs

-- 
Sumeet Singh, [email-masked], Institute of Systems Science, N.U.S.,
Singapore - 119597,Ph: 65-772 6728 (o),Fax: 65-7744990 (o).
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].