Re: [opensuse] Native printing via SSH




----- Original Message ----- From: "Andrew Joakimsen" <joakimsen@xxxxxxxxx>
To: "Brian K. White" <brian@xxxxxxxxx>
Cc: <opensuse@xxxxxxxxxxxx>
Sent: Saturday, September 06, 2008 3:49 PM
Subject: Re: [opensuse] Native printing via SSH


That's precisely what I am trying to figure out. Do you know what the
option would be called? The application writes PCL direct to the LPT
port so if I can figure a way to block tty access (I don't think it
will be an issue the application does nothing else while it prints and
in the Windows environment if the printer is not setup correctly the
app just hangs). I am trying to avoid forwarding ports or using a
VPN... because if each user needs to have their own printer I think
this way (with TTY printing) will be easier to mange on the server
side.

Then you may be lucky.
It appears to be possible to tell dosemu to run a command to print.
In fact it appears to be the default way it prints. (last time I used dosemu was sometime in the late 90's and I seem to remember a completely different style of config and I seem to remember granting dosemu access to /dev/lp0 , not defining a spooler program.
But, it looks simple enough.

Try this,

vi /usr/local/bin/ansiprint

#!/bin/bash
# Print to ansi terminal printer
stty raw </dev/tty
echo -en "\033[5i"
cat "$@"
echo -en "\033[4i"
stty cooked </dev/tty

then
chmod 755 /usr/local/bin/ansiprint


Now put this in /etc/dosemu/dosemu.conf
$_lpt1 = "ansiprint"


The script is used a lot on all my servers so it's heavily tested, but, you still may have some issue with the stty commands.
You can comment them out and the only result will be that print jobs with lots of binary raster graphics data will fail.
For several years I didn't have those lines either and almost a thousand end users did 100% of their buisinesses printing that way, so, even that way is ok.

The dosemu is untested. However, since the other examples are simply "lpr" then I know that dosemu must do one of two things, either it gives a temp file on the command line "lpr filename" or it pipes data into the command. The script works either of those ways so it should work, as long as you are right about the dos app's behaviour. I just did a "zypper in dosemu" and looked at the config file. I haven't actually run anything since I'm on the road at the moment using a centro as an evdo modem.

If it breaks, you get to keep the pieces :)

--
Brian K. White brian@xxxxxxxxx http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] Native printing via SSH
    ... And the application hangs with "Printing to LPT1:" ... It appears to be possible to tell dosemu to run a command to print. ... stty cooked </dev/tty ...
    (SuSE)
  • [SLE] N-up printing in KDE with Cups, OpenOffice, etc (was Re: [SLE] pdf booklet)
    ... > to buy adobe acrobat? ... CUPS N-Up printing, or specifically 4-up printing selected from the ... Click the "Add filter" button - it looks like a funnel. ... Command"), and then click the "Edit Command" button on the "Command edit ...
    (SuSE)
  • RE: Problems Printing After XP Upgrade from 98SE
    ... In addition to not printing, ... all of the jobs from the queue and print a test page from XP, ... > Use the net.exe command to establish a persistent connection. ... > network printer path when the LPT port exists on the computer as a physical ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Get RAW Bitmap Data from a file
    ... Posiflex uses the Epson command set). ... I am using code from this MS Knowledgebase that allows printing RAW ... the Epson command to turn on Define Graphic Download). ... Any other format, even DONTCARE fails with ...
    (microsoft.public.dotnet.languages.vb)
  • Re: scheduled printing of a text file using batch files
    ... this would be a scheduled task question rather than a printing question. ... have never used the schtasks command. ...
    (microsoft.public.windowsxp.print_fax)