[FreeNX-kNX] Client-side CUPS printing
Prakash Velayutham
Prakash.Velayutham at cchmc.org
Mon Nov 5 22:16:18 UTC 2007
Hi Alastair,
On Nov 5, 2007, at 3:52 PM, Alastair Johnson wrote:
> On Monday 05 November 2007, Prakash Velayutham wrote:
>> Hello Fabian/Alastair,
>>
>> I have this working now with Linux NX client and FreeNX server
>> flawlessly. I am trying out the Windows client (with smb print
>> sharing).
>>
>> What I see is this. Some how, the .nx/<session_folder>/cups/
>> printers.conf file does not get written with the correct DeviceURI
>> (smb://... ). Instead, it gets written as
>> DeviceURI file://dev/null
>>
>> Is this correct?
>
> No, but it would explain why nothing gets printed! This should be
> written by
> the lpadmin command at the end of cmd_node_addprinter in nxnode and
> should
> match the DEVICE_URI specified. It would be worth finding out what
> parameters
> it is actually using, then running the command manually from within
> a session
> to see if any errors occur, and if it gives the same result.
>
I tried that, and it does not seem to print. The following could be
the reason, but I would like someone else to confirm if it indeed is.
My FreeNX server is in a DMZ location (public IP address). My Windows
NXClient is in a protected network (10.*.*.* Class C network). The
printer that the Windows system prints to is a HP JetDirect printer.
The printer is set to shared from the Windows side.
a) The printer prints fine from Windows.
b) It also prints from another Linux machine in the 10.*.*.* network,
with DEVICE_URI properly set (like smb://username:password@domain/ip/PrinterShareName)
using smbspool (though the printing seemed ugly).
But, for some reason, I cannot get the NX server to print to the port
4000 (userspace cupsd opened), even kprinter freezes when I try to
open. If I try to set DEVICE_URI to "smb://username:password@domain/127.0.0.1:4000/PrinterShareName
" and try smbspool as before, I get
Receiving SMB: Server stopped responding
session request to *SMBSERVER failed (Call returned zero bytes (EOF))
ERROR: Unable to connect to CIFS host, will retry in 60 seconds ...
>> When I start up kprinter, kprinter comes up, but just freezes in this
>> situation. Is there a way that I can manually test the smb printer
>> sharing and then start debugging in detail?
>
> lpinfo should be able to tell you about the configured printer and
> lpr should
> be able to send jobs to it. I don't use either often enough to say
> which
> switches to use. You could also enable browsing in the cups config
> in nxnode,
> then point a browser at it on the port 9000+display to get the
> normal cups
> web interface - this used to work.
>
There is no lpinfo in my system. lpstat -a gives
lpstat: No destinations added.
lpr gives
lpr: Error - No default destination available.
I will need to read up more on how to configure cupsd.conf to do the
browsing part!! For simplicity, I tried to connect to http://localhost:631
on my Linux NXClient, but did not see any of the printers there. Any
idea why? This Linux system connects to a network CUPS server on
another Linux server, FYI.
> Slightly OT: I see we're still modifying KDE_PRINTRC with perl. I
> probably
> forgot to mention this before, but can we use kwriteconfig instead?
> We could
> replace the egreps, echos end perl regexp evaluation with:
> [ "$ENABLE_KDE_CUPS_DYNAMIC" = "1" ] &&
> $COMMAND_KWRITECONFIG --file="$KDE_PRINTRC" --group=CUPS --key=Host
> '"$PATH_BIN/nxcups-gethost"'
> [ "$ENABLE_KDE_CUPS_DYNAMIC" != "1" ] &&
> $COMMAND_KWRITECONFIG --file="$KDE_PRINTRC" --group=CUPS --key=Host
> $NODE_CUPSD_SOCKET
>
I have another question. If there is a single kdeprintrc file (~/.kde/
share/config/kprintrc), how does multiple sessions with different
printer configurations get handled by kprinter?
>>
>> Thanks,
>> Prakash
Prakash
More information about the FreeNX-kNX
mailing list