only reset printer settings, if started on another host.
--- a/host.rc Fri Aug 08 15:11:19 1997 +0200
+++ b/host.rc Fri Aug 08 15:16:42 1997 +0200
@@ -36,90 +36,97 @@
isStupidSYSV3 := true.
].
-"/
-"/ setup the printer stuff.
-"/ the commands below will be offered in the printer-setting box
-"/
-PostscriptPrinterStream notNil ifTrue:[
- isStupidSYSV3 ifTrue:[
- PostscriptPrinterStream
- defaultCommands:#(
- 'lpr'
- 'cat | remsh <hostname> lpr -h'
- 'cat > preview.ps'
- 'cat > preview.ps; ghostview preview.ps'
- ).
- ] ifFalse:[
- PostscriptPrinterStream
- defaultCommands:#(
- 'lpr -h'
- 'cat | rsh <hostname> lpr -h'
- 'cat > preview.ps'
- 'cat > preview.ps; ghostview preview.ps'
- ).
+"/ only reset the printer setting, if restarted
+"/ on another host.
+
+host := OperatingSystem getHostName.
+(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[
+
+ "/
+ "/ setup the printer stuff.
+ "/ the commands below will be offered in the printer-setting box
+ "/
+ PostscriptPrinterStream notNil ifTrue:[
+ isStupidSYSV3 ifTrue:[
+ PostscriptPrinterStream
+ defaultCommands:#(
+ 'lpr'
+ 'cat | remsh <hostname> lpr -h'
+ 'cat > preview.ps'
+ 'cat > preview.ps; ghostview preview.ps'
+ ).
+ ] ifFalse:[
+ PostscriptPrinterStream
+ defaultCommands:#(
+ 'lpr -h'
+ 'cat | rsh <hostname> lpr -h'
+ 'cat > preview.ps'
+ 'cat > preview.ps; ghostview preview.ps'
+ ).
+ ].
+ PostscriptPrinterStream printCommand:'lpr'.
].
- PostscriptPrinterStream printCommand:'lpr'.
-].
-PrinterStream notNil ifTrue:[
- isStupidSYSV3 ifTrue:[
- PrinterStream
- defaultCommands:#(
- 'lpr -h'
- 'cat | remsh <hostname> lpr -h'
- 'a2ps | remsh <hostname> lpr -h'
- 'a2ps > preview.ps; ghostview preview.ps'
- ).
- ] ifFalse:[
- PrinterStream
- defaultCommands:#(
- 'lpr -h'
- 'cat | rsh <hostname> lpr -h'
- 'a2ps | rsh <hostname> lpr -h'
- 'a2ps > preview.ps; ghostview preview.ps'
- ).
+ PrinterStream notNil ifTrue:[
+ isStupidSYSV3 ifTrue:[
+ PrinterStream
+ defaultCommands:#(
+ 'lpr -h'
+ 'cat | remsh <hostname> lpr -h'
+ 'a2ps | remsh <hostname> lpr -h'
+ 'a2ps > preview.ps; ghostview preview.ps'
+ ).
+ ] ifFalse:[
+ PrinterStream
+ defaultCommands:#(
+ 'lpr -h'
+ 'cat | rsh <hostname> lpr -h'
+ 'a2ps | rsh <hostname> lpr -h'
+ 'a2ps > preview.ps; ghostview preview.ps'
+ ).
+ ].
+ Printer := PrinterStream.
+ PrinterStream printCommand:'lpr'.
].
- Printer := PrinterStream.
- PrinterStream printCommand:'lpr'.
-].
-"/ Printer := PostscriptPrinterStream.
+ "/ Printer := PostscriptPrinterStream.
-"/ in our home-domain, preset the print command for remote printing
-"/ on a host called 'ibm'.
-"/ You can change this for your environment and/or make it
-"/ unconditional.
-"/ Consider the stuff below as an example; you should add
-"/ corresponding setup into a private h_xxxx.rc file.
+ "/ in our home-domain, preset the print command for remote printing
+ "/ on a host called 'ibm'.
+ "/ You can change this for your environment and/or make it
+ "/ unconditional.
+ "/ Consider the stuff below as an example; you should add
+ "/ corresponding setup into a private h_xxxx.rc file.
-domain := OperatingSystem getDomainName.
-(domain = 'axept.de' or:[domain = 'exept.de']) ifTrue:[
- isStupidSYSV3 ifTrue:[
- PostscriptPrinterStream printCommand:'cat | remsh ibm lpr -h'.
- PrinterStream printCommand:'cat | remsh ibm lpr -h'.
- PostscriptPrinterStream defaultCommands:#(
- 'cat | remsh ibm lpr -h'
- 'cat > preview.ps'
- 'cat > preview.ps; ghostview preview.ps'
- ).
- PrinterStream defaultCommands:#(
- 'cat | remsh ibm lpr -h'
- 'a2ps | remsh ibm lpr -h'
- 'a2ps > preview.ps; ghostview preview.ps'
- ).
- ] ifFalse:[
- PostscriptPrinterStream printCommand:'cat | rsh ibm lpr -h'.
- PrinterStream printCommand:'cat | rsh ibm lpr -h'.
- PostscriptPrinterStream defaultCommands:#(
- 'cat | rsh ibm lpr -h'
- 'cat > preview.ps'
- 'cat > preview.ps; ghostview preview.ps'
- ).
- PrinterStream defaultCommands:#(
- 'cat | rsh ibm lpr -h'
- 'a2ps | rsh ibm lpr -h'
- 'a2ps > preview.ps; ghostview preview.ps'
- ).
+ domain := OperatingSystem getDomainName.
+ (domain = 'axept.de' or:[domain = 'exept.de']) ifTrue:[
+ isStupidSYSV3 ifTrue:[
+ PostscriptPrinterStream printCommand:'cat | remsh ibm lpr -h'.
+ PrinterStream printCommand:'cat | remsh ibm lpr -h'.
+ PostscriptPrinterStream defaultCommands:#(
+ 'cat | remsh ibm lpr -h'
+ 'cat > preview.ps'
+ 'cat > preview.ps; ghostview preview.ps'
+ ).
+ PrinterStream defaultCommands:#(
+ 'cat | remsh ibm lpr -h'
+ 'a2ps | remsh ibm lpr -h'
+ 'a2ps > preview.ps; ghostview preview.ps'
+ ).
+ ] ifFalse:[
+ PostscriptPrinterStream printCommand:'cat | rsh ibm lpr -h'.
+ PrinterStream printCommand:'cat | rsh ibm lpr -h'.
+ PostscriptPrinterStream defaultCommands:#(
+ 'cat | rsh ibm lpr -h'
+ 'cat > preview.ps'
+ 'cat > preview.ps; ghostview preview.ps'
+ ).
+ PrinterStream defaultCommands:#(
+ 'cat | rsh ibm lpr -h'
+ 'a2ps | rsh ibm lpr -h'
+ 'a2ps > preview.ps; ghostview preview.ps'
+ ).
+ ].
].
].
@@ -127,7 +134,6 @@
"/ try host-specific setup
"/ (h_<hostname>.rc
"/
-host := OperatingSystem getHostName.
host isNil ifTrue:[
'host.rc [warning]: cannot determine host I am running on' errorPrintCR.
] ifFalse:[