use unc printernames

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
oger000
Newbie
Newbie
Posts: 2
Joined: Mon Jun 22, 2009 2:22 pm

use unc printernames

Post by oger000 »

Is there a way to use unc printernames in wine like \\server\printer ?
It is for a old application that has no windows-printer-selection-dialog and only accepts lptX and unc notation.

Printing to the cups printer for applications that have a windows-printer-selection-dialog works fine, but I cannot find a way to attac that application to the cups printers.

Thanks
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: use unc printernames

Post by vitamin »

oger000 wrote:Is there a way to use unc printernames in wine like \\server\printer ?
No, Wine has rudimentary support for UNC paths for opening files only. It can not use windows shared printer this way.
oger000 wrote:It is for a old application that has no windows-printer-selection-dialog and only accepts lptX and unc notation.
Try adding this to the registry (2 examples, you can use different command):

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
"LPT1:"="|lpr"
"LPT2:"="|kprinter --stdin"
oger000
Newbie
Newbie
Posts: 2
Joined: Mon Jun 22, 2009 2:22 pm

Re: use unc printernames

Post by oger000 »

vitamin wrote:

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\Printing\Spooler]
"LPT1:"="|lpr"
"LPT2:"="|kprinter --stdin"
No way. I have allready tried, but it will not work.

If using LPTx the application checks itself for the physical existance of the printer, which is not the case. And even if I plug a printer, I am not shure if wine replies the answer that the appplication is needing. (Seams to be a reminding check from beeing a dos-applicaiton before)

I solved it a little strange, but it works (till now):
1) The application can print to file
2) I created a linux-fifo file "mkfifo lptfake"
3) A endless looping script that "watches" the fifo file:
script1:

Code: Select all

while [ 1 ] ; do
  lpr -l -P myprinter < lptfake
done
4) Started this script via nohup into background from a init script

Code: Select all

nohup script1 >> script1.log 2>&1 &

May be this is of use for other applications that have problems with printing and can "print to file" without printer selection dialog.
Locked