Pre-set configuration for Stellarium

Asked by Keith Schacht

(I sent this message directly to Alex Wolf before I discovered that there was a place to post questions like this, sorry about that Alex)

I'm using Stellarium for many science classes (elementary & middle school). I instruct each computer lab administrator to install Stellarium on all the computers (both Mac and Windows) and then I have a guide that teachers take students through to learn how to use the software and learn astronomy.

One challenge is that it takes a teacher about 15 minutes to walk students through the configuration steps each time they launch the software, this is tough when the class periods are only 45 minutes long. Students are setting their current location, turning off star & planet labels, changing the landscape, changing light pollution level--5 or 6 steps like this. It doesn't seem like much, but when you have a bunch of 4th graders someone always gets confused (e.g. instead of pressing Alt+S to turn off labels, they press S and turn off stars) so it takes 15 minutes for the teacher to get all the students ready to begin the lesson.

I am trying to find a way to change the defaults for Stellarium. I know I can configure the INI file, but then it's not easy to get this INI file put in the correct place on every computer in multiple computer labs.

1) Could I create my own installable package of Stellarium with my own settings? I thought it would be as simple as extracting, editing INI, and then compressing as a ZIP but I realize it's more complicated than this. Maybe this would work for the DMG on Mac, but it looks like Windows needs to run an installer.

2) Is there some way I could have Stellarium read the INI settings from a URL? Maybe upon launch it asks for a configuration source that the teacher has each student type in? This would allow me to remotely administer it--and maybe even have different configurations for different activities. Something like this would be ideal.

3) My only other small idea is to eliminate one step: setting the current location. Could Stellarium auto-set the location by geo-locating the IP address of the computer?

I appreciate any advice or suggestions for other ways to solve this.

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
gzotti (georg-zotti) said :
#1

You could just distribute a (zipped?) workspace folder with a custom-made config.ini and all data, landscapes, plugin configs, etc. for lessions etc, and launch Stellarium with a .BAT inside that calls something similar to

"c:\programs (x86)\Stellarium\Stellarium" --user-dir=%~dp0

(path to Stellarium must then be equal on all machines!)

For issue #3, please formulate a blueprint, maybe this can be implemented.

G.

Revision history for this message
Alexander Wolf (alexwolf) said :
#2

Some additions for previous answer.

For Windows you can use exe2msi converter for prepare package for installation via Active Directory. In any case you can edit Stellarium.lnk file and add path to user directory, custom config.ini file, etc. - http://www.stellarium.org/wiki/index.php/Advanced_Use#Command_Line_Options Of course you can create few presets via creating lnk files + user directory can be located on network disk.

For OS X it will be not that easy. Technically you can open Stellarium.app via Finder (open content, not run!), rename executable binary stellarium to stellarium.run (as example), create inside Stellarium.app executable shell script stellarium and call stellarium.run from it with command line options for stellarium.run. I not guarantee that this hack will work correctly.

Possible we should thinking about creating some tool for customizing installable package for universities/colleges/schools/etc.

Revision history for this message
Keith Schacht (krschacht) said :
#3

Thanks guys, this is a good start. What do you think of this as a rough sketch of two blueprints. I could help flesh these out further if you guys think these are good ideas:

(I)
When Stellarium launches, for both Mac and Windows, it currently reads configuration from a local INI file. What if we were to implement a new feature like this:

Upon launch, if Stellarium detects that the Alt (or Option) key is being held (very early in the initialization process) then it displays a modal dialog to the user asking them to input the address of a remote configuration file. This dialog has two options: "Ok" and "Cancel" (the default is Cancel). If the user inputs a URL and clicks Ok then Stellarium downloads the file at the URL provided.

This remote configuration file should be a direct replacement for the local INI file. In fact, Stellarium should even save this downloaded INI and overwrite its old one. This would provide a generalized scheme for remote configuration of Stellarium and this would ensure it only needs to be done once and not every time Stellarium is launched.

Optionally, some basic error checking would be implemented. For example, this file would need to be less than, say, 100kb. Also, this file would be expected to be a text file and some basic checks to ensure this actually looks like a Stellarium INI file by ensuring it has a few of the expected keys. Anything outside of these parameters and Stellarium will just fall back to its local INI file.

This may sound a bit crazy, but this idea of holding Alt is a common scheme on Mac apps to reveal some power user initialization. For example, in iPhoto you can rebuild your database by holding Alt upon launch. Also, it's not important that this feature is discoverable by the average user. This would be something we would just let administrators of Stellarium know about (and have in the wiki, of course).

(II)

Currently, Stellarium defaults to your local computer time upon launch but it does not default to your present location. Instead, it uses the location specified in the init_location section of the INI file. Let's add an additional key to this section:

use_ip_geolocation_if_available = true | false

If this is set to "true", then upon launch, Stellarium attempts to ping a remote web service. Here is an example service (http://www.ipinfodb.com). It costs money for highly accurate location but there is a free version available with city-level location, which is all we need for Stellarium. Here is information on their API: http://www.ipinfodb.com/ip_location_api.php

If Stellarium receives a city response from this web service then it automatically uses this location. If not, it defaults to what the INI file specifies.

Revision history for this message
Alexander Wolf (alexwolf) said :
#4

Please use https://blueprints.launchpad.net/stellarium for blueprints :)

Can you help with this problem?

Provide an answer of your own, or ask Keith Schacht for more information if necessary.

To post a message you must log in.