sane config files [was [sane-devel] Infrared channel]]

m. allan noah anoah@pfeiffer.edu
Fri, 25 Feb 2005 12:12:49 -0500 (EST)


On Fri, 25 Feb 2005, Johannes Meixner wrote:

>
> Hello,
>
> On Feb 25 09:52 m. allan noah wrote (shortened):
>> i think we want to hide the config file concept from the user
>> if possible, rather than require someone to change the perms.
>
> It is not required to change any permission.
> The default that only root can write to <backend>.conf is
> perfectly o.k. but when root likes, he can change the
> permissions for <backend>.conf so that a group of normal users
> or all normal users get write permission.
>
> Oliver's proposal hides the file concept perfectly from the user
> because the user uses only the frontend.
>

ok, then how does this address the network-based scanner, where the 
backend is loaded by saned, which may be running as root or maybe not?
a user would have to go to the server machine, and login as root and do 
the config. i suppose that is ok, but being able to run the config steps 
from another box would be nice.

>
>> i personally am very much in favor of per-scanner config files
>> anyway, rather than per-backend,
>
> According to Oliver's proposal it is the backend (and as far as I
> understand it is only the backend) which writes into <backend>.conf.
> So each backend can handle its config file(s) as the backend author
> likes:
> One backend may have the configs for several scanners in one
> <backend>.conf and another backend may have <backend>.conf as
> default and <backend>.<model1>.conf, <backend>.<model2>.conf, ...
>

yes, i guess if the front-end is our only means of interaction, and the 
vendors are ok with no longer touching the config files, that might work.

the only problem i see with this is that some backends can do scsi and 
usb, and need that set in the config file, before the backend will find 
the scanner and present it to the front-end for configuration. so you have 
a chicken and egg problem with the most basic config params.

>
>> what if sane provided these config options for every user, and
>> stored them in .sane/ in their homedir.
>
> Please keep the different kind of "configs" seperated:
>
> What I have in mind when I use the word "config" are settings which
> should not be changed by a normal user during daily usage
> but only by the admin during configuration of the scanner.
> I.e. critical settings which must be set correctly because
> otherwise the scanner would not work (e.g. firmware file location)
> or may be damaged (e.g. maximum values of the scan area).
>
> What you are talking about is to store user preferences.
> A normal user likes to store often used sets of various parameters
> under convenient names like "text", "color", "photo", ...
> so that he can easily switch between them.

now you mean to tell me what i am talking about? :) no, i personally dont 
have much problem with users being able to plug scanner into machine and 
make it work without root permissions. and besides, i think some things 
(default binary scanning threshold) may need to be set to a good default, 
but the user should be able to override. the root user's config seems a 
way to do this.

should you not be in bed at this hour? :)

allan

>
>
> Kind Regards
> Johannes Meixner
>

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera