Is STR #906 (cupsrc server:port) working?

Michael Sweet mike at easysw.com
Tue Aug 29 08:33:02 PDT 2006


karl runge wrote:
> ...
> Using a ~/.cupsrc and ~/.cups/client.conf with
> "ServerName localhost:6631"
> and an ssh tunnel redirecting it to my local cups server one would
> expect this to talk to my local cups server directly:
> 
> 	lpstat -p -d

Yes, that and all of the following examples you provide *should* work.

 > ...
> I find none of these apps: gedit, openoffice, firefox use the server:port
> listed in ~/.cupsrc correctly.  They just use the cups server running on
> their machine.  However, if I manually restart these apps on the command
> line and supply IPP_PORT=6631 they do use the ssh tunnel to the cups
> server correctly.
> 
> Looking at cupsServer() in ./cups/usersys.c I wonder if this:
> 
>  /*
>   * First see if we have already set the server name...
>   */
> 
>   if (!cg->server[0])
>   {
>       --- CUPS_SERVER and .cupsrc server:port processing down here ---
>       ...
>   }
> 
> is the problem.  That is, the codepath that many apps induce cause
> cg->server to be set somehow, and so when the time comes we don't get
> the server:port processing we want?

cg->server will be set by a call to cupsSetServer() or a previous
call to cupsServer() (to get the server name).

I did some quick testing on my FC5 laptop running the standard CUPS
software and "lpstat -h localhost:8631 -p" reported the correct list
of printers for that particular (test) server.  However, putting the
ServerName in ~/.cups/client.conf or ~/.clientrc did not work for
some reason...

Can you file a new bug report on this at:

     http://www.cups.org/str.php

Thanks!

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups-devel mailing list