This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Simon Dbus Commands

Tags: None
(comma "," separated)
GentooSimon
Registered Member
Posts
22
Karma
0

Simon Dbus Commands

Mon Aug 11, 2014 5:05 pm
Hi,

I would like to control some simon functions with dbus.

Namely: add a .sbm model with dbus so it gets added and initialized as you would do it with the menu, also add a shadow dict and a scenario.

Is this even possible with dbus ?

I looked at the commands but quite frankly there are so many of them and i dont know where to look for what.

So im a bit lost here .....

Thanks for clearing things up a bit.

Manuel
bedahr
Moderator
Posts
141
Karma
0
OS

Re: Simon Dbus Commands

Sun Sep 14, 2014 10:38 am
Hi,

that is not really possible.
What would you want to achieve? There may be better ways to do what you want.

Best regards,
Peter
GentooSimon
Registered Member
Posts
22
Karma
0

Re: Simon Dbus Commands

Sun Sep 14, 2014 11:49 am
Hello Peter,

I started my Linjark Project (https://github.com/ManuGithubSteam/LinJarK) and my goal is to make the install of simon and some of my scenarios as easy as possible.

Till now the user has to add the new sbm and the shadow dict by hand. It would be better if this would be automaticly handled by my install script. So the user can just add some scenarios he wants.

Any Ideas ?

Thanks
bedahr
Moderator
Posts
141
Karma
0
OS

Re: Simon Dbus Commands

Mon Sep 15, 2014 8:35 am
Hi,

so the current development version actually has a mechanism (DBus call) to request the installation of a scenario from 3rd party software. But there is no way to set up a shadow dictionary (because ... why would an end user need that?) or base model (because that's really pronunciation specific and should imho be selected by the user).

If you want to develop a very specific, integrated solution, it's probably easiest (if a little bit hackish) to deploy a user data directory of Simond with your application. You probably know that Simond is the server that Simon connects to. Simond supports multiple users (the default account is just setup by default to facilitate straight forward single-user systems). You can deploy a "LinJarK" user by packaging a folder from .kde/share/apps/simond/models (call it the username you want) and re-installing it with your application. Then just add the user (with a SHA1 hashed password) to the .kde4/share/apps/simond/simond.db SQLite database and ask the user if you want to reconfigure his local Simon installation to use that user to connect. This would work but is bad in several ways: 1. It means that the user loses his current Simon setup in favor of the LinJarK one. This is most probably fine, but not really nice. 2. If the user already has a setup, you will need to mark your deployment as newer as the one of the user, otherwise the client will "update" (overwrite) it during synchronization. 3. It assumes that Simond won't change it's data structure which I can't guarantee.

Alternatively, you can of course also just overwrite the user's base model and shadow dictionary by strategically modifying some of Simon's data files. Oviously, that's even more hackish.

The "clean" way to do this, imho, is to not do it. I think that the basic language selection (base model, language profile, shadow dictionary) should be done on a use-case independent basis. Ideally, Simon would ask the user if he wants a "recommended" setup for language <user's system language> and then download everything automatically. We started working on that a while back as part of Season of KDE but we ran out of manpower. Would you be able to help?

Best regards,
Peter


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]