running speech-dispatcher as non-root using setuid on XO

James Simmons jim.simmons at walgreens.com
Thu Jul 17 10:29:44 EDT 2008


Hemant,

I have some experience using speech-dispatcher and it seems to me that the XO really doesn't need to run speech-dispatcher any differently than any other computer does (other than getting rid of unnecessary dependencies of course).  My understanding of what you want to do is that you want your contro,l panel to change the default settings in speechd.conf and restart speech-dispatcher so that all Activities that use speech will have these new default values to work with.

To my mind doing this (if I understand you correctly) is like burning down your house to cook a pig.  Speech-dispatcher lets you override pretty much anything in speechd.conf.  Since that is true, isn't the real problem how to give Sugar Activities a way to get these values set up for them using some data store maintained by your control panel?  The data store doesn't have to be speechd.conf.  It could be any file that can be updated by your control panel and read by other Activities.  The Sugar API could have a method that takes the speechd client as a parameter and applies all the system-wide defaults that you are maintaining to it.  After that the Activity could make changes on its own and save the values as meta information or whatever.

So basically in my proposal speech-dispatcher starts up the normal way with whatever default values are set.  Your control panel maintains its own values in a datastore that the Sugar API can read.  Activities use the Sugar API to set speech to these values, or they would use meta information to store their own values and use those values to initialize the SD client.  An Activity *could* just use whatever defaults were in speechd.conf, but that would be considered bad form.

In any case, speechd does not have to run with dangerous permissions and Sugar Activities should get the benefit of your control panel with minimal work.

James Simmons






More information about the Devel mailing list