unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Idea: guix printer configuration generation
@ 2019-01-16 14:35 swedebugia
  2019-01-16 15:00 ` Gábor Boskovits
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2019-01-16 14:35 UTC (permalink / raw)
  To: guix-devel

Hi

I would rather not have to learn the CUPS web interface just to
configure my printer. Do we have a way to do this yet from config.scm? I
think we should abstract away everything CUPS.

Maybe we could make a guix printer importer?

The idea is to extract information about the printer via Guile and print
what the user need to add to the config.scm.

Something like this:
$ guix printer

"Found 1 USB printer: HP DeskJet 4330
(cups-configuration
 (printer
   (name "HP DeskJet 4330"
   (connection "usb://34234556"
   (settings
     (paper "a4"
     (source "default"
     ..."

When the user adds this to their config.scm and reconfigures the printer
JUST WORKS.

Thoughts?

-- 
Cheers 
Swedebugia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Idea: guix printer configuration generation
  2019-01-16 14:35 Idea: guix printer configuration generation swedebugia
@ 2019-01-16 15:00 ` Gábor Boskovits
  2019-01-17  7:22   ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Gábor Boskovits @ 2019-01-16 15:00 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

Hello,

<swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 16., Sze, 15:35):
>
> Hi
>
> I would rather not have to learn the CUPS web interface just to
> configure my printer. Do we have a way to do this yet from config.scm? I
> think we should abstract away everything CUPS.
>
> Maybe we could make a guix printer importer?
>
> The idea is to extract information about the printer via Guile and print
> what the user need to add to the config.scm.
>
> Something like this:
> $ guix printer
>
> "Found 1 USB printer: HP DeskJet 4330
> (cups-configuration
>  (printer
>    (name "HP DeskJet 4330"
>    (connection "usb://34234556"
>    (settings
>      (paper "a4"
>      (source "default"
>      ..."
>
> When the user adds this to their config.scm and reconfigures the printer
> JUST WORKS.
>
> Thoughts?
>
> --
> Cheers
> Swedebugia
>

I've found the CUPS config stuff somewhat problematic.
The config file is generated from another config file, and some other
things, that trigger
regenerating the config. Sometimes even the printer ink level is
regenerating cups configs,
which is really annoying. Modifying files in /etc is not a very nice
way to handle that indeed.
The problem is known upstream, and seems to be won't fix. If we could
get around that in any sane way,
I would be very happy.

Best regards,
g_bor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Idea: guix printer configuration generation
  2019-01-16 15:00 ` Gábor Boskovits
@ 2019-01-17  7:22   ` swedebugia
  2019-01-17 12:08     ` Gábor Boskovits
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2019-01-17  7:22 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: guix-devel


[-- Attachment #1.1: Type: text/html, Size: 2197 bytes --]

[-- Attachment #1.2: Type: text/plain, Size: 1761 bytes --]

"Gábor Boskovits" <boskovits@gmail.com> skrev: (16 januari 2019 16:00:30 CET)
>Hello,
>
><swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 16., Sze, 15:35):
>>
>> Hi
>>
>> I would rather not have to learn the CUPS web interface just to
>> configure my printer. Do we have a way to do this yet from
>config.scm? I
>> think we should abstract away everything CUPS.
>>
>> Maybe we could make a guix printer importer?
>>
>> The idea is to extract information about the printer via Guile and
>print
>> what the user need to add to the config.scm.
>>
>> Something like this:
>> $ guix printer
>>
>> "Found 1 USB printer: HP DeskJet 4330
>> (cups-configuration
>>  (printer
>>    (name "HP DeskJet 4330"
>>    (connection "usb://34234556"
>>    (settings
>>      (paper "a4"
>>      (source "default"
>>      ..."
>>
>> When the user adds this to their config.scm and reconfigures the
>printer
>> JUST WORKS.
>>
>> Thoughts?
>>
>> --
>> Cheers
>> Swedebugia
>>
>
>I've found the CUPS config stuff somewhat problematic.
>The config file is generated from another config file, and some other
>things, that trigger
>regenerating the config. Sometimes even the printer ink level is
>regenerating cups configs,
>which is really annoying. Modifying files in /etc is not a very nice
>way to handle that indeed.
>The problem is known upstream, and seems to be won't fix. If we could
>get around that in any sane way,
>I would be very happy.
>
>Best regards,
>g_bor

I did not understand what you meant. Does the cups server regenerate you printer config automatically? 

I'm surprised nobody forked the CUPS project long ago. Maybe this should be a high priority for GNU?
-- 
Sent from my p≡p for Android.

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 3825 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Idea: guix printer configuration generation
  2019-01-17  7:22   ` swedebugia
@ 2019-01-17 12:08     ` Gábor Boskovits
  2019-01-17 13:41       ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Gábor Boskovits @ 2019-01-17 12:08 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

Hello,

swedebugia <swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 17., Cs, 8:22):
>
> "Gábor Boskovits" <boskovits@gmail.com> skrev: (16 januari 2019 16:00:30 CET)
> >Hello,
> >
> ><swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 16., Sze, 15:35):
> >>
> >> Hi
> >>
> >> I would rather not have to learn the CUPS web interface just to
> >> configure my printer. Do we have a way to do this yet from
> >config.scm? I
> >> think we should abstract away everything CUPS.
> >>
> >> Maybe we could make a guix printer importer?
> >>
> >> The idea is to extract information about the printer via Guile and
> >print
> >> what the user need to add to the config.scm.
> >>
> >> Something like this:
> >> $ guix printer
> >>
> >> "Found 1 USB printer: HP DeskJet 4330
> >> (cups-configuration
> >>  (printer
> >>    (name "HP DeskJet 4330"
> >>    (connection "usb://34234556"
> >>    (settings
> >>      (paper "a4"
> >>      (source "default"
> >>      ..."
> >>
> >> When the user adds this to their config.scm and reconfigures the
> >printer
> >> JUST WORKS.
> >>
> >> Thoughts?
> >>
> >> --
> >> Cheers
> >> Swedebugia
> >>
> >
> >I've found the CUPS config stuff somewhat problematic.
> >The config file is generated from another config file, and some other
> >things, that trigger
> >regenerating the config. Sometimes even the printer ink level is
> >regenerating cups configs,
> >which is really annoying. Modifying files in /etc is not a very nice
> >way to handle that indeed.
> >The problem is known upstream, and seems to be won't fix. If we could
> >get around that in any sane way,
> >I would be very happy.
> >
> >Best regards,
> >g_bor
>
> I did not understand what you meant. Does the cups server regenerate you printer config automatically?
>

Have a look at this upstream issue: https://github.com/apple/cups/issues/3067
It keeps coming up again and again, and stated it won't be fixed again
and again...
The main problem seems to be, that state and config is mixed in the
config files.

> I'm surprised nobody forked the CUPS project long ago. Maybe this should be a high priority for GNU?
> --
> Sent from my p≡p for Android.

Best regards,
g_bor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Idea: guix printer configuration generation
  2019-01-17 12:08     ` Gábor Boskovits
@ 2019-01-17 13:41       ` swedebugia
  0 siblings, 0 replies; 5+ messages in thread
From: swedebugia @ 2019-01-17 13:41 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: guix-devel

On 2019-01-17 13:08, Gábor Boskovits wrote:
> Hello,
> 
> swedebugia <swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 17., Cs, 8:22):
>>
>> "Gábor Boskovits" <boskovits@gmail.com> skrev: (16 januari 2019 16:00:30 CET)
>>> Hello,
>>>
>>> <swedebugia@riseup.net> ezt írta (időpont: 2019. jan. 16., Sze, 15:35):
>>>>
>>>> Hi
>>>>
>>>> I would rather not have to learn the CUPS web interface just to
>>>> configure my printer. Do we have a way to do this yet from
>>> config.scm? I
>>>> think we should abstract away everything CUPS.
>>>>
>>>> Maybe we could make a guix printer importer?
>>>>
>>>> The idea is to extract information about the printer via Guile and
>>> print
>>>> what the user need to add to the config.scm.
>>>>
>>>> Something like this:
>>>> $ guix printer
>>>>
>>>> "Found 1 USB printer: HP DeskJet 4330
>>>> (cups-configuration
>>>>   (printer
>>>>     (name "HP DeskJet 4330"
>>>>     (connection "usb://34234556"
>>>>     (settings
>>>>       (paper "a4"
>>>>       (source "default"
>>>>       ..."
>>>>
>>>> When the user adds this to their config.scm and reconfigures the
>>> printer
>>>> JUST WORKS.
>>>>
>>>> Thoughts?
>>>>
>>>> --
>>>> Cheers
>>>> Swedebugia
>>>>
>>>
>>> I've found the CUPS config stuff somewhat problematic.
>>> The config file is generated from another config file, and some other
>>> things, that trigger
>>> regenerating the config. Sometimes even the printer ink level is
>>> regenerating cups configs,
>>> which is really annoying. Modifying files in /etc is not a very nice
>>> way to handle that indeed.
>>> The problem is known upstream, and seems to be won't fix. If we could
>>> get around that in any sane way,
>>> I would be very happy.

Thanks for the link.

This morning I read parts of the source code for the filters.

I was not impressed.

As this program is essentially the work of one person and not a well 
oiled community that can be reasoned with it really begs to be 
forked/replaced.

In my view it should be split into a few well working interacting 
programs instead of this one big C program that tries to do everything 
from backend to converting to-from postscript, (rasterization), 
filtering, web admin system & printer sharing over the web.

I would be very happy with a tool set like this:
* frontend gui program to orchestrate the whole thing and help the user 
understand what is going on (display progress, errors, cancel job).
* guile-wrapper for ghostscript that helps converting pdf documents (if 
any program wants to print output pdf or ps please) + guile-wrapper to 
apply filters for a given printer configuration.
* backend to communicate with the printer (exposes API) (this could be a 
patched cups-minimal package).

Configuration is done in 1 file that is written by the user or guix when 
reconfiguring.

So to print I could either use the wrapper directly from the command 
line or use the frontend gui.

A cli frontend could easily be created that informs the user about the 
current state of the printer, the queue and maybe history of printed jobs.

If anybody wants to share the printer then this will be another 
server-frontend component developed apart from but interacting via APIs 
with the other parts.

-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-17 13:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 14:35 Idea: guix printer configuration generation swedebugia
2019-01-16 15:00 ` Gábor Boskovits
2019-01-17  7:22   ` swedebugia
2019-01-17 12:08     ` Gábor Boskovits
2019-01-17 13:41       ` swedebugia

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).