[Bug 39056] New: Redirect a device printer port to a print command (lpr)
wine-bugs at winehq.org
wine-bugs at winehq.org
Fri Aug 7 08:43:06 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=39056
Bug ID: 39056
Summary: Redirect a device printer port to a print command
(lpr)
Product: Wine
Version: 1.7.48
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: spooler
Assignee: wine-bugs at winehq.org
Reporter: hugocanalli at gmail.com
Distribution: ---
Sometimes I need to write directly to a print port.
That's because I have a old program that works only with ports named lpt[1-4]
or com[1-4]
I can do it creating a link to my device to the dosdevices folder.
E.g:
ln -s /dev/lp0 ~/wine/dosdevices/lpt1
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/lpt2
Typing commands like echo 'hello' > lpt1 will work great.
There are some cases that my printer is not directly connected to my computer.
By example my Brother DCP-8085DN printer that works over network, a wireless
printer, or same my epson lx300 using lpt1 port but instead is installed on
another computer.
To map this kind of printers I use cups and it work on wine using print dialog
(e.g printing using notepad).
But what about if I need to use my old dos program or would like play around
with wine start.exe program and type commands like echo 'hello' > lpt1
Wine start.exe returns File not found.
Cups doesn't create /dev/xxx devices to printers. So I can't do a link to
dosdevices folder and I have to use the lpr command to print.
One solution is create a file named lpt1 on dosdevices folder and use loop
script in linux cheking for changes and redirect data to lpr.
I can do it easly using the following procedure:
cd ~/.wine/dosdevices
mkfifo lpt1
chmod 666 lpt1
And create a running forever script like:
while true
do
cat ~/.wine/dosdevices/lpt1 | lpr -o raw -P cups_printer_name
done
While this method can work would be great if we could do it only using wine
ways and therefore no need to such script.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list