Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How Windows client can print on QNX4 Samba server?: (7 Items)
   
How Windows client can print on QNX4 Samba server?  
I try to setup Windows XP Client printing on QNX4 Samba 2.2.12 server. 

Printer is connected to QNX4 PC.

In the smb.conf new section is added: 

[qnx_printer]
printable=yes
path=/tmp
command=cp %s /dev/spool/ps; rm -rf %s
public=yes

Windows file manager is opened with QNX4 IP address and printer Icon is present in a Samba-server folder.

But when I try to setup new network printer through Printer setup master, error message is occure: 

"Unable to connect to the printer.
Wrong printer name or path. Printer lost connection to the server".

How to solve the problem? 
Thanks. 
Re: How Windows client can print on QNX4 Samba server?  
Hi Leonid,

Please post here additional data:

1. How did you connect your printer to the QNX4 machine?

2. How did you configure your printer in the QNX4 (lpd or spooler)?

3. Does the printer print fine directly from the QNX4?

Also add output following commands from the QNX4 machine:

# sin arg 
# ls /dev

Respectfully,
Oleg

5 окт. 2015 г., в 5:37:41, Leonid Khait <community-noreply@qnx.com> написал:

> I try to setup Windows XP Client printing on QNX4 Samba 2.2.12 server. 
> 
> Printer is connected to QNX4 PC.
> 
> In the smb.conf new section is added: 
> 
> [qnx_printer]
> printable=yes
> path=/tmp
> command=cp %s /dev/spool/ps; rm -rf %s
> public=yes
> 
> Windows file manager is opened with QNX4 IP address and printer Icon is present in a Samba-server folder.
> 
> But when I try to setup new network printer through Printer setup master, error message is occure: 
> 
> "Unable to connect to the printer.
> Wrong printer name or path. Printer lost connection to the server".
> 
> How to solve the problem? 
> Thanks. 
> 
> 
> 
> _______________________________________________
> 
> QNX4 Community Support
> http://community.qnx.com/sf/go/post114586
> To cancel your subscription to this discussion, please e-mail qnx4-community-unsubscribe@community.qnx.com

Re: How Windows client can print on QNX4 Samba server?  
Hi!

>1. How did you connect your printer to the QNX4 machine?

The printer is connected to the parallel port of the PC with QNX4 and Samba-server.



>2. How did you configure your printer in the QNX4 (lpd or spooler)?

Printing output is configured by spooler.

>3. Does the printer print fine directly from the QNX4?

Printout working fine directly from QNX4.

>Also add output following commands from the QNX4 machine:

The outputs with that command are attached.

# sin arg 
# ls /dev

Respectfully,
Oleg

5 окт. 2015 г., в 5:37:41, Leonid Khait <community-noreply@qnx.com> написал:

> I try to setup Windows XP Client printing on QNX4 Samba 2.2.12 server. 
> 
> Printer is connected to QNX4 PC.
> 
> In the smb.conf new section is added: 
> 
> [qnx_printer]
> printable=yes
> path=/tmp
> command=cp %s /dev/spool/ps; rm -rf %s
> public=yes
> 
> Windows file manager is opened with QNX4 IP address and printer Icon is present in a Samba-server folder.
> 
> But when I try to setup new network printer through Printer setup master, error message is occure: 
> 
> "Unable to connect to the printer.
> Wrong printer name or path. Printer lost connection to the server".
> 
> How to solve the problem? 
> Thanks. 
> 
> 

Attachment: Text ls_dev.txt 223 bytes Text sin_arg.txt 3.29 KB
Re: How Windows client can print on QNX4 Samba server?  
Hi Leonid,

1. Launch smbd on QNX4 PC using the following smb.conf file:

[printers]
        comment = Print Temporary Spool Configuration
        path = /var/spool/samba
        guest ok = Yes
        printable = Yes
        browseable = No

[qnx_printer]
        path = /tmp
        guest ok = Yes
        printable = Yes
        postscript = Yes
        print command = lp %s
        printer name = 123
        default devmode = Yes


2. On Windows PC follow the next steps:

Start->Printers and faxes->Add printer->next->a network printer ->choose
point ”Connect to a printer or to perform a review printers”->Select
your priter->set it Draiver-> try print the document.

Let me know about your results.

Respectfully,
Oleg

6 окт. 2015 г., в 6:53, Leonid Khait <community-noreply@qnx.com> написал:

> Hi!
> 
>> 1. How did you connect your printer to the QNX4 machine?
> 
> The printer is connected to the parallel port of the PC with QNX4 and Samba-server.
> 
> 
> 
>> 2. How did you configure your printer in the QNX4 (lpd or spooler)?
> 
> Printing output is configured by spooler.
> 
>> 3. Does the printer print fine directly from the QNX4?
> 
> Printout working fine directly from QNX4.
> 
>> Also add output following commands from the QNX4 machine:
> 
> The outputs with that command are attached.
> 
> # sin arg 
> # ls /dev
> 
> Respectfully,
> Oleg
> 
> 5 окт. 2015 г., в 5:37:41, Leonid Khait <community-noreply@qnx.com> написал:
> 
>> I try to setup Windows XP Client printing on QNX4 Samba 2.2.12 server. 
>> 
>> Printer is connected to QNX4 PC.
>> 
>> In the smb.conf new section is added: 
>> 
>> [qnx_printer]
>> printable=yes
>> path=/tmp
>> command=cp %s /dev/spool/ps; rm -rf %s
>> public=yes
>> 
>> Windows file manager is opened with QNX4 IP address and printer Icon is present in a Samba-server folder.
>> 
>> But when I try to setup new network printer through Printer setup master, error message is occure: 
>> 
>> "Unable to connect to the printer.
>> Wrong printer name or path. Printer lost connection to the server".
>> 
>> How to solve the problem? 
>> Thanks. 
>> 
>> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> QNX4 Community Support
> http://community.qnx.com/sf/go/post114593
> To cancel your subscription to this discussion, please e-mail qnx4-community-unsubscribe@community.qnx.com
> <ls_dev.txt><sin_arg.txt>

Re: How Windows client can print on QNX4 Samba server?  
Dear Oleg,

With yours smb.conf configuration Windows 7 and Windows XP remoute network printer install and accept appropriate type 
of driver ( in Windows XP after addition rebooting ).

> 
> [printers]
>         comment = Print Temporary Spool Configuration
>         path = /var/spool/samba
>         guest ok = Yes
>         printable = Yes
>         browseable = No
> 
> [qnx_printer]
>         path = /tmp
>         guest ok = Yes
>         printable = Yes
>         postscript = Yes
>         print command = lp %s
>         printer name = 123
>         default devmode = Yes
> 

On Windows side printing process looking as normal. In the printer spool  print jobs appear,
and then removed at the completion of printing.

On QNX4 samba-server side when printing in /tmp folder trmporary files with names smbprn.*.* created and then removed.

But described in smb.conf

print command = lp% s

not performed.

It is also not carried out wit another option:

print command = echo "print% s to% p" > /tmp/smbprint.log

Although issued manually 

#lp filename

works properly.

How to make the samba-server to execute the command-line configuration of the "print command"?

Thank you.




> 
> 2. On Windows PC follow the next steps:
> 
> Start->Printers and faxes->Add printer->next->a network printer ->choose
> point ”Connect to a printer or to perform a review printers”->Select
> your priter->set it Draiver-> try print the document.
> 
> Let me know about your results.
> 
> Respectfully,
> Oleg
> 
> 6 окт. 2015 г., в 6:53, Leonid Khait <community-noreply@qnx.com> написал:
> 
> > Hi!
> > 
> >> 1. How did you connect your printer to the QNX4 machine?
> > 
> > The printer is connected to the parallel port of the PC with QNX4 and Samba-
> server.
> > 
> > 
> > 
> >> 2. How did you configure your printer in the QNX4 (lpd or spooler)?
> > 
> > Printing output is configured by spooler.
> > 
> >> 3. Does the printer print fine directly from the QNX4?
> > 
> > Printout working fine directly from QNX4.
> > 
> >> Also add output following commands from the QNX4 machine:
> > 
> > The outputs with that command are attached.
> > 
> > # sin arg 
> > # ls /dev
> > 
> > Respectfully,
> > Oleg
> > 
> > 5 окт. 2015 г., в 5:37:41, Leonid Khait <community-noreply@qnx.com> написал:
> > 
> >> I try to setup Windows XP Client printing on QNX4 Samba 2.2.12 server. 
> >> 
> >> Printer is connected to QNX4 PC.
> >> 
> >> In the smb.conf new section is added: 
> >> 
> >> [qnx_printer]
> >> printable=yes
> >> path=/tmp
> >> command=cp %s /dev/spool/ps; rm -rf %s
> >> public=yes
> >> 
> >> Windows file manager is opened with QNX4 IP address and printer Icon is 
> present in a Samba-server folder.
> >> 
> >> But when I try to setup new network printer through Printer setup master, 
> error message is occure: 
> >> 
> >> "Unable to connect to the printer.
> >> Wrong printer name or path. Printer lost connection to the server".
> >> 
> >> How to solve the problem? 
> >> Thanks. 
> >> 
> >> 
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > QNX4 Community Support
> > http://community.qnx.com/sf/go/post114593
> > To cancel your subscription to this discussion, please e-mail qnx4-community
> -unsubscribe@community.qnx.com
> >...
Re: How Windows client can print on QNX4 Samba server?  
If start smbd with DEBUG(3) level

#smbd -d3

it is printing/print_generic.c/print_run_command() additional output in log.smbd:

[2015/10/12 10:09:26, 3] printing/print_generic.c:print_run_command(88)
  Running the command `/bin/echo "print smbprn.000003.030689 on ps" > /tmp/smbprint.log' gave 81

Return value 81 show the problem in  lib/smbrun.c/smbrun():

/* now completely lose our privileges. This is a fairly paranoid
	   way of doing it, but it does work on all systems that I know of */

	become_user_permanently(uid, gid);

	if (getuid() != uid || geteuid() != uid ||
	    getgid() != gid || getegid() != gid) {
		/* we failed to lose our privileges - do not execute
                   the command */
		exit(81); /* we can't print stuff at this stage,
			     instead use exit codes for debugging */
	}

Seems User ID uid и Group ID gid setup problem in  become_user_permanently(uid, gid)

How to solve that? Thank you.



> Dear Oleg,
> 
> With yours smb.conf configuration Windows 7 and Windows XP remoute network 
> printer install and accept appropriate type of driver ( in Windows XP after 
> addition rebooting ).
> 
> > 
> > [printers]
> >         comment = Print Temporary Spool Configuration
> >         path = /var/spool/samba
> >         guest ok = Yes
> >         printable = Yes
> >         browseable = No
> > 
> > [qnx_printer]
> >         path = /tmp
> >         guest ok = Yes
> >         printable = Yes
> >         postscript = Yes
> >         print command = lp %s
> >         printer name = 123
> >         default devmode = Yes
> > 
> 
> On Windows side printing process looking as normal. In the printer spool  
> print jobs appear,
> and then removed at the completion of printing.
> 
> On QNX4 samba-server side when printing in /tmp folder trmporary files with 
> names smbprn.*.* created and then removed.
> 
> But described in smb.conf
> 
> print command = lp% s
> 
> not performed.
> 
> It is also not carried out wit another option:
> 
> print command = echo "print% s to% p" > /tmp/smbprint.log
> 
> Although issued manually 
> 
> #lp filename
> 
> works properly.
> 
> How to make the samba-server to execute the command-line configuration of the 
> "print command"?
> 
> Thank you.
> 
> 
> 
> 
> > 
> > 2. On Windows PC follow the next steps:
> > 
> > Start->Printers and faxes->Add printer->next->a network printer ->choose
> > point ”Connect to a printer or to perform a review printers”->Select
> > your priter->set it Draiver-> try print the document.
> > 
> > Let me know about your results.
> > 
> > Respectfully,
> > Oleg
> > 
> > 6 окт. 2015 г., в 6:53, Leonid Khait <community-noreply@qnx.com> написал:
> > 
> > > Hi!
> > > 
> > >> 1. How did you connect your printer to the QNX4 machine?
> > > 
> > > The printer is connected to the parallel port of the PC with QNX4 and 
> Samba-
> > server.
> > > 
> > > 
> > > 
> > >> 2. How did you configure your printer in the QNX4 (lpd or spooler)?
> > > 
> > > Printing output is configured by spooler.
> > > 
> > >> 3. Does the printer print fine directly from the QNX4?
> > > 
> > > Printout working fine directly from QNX4.
> > > 
> > >> Also add output following commands from the QNX4 machine:
> > > 
> > > The outputs with that command are attached.
> > > 
> > > # sin arg 
> > > # ls /dev
> > > 
> > >...
View Full Message
Re: How Windows client can print on QNX4 Samba server?  
Seems before network printer installation I have to login on Samba-server as root.

Thanks for support.