Discussion:
[Wine] Writing directly to a lpt1: port and redirect to the lpr command
HugLeo
2015-08-07 03:57:32 UTC
Permalink
I'm have a remote printer installed in the cups. I shared the printer and
it prints OK using the wine notepad.
But I have a old application that prints only if have direct access to a
lpt1 named port.
We can test executing the program wine start.exe and run the command:
echo 'test' > lpt1 that returns:
File not found
I tried to create the rule
[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
"LPT1:"="|lpr"
But echo 'test' > lpt1 still returns File not found
I'm wondering if it's possible to create a LPT1: port and echoing to lpr
Does anyone know if it is possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-users/attachments/20150807/6d5cfe49/attachment.htm
Martin Gregorie
2015-08-07 07:31:39 UTC
Permalink
Post by HugLeo
I'm have a remote printer installed in the cups. I shared the printer and
it prints OK using the wine notepad.
But I have a old application that prints only if have direct access to a
lpt1 named port.
File not found
I tried to create the rule
[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
"LPT1:"="|lpr"
But echo 'test' > lpt1 still returns File not found
I'm wondering if it's possible to create a LPT1: port and echoing to lpr
Does anyone know if it is possible?
No guarantees but you *might* be able to print directly if your PC has
a parallel port and the printer is connected to it. Then, at a minimum,
you'd need to to alias the printer (probably its /dev/lp0) as LPT1: by
adding a symlink ("ln -s /dev/lp0 LPT1:") and change its access
permissions so the user that is running Wine has read and write
permissions for the device file (/dev/lp0 or whatever your PC calls
it.).

IOW that program is expecting to use its own printer driver (or one in
a Windows library) to talk directly to a parallel interface chip that
Windows addresses as LPT1. I've done this successfully for serial ports
but haven't tried it for a printer.


Martin
HugLeo
2015-08-07 14:34:25 UTC
Permalink
I made a bug report (enhancement) :)

https://bugs.winehq.org/show_bug.cgi?id=39056
Post by Martin Gregorie
Post by HugLeo
I'm have a remote printer installed in the cups. I shared the printer and
it prints OK using the wine notepad.
But I have a old application that prints only if have direct access to a
lpt1 named port.
File not found
I tried to create the rule
[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
"LPT1:"="|lpr"
But echo 'test' > lpt1 still returns File not found
I'm wondering if it's possible to create a LPT1: port and echoing to lpr
Does anyone know if it is possible?
No guarantees but you *might* be able to print directly if your PC has
a parallel port and the printer is connected to it. Then, at a minimum,
you'd need to to alias the printer (probably its /dev/lp0) as LPT1: by
adding a symlink ("ln -s /dev/lp0 LPT1:") and change its access
permissions so the user that is running Wine has read and write
permissions for the device file (/dev/lp0 or whatever your PC calls
it.).
IOW that program is expecting to use its own printer driver (or one in
a Windows library) to talk directly to a parallel interface chip that
Windows addresses as LPT1. I've done this successfully for serial ports
but haven't tried it for a printer.
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-users/attachments/201508
Loading...