Instructions in this thread are a good place to start.
Use the first method (the others should be equivalent, but this is what i tested).
An important thing: when you test gtk apps, remember that in kindles all windows must follow a particular title convention: read
this (in particular posts #11 and #13)