From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Re: Idea: guix printer configuration generation Date: Thu, 17 Jan 2019 14:41:50 +0100 Message-ID: <6f171c4b-d798-bd22-fa9b-1574c78ffcf2@riseup.net> References: <94845DC3-751F-4D99-A0E2-62A3A9BF9CCB@pretty.Easy.privacy> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:60529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gk7pG-0003Xx-8O for guix-devel@gnu.org; Thu, 17 Jan 2019 08:35:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gk7op-0002cH-I8 for guix-devel@gnu.org; Thu, 17 Jan 2019 08:35:18 -0500 Received: from mx1.riseup.net ([198.252.153.129]:39990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gk7op-0002b1-4c for guix-devel@gnu.org; Thu, 17 Jan 2019 08:34:51 -0500 In-Reply-To: Content-Language: en-US List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?G=c3=a1bor_Boskovits?= Cc: guix-devel On 2019-01-17 13:08, G=C3=A1bor Boskovits wrote: > Hello, >=20 > swedebugia ezt =C3=ADrta (id=C5=91pont: 2019. j= an. 17., Cs, 8:22): >> >> "G=C3=A1bor Boskovits" skrev: (16 januari 2019 1= 6:00:30 CET) >>> Hello, >>> >>> ezt =C3=ADrta (id=C5=91pont: 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=20 oiled community that can be reasoned with it really begs to be=20 forked/replaced. In my view it should be split into a few well working interacting=20 programs instead of this one big C program that tries to do everything=20 from backend to converting to-from postscript, (rasterization),=20 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=20 understand what is going on (display progress, errors, cancel job). * guile-wrapper for ghostscript that helps converting pdf documents (if=20 any program wants to print output pdf or ps please) + guile-wrapper to=20 apply filters for a given printer configuration. * backend to communicate with the printer (exposes API) (this could be a=20 patched cups-minimal package). Configuration is done in 1 file that is written by the user or guix when=20 reconfiguring. So to print I could either use the wrapper directly from the command=20 line or use the frontend gui. A cli frontend could easily be created that informs the user about the=20 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=20 server-frontend component developed apart from but interacting via APIs=20 with the other parts. --=20 Cheers Swedebugia