Re: [opensuse] Native printing via SSH
- From: "Brian K. White" <brian@xxxxxxxxx>
- Date: Sat, 6 Sep 2008 19:05:06 -0400
----- 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
- Follow-Ups:
- Re: [opensuse] Native printing via SSH
- From: Andrew Joakimsen
- Re: [opensuse] Native printing via SSH
- References:
- [opensuse] Native printing via SSH
- From: Andrew Joakimsen
- Re: [opensuse] Native printing via SSH
- From: Brian K. White
- Re: [opensuse] Native printing via SSH
- From: Andrew Joakimsen
- [opensuse] Native printing via SSH
- Prev by Date: Re: [opensuse] SLES Gets New Respect from MS
- Next by Date: Re: [opensuse] kde4.1 weather widget
- Previous by thread: Re: [opensuse] Native printing via SSH
- Next by thread: Re: [opensuse] Native printing via SSH
- Index(es):
Relevant Pages
|