<div>Thanks a lot for taking the time to look into this! I had a chance to play around with the DBus interface (thanks for the intro) and I think this will actually end up being more useful than what I had planned to do with the --dump option, so it works out great.</div><br><div>Best,</div><div>Umair</div><br><div class="gmail_quote_attribution">On Jul 5 2020, at 5:26 pm, Akarsh Simha <akarshsimha@gmail.com> wrote:</div><blockquote><div><div>Hi</div><div><br></div><div><div>The syntax `--dump --filename` is incorrect, it should instead be `--dump <filename>`, e.g.</div><div>kstars --dump /tmp/test.png --width 600 --height 400</div><br></div><div><div>But this doesn't work as expected at all -- it produces an image with no stars, only guide lines are shown or something of that sort. I vote for disabling the `--dump` option and instead providing DBus as the only way to generate a star map as of now. This is unfortunate, but a fully booted up KStars is less buggier than a half-booted up KStars. You can also achieve much more control through DBus than with --dump.</div><br></div><div><div>Example (shell script):</div><div>qdbus org.kde.kstars /KStars org.kde.kstars.lookTowards "M 31" # Point to M 31</div><div>qdbus org.kde.kstars /KStars org.kde.kstars.exportImage /tmp/test.svg 1024 768 false # Write SVG graphic of size 1024x768 without legend</div><br></div><div><div>The syntax of exportImage is exportImage(filename, width, height, includeLegend). The file format is determined from the extension. All arguments except "filename" are optional. You can see this in kstars.h:417</div><br></div><div><div>If you want to control via Python, you can do that too:</div><br><div>dbus = QtDBus.QDBusConnection.sessionBus()                                                                                                                                                        </div><div>kstars_dbus = QtDBus.QDBusInterface(                                                                                                                                                              </div><div>    "org.kde.kstars",                                                                                                                                                                            </div><div>    "/KStars",                                                                                                                                                                                    </div><div>    "org.kde.kstars",                                                                                                                                                                            </div><div>    dbus                                                                                                                                                                                          </div><div>)                                                                                                                                                                                                </div><div>assert kstars_dbus is not None                                                                                                                                                                    </div><div>if not kstars_dbus.isValid():                                                                                                                                                                    </div><div>    raise RuntimeError('Could not connect to KStars DBus interface!')                                                                                                                            </div><div>                                                                                                                                                                                                 </div><div>kstars_dbus.call(                                                                                                                                                                                </div><div>    QtDBus.QDBus.AutoDetect, "<method-name>", argument1, argument2, ...                                                                                                                          </div><div>)                                                                                                                                                                                                </div></div><div><br></div><div><div>A useful way to find out what methods KStars exposes on DBus, is to run on a terminal:</div><br><div>qdbus org.kde.kstars /KStars</div><br></div><div><div>It'll list the signature of all available methods. There are a few other interfaces, but /KStars is the primary one of most value. If you've set it up, qdbus has tab completion which is extremely helpful.</div><br></div><div><div>Other methods of interest are:</div></div><div><div>org.kde.kstars.setRaDecJ2000</div></div><div><div>org.kde.kstars.setApproxFOV</div><br></div><div><div>There is a bug with setRaDecJ2000 and setRaDec when atmospheric corrections are enabled.</div></div><div><br></div><div><div>Regards</div></div><div>Akarsh</div></div></blockquote>