Advanced Use

From Stellarium Wiki
Jump to: navigation, search
Information is actual for version 0.14.1


Files and Directories

Stellarium has many data files containing such things as star catalogue data, nebula images, button icons, font files and configuration files. When Stellarium looks for a file, it looks in two places. First, it looks in the user directory for the account which is running Stellarium. If the file is not found there, Stellarium looks in the installation directory[1]. Thus it is possible for Stellarium to be installed as an administrative user and yet have a writable configuration file for non-administrative users. Another benefit of this method is on multi-user systems: Stellarium can be installed by the administrator, and different users can maintain their own configuration and other files in their personal user accounts.

In addition to the main search path, Stellarium saves some files in other locations, for example screens shots and recorded scripts.

The locations of the user directory, installation directory, screenshot save directory and script save directory vary according to the operating system and installation options used. The following sections describe the locations for various operating systems.


  • installation directory By default this is C:\Program Files\Stellarium\, although this can be adjusted during the installation process.
  • user directory This is the Stellarium sub-folder in the Application Data folder for the user account which is used to run Stellarium. Depending on the version of Windows and its configuration, this could be any of the following (each of these is tried, if it fails, the next in the list if tried).
Stellarium's installation directory

Thus, on a typical Windows XP system with user “Bob Dobbs”, the user directory will be:

C:\Documents and Settings\Bob Dobbs\Application Data\Stellarium\

Thus, on a typical Windows Vista and Windows 7 systems with user “Bob Dobbs”, the user directory will be:

C:\Users\Bob Dobbs\AppData\Roaming\Stellarium\

Stellarium version 0.9.0 did use the %APPDATA%\Stellarium folder. Thus if a config.ini file exists in the %USERPROFILE%\Stellarium\ directory, that will be used in preference to the %APPDATA%\Stellarium\ directory. This is to prevent users of version 0.9.0 from losing their settings when they upgrade.

  • screenshot save directory Screenshots will be saved to the Desktop, although this can be changed with a command line option (see section Command Line Options[2]).

Mac OS X

  • installation directory This is found inside the application bundle, See the Inside Application Bundles for more information.
  • user directory This is the Library/Preferences/Stellarium/ (or ~/Library/Application Support/Stellarium on newest versions of Mac OS X) sub-directory of the users home directory.
  • screenshot save directory Screenshots are saved to the users Desktop.


  • installation directory This is in the share/stellarium sub-directory of the installation prefix, i.e. usually /usr/share/stellarium or /usr/local/share/stellarium/.
  • user directory This is the .stellarium sub-directory of users home directory, i.e. ~/.stellarium/.
  • screenshot save directory Screenshots are saved to the users home directory.

Directory Structure

Within the installation directory and user directory (defined in section Files and Directories), files are arranged in the following sub-directories.

  • landscapes/ contains data files and textures used for Stellarium's various landscapes. Each landscape has it's own sub-directory. The name of this sub-directory is called the landscape ID, which is used to specify the default landscape in the main configuration file.
  • skycultures/ contains constellations, common star names and constellation artwork for Stellarium's many sky cultures. Each culture has it's own sub-directory in the skycultures directory.
  • nebulae/ contains data and image files for nebula textures. In future Stellarium will be able to support multiple sets of nebula images and switch between them at runtime. This feature is not implemented for version 0.9.1, although the directory structure is in place - each set of nebula textures has it's own sub-directory in the nebulae directory.
  • stars/ contains Stellarium's star catalogues. In future Stellarium will be able to support multiple star catalogues and switch between them at runtime. This feature is not implemented for version 0.10.0, although the directory structure is in place - each star catalogue has it's own sub-directory in the stars directory.
  • data/ contains miscellaneous data files including fonts, solar system data, city locations etc.
  • textures/ contains miscellaneous texture files, such as the graphics for the toolbar buttons, planet texture maps etc.

If any file exists in both the installation directory and user directory, the version in the user directory will be used. Thus it is possible to override settings which are part of the main Stellarium installation by copying the relevant file to the user area and modifying it there.

It is also possible to add new landscapes by creating the relevant files and directories within the user directory, leaving the installation directory unchanged. In this manner different users on a multi-user system can customise Stellarium without affecting the other users.

The Main Configuration File

The main configuration file is read each time Stellarium starts up, and settings such as the observer's location and display preferences are taken from it. Ideally this mechanism should be totally transparent to the user - anything that is configurable should be configured “in” the program GUI. However, at time of writing Stellarium isn't quite complete in this respect, despite improvements in version 0.10.0. Some settings can only be changed by directly editing the configuration file. This section describes some of the settings a user may wish to modify in this way, and how to do it.

If the configuration file does not exist in the user directory when Stellarium is started (e.g. the first time the user starts the program), one will be created with default values for all settings (refer to section Files and Directories for the location of the user directory on your operating system). The name of the configuration file is config.ini[3].

The configuration file is a regular text file, so all you need to edit it is a text editor like Notepad on Windows, Text Edit on the Mac, or nano/vi/gedit etc. on Linux.

The following sub-sections contain details on how to make commonly used modifications to the configuration file. A complete list of configuration file options and values may be found in the appendix, Configuration file.

Command Line Options

Stellarium's behaviour can be modified by providing parameters to the program when it is run, via the command line. See table for a full list:

Option Option Parameter Description Note
--help or -h [none] Print a quick command line help message and exit.
--version or -v [none] Print the program name and version information, and exit.
--config-file or -c config file name Specify the configuration file name. The default value is config.ini.

The parameter can be a full path (which will be used verbatim) or a partial path.

Partial paths will be searched for inside the regular search paths unless they start with a “.”, which may be used to explicitly specify a file in the current directory or similar.

For example, using the option -c my_config.ini would resolve to the file <user directory>/my_config.ini whereas -c ./my_config.ini can be used to explicitly say the file my_config.ini in the current working directory.

--restore-defaults [none] If this option is specified Stellarium will start with the default configuration. Note: The old configuration file will be overwritten.
--user-dir path Specify the user data directory.
--screenshot-dir path Specify the directory to which screenshots will be saved.
--full-screen yes or no Over-rides the full screen setting in the config file.
--home-planet planet Specify observer planet (English name).
--altitude altitude Specify observer altitude in meters.
--longitude longitude Specify latitude, e.g. +53d58'16.65"
--latitude latitude Specify longitude, e.g. -1d4'27.48"
--list-landscapes [none] Print a list of available landscape IDs.
--landscape landscape ID Start using landscape whose ID matches the passed parameter (dir name for landscape).
--sky-date date The initial date in yyyymmdd format.
--sky-time time The initial time in hh:mm:ss format.
--startup-script script name The name of a script to run after the program has started.
--fov angle The initial field of view in degrees.
--projection-type ptype The initial projection type (e.g. perspective).
--dump-opengl-details or -d [none] Dump information about OpenGL support to logfile. Use this is you have graphics problems and want to send a bug report.
--angle-mode or -a [none] Use ANGLE as OpenGL ES2 rendering engine (autodetect driver). On Windows only
--angle-d3d9 or -9 [none] Force use Direct3D 9 for ANGLE OpenGL ES2 rendering engine. On Windows only
--angle-d3d11 [none] Force use Direct3D 11 for ANGLE OpenGL ES2 rendering engine. On Windows only
--angle-warp [none] Force use the Direct3D 11 software rasterizer for ANGLE OpenGL ES2 rendering engine. On Windows only
--mesa-mode or -m [none] Use MESA as software OpenGL rendering engine. On Windows only
--safe-mode or -s [none] Synonymous to --mesa-mode. On Windows only


  • To start Stellarium using the configuration file, configuration_one.ini situated in the user directory (use either of these):
stellarium --config-file=configuration_one.ini
stellarium -c configuration_one.ini
  • To list the available landscapes, and then to start using the landscape with the ID, “ocean”
stellarium --list-landscapes
stellarium --landscape=ocean

Getting Extra Star Data

Stellarium is packaged with over 600 thousand stars in the normal program download, but much larger star catalogues may be downloaded using the tool which is in the Tools tab of the Configuration dialog.


Since version 0.10.2 of Stellarium includes the beginnings of a new scripting engine. The new scripting engine is still in development - there are missing features and probably a lot of bugs.

Running Scripts

To run a script, open the Configuration dialog and go to the Scripts tab. A list of available scripts will be displayed in the list box on the left side. When a script name is selected by clicking on it, details about that script will be shown in the panel on the right side.

To run the selected script, click the run script button (looks like a play button found on a CD or DVD player).

Installing Scripts

To install a script, copy the script and any related files to <User Data Directory>/scripts/

Writing Scripts

Until the new script engine complete, documentation will not be added to the user guide. In the mean time the following resources may be helpful:

  • API Documentation. Scroll down to see the scripting overview with links to the scripting core object member functions.
  • The scripts in the Subversion repository. Many of these do not get installed because they are not so useful proof-of-concept things, but there are quite a few in there which would be helpful for someone trying to learn about the new scripting engine.
  • The stellarium-pubdevel mailing list.

Visual Effects

Light Pollution

Stellarium can simulate light pollution, which is controlled from the light pollution section of the Sky tab of the View window. Light pollution levels are set using an numerical value between 1 and 9 which corresponds to the Bortle Dark Sky Scale.

Level Title Colour Limiting magnitude (eye) Description
1 Excellent dark sky site black 7.6 – 8.0 Zodiacal light, gegenschein, zodiacal band visible; M33 direct vision naked-eye object; Scorpius and Sagittarius regions of the Milky Way cast obvious shadows on the ground; Airglow is readily visible; Jupiter and Venus affect dark adaptation; surroundings basically invisible.
2 Typical truly dark site grey 7.1 – 7.5 Airglow weakly visible near horizon; M33 easily seen with naked eye; highly structured Summer Milky Way; distinctly yellowish zodiacal light bright enough to cast shadows at dusk and dawn; clouds only visible as dark holes; surroundings still only barely visible silhouetted against the sky; many Messier globular clusters still distinct naked-eye objects.
3 Rural sky blue 6.6 – 7.0 Some light pollution evident at the horizon; clouds illuminated near horizon, dark overhead; Milky Way still appears complex; M15, M4, M5, M22 distinct naked-eye objects; M33 easily visible with averted vision; zodiacal light striking in spring and autumn, color still visible; nearer surroundings vaguely visible.
4 Rural/suburban transition green/yellow 6.1 – 6.5 Light pollution domes visible in various directions over the horizon; zodiacal light is still visible, but not even halfway extending to the zenith at dusk or dawn; Milky Way above the horizon still impressive, but lacks most of the finer details; M33 a difficult averted vision object, only visible when higher than 55°; clouds illuminated in the directions of the light sources, but still dark overhead; surroundings clearly visible, even at a distance.
5 Suburban sky orange 5.6 – 6.0 Only hints of zodiacal light are seen on the best nights in autumn and spring; Milky Way is very weak or invisible near the horizon and looks washed out overhead; light sources visible in most, if not all, directions; clouds are noticeably brighter than the sky.
6 Bright suburban sky red 5.1 – 5.5 Zodiacal light is invisible; Milky Way only visible near the zenith; sky within 35° from the horizon glows grayish white; clouds anywhere in the sky appear fairly bright; surroundings easily visible; M33 is impossible to see without at least binoculars, M31 is modestly apparent to the unaided eye.
7 Suburban/urban transition red 5.0 at best Entire sky has a grayish-white hue; strong light sources evident in all directions; Milky Way invisible; M31 and M44 may be glimpsed with the naked eye, but are very indistinct; clouds are brightly lit; even in moderate-sized telescopes the brightest Messier objects are only ghosts of their true selves.
8 City sky white 4.5 at best Sky glows white or orange — you can easily read; M31 and M44 are barely glimpsed by an experienced observer on good nights; even with telescope, only bright Messier objects can be detected; stars forming familiar constellation patterns may be weak or completely invisible.
9 Inner City sky white 4.0 at best Sky is brilliantly lit with many stars forming constellations invisible and many weaker constellations invisible; aside from Pleiades, no Messier object is visible to the naked eye; only objects to provide fairly pleasant views are the Moon, the Planets and a few of the brightest star clusters.

Customising Landscapes

Deep-Sky Objects

Sky Cultures

Sky cultures are defined in the skycultures/ directory which may be found in the installation directory and/or user directory. Inside is one sub-directory per sky culture, each of these containing settings and image files as described in table bottom. Section names should be unique within the ssystem.ini file.

File Purpose
constellation_names.eng.fab This file contains a list of names for each constellation (from the three latter abbreviation of the constellation).
constellationsart.fab This file contains the details of pictorial representations of the constellations. fields are:
  1. Constellation abbreviation
  2. image filename. This will be appended to .../skycultures/<culturename>/. Should include the .png extension. Note - this is case sensitive.
  3. Star 1 x position in image (pixel)
  4. Star 1 y position in image (pixel)
  5. Star 1 HIP catalogue number
  6. Star 2 x position in image (pixel)
  7. Star 2 y position in image (pixel)
  8. Star 2 HIP catalogue number
  9. Star 3 x position in image (pixel)
  10. Star 3 y position in image (pixel)
  11. Star 3 HIP catalogue number
constellationship.fab Describes the lines for the constellations. The fields are:
  1. Constellation abbreviation
  2. Number of lines

After this are pairs of HIP catalogue numbers which the lines are drawn between.

constellations_boundaries.dat This file provides data to drawing the boundaries of the constellations.
info.ini Contains the name for this sky culture as it will appear in the configuration dialog's language Configuration -> Language.
star_names.fab Contains a list of HIP catalogue numbers and common names for those stars. Each line of the file contains one record of two fields, separated by the pipe character (|). The first field is the Hipparcos catalogue number of the star, the second is the common name of the star with enabling translation support, e.g:


planet_names.fab Contains a list of native names of planets. Each line of the file contains one record of 3 fields, separated by the white space or "tab character". The first field is the English name of the planet, the second is the native name of the planet (can be on native language) and the third is native name of the planet (translated on English) with enabling translation support, e.g:

Sun "Day" _("Day")

seasonal_rules.fab Contains seasonal rules for visibility of constellations. One rule per line. Each rule contains three elements with white space (or "tab char") as delimiter in format: constellation ID, start of visibility (month) and end of visibility (month), e.g:

Emu 6 3

Adding Planetary Bodies

Planetary bodies include planets, dwarf planets, moons, comets and asteroids. The orbits and physical characteristics of these bodies are described in the .../data/ssystem.ini file.

The file format follows .ini file conventions. Each section in the file represents the data for one planetary body. Each section has values as described in table.

Name Format Description
name string English name of body, case-sensitive
parent string English name of parent body (the body which this body orbits, e.g. in the case of our Moon, the parent body is Earth)
radius float Radius of body in kilometers
halo boolean If true, the body will have a halo displayed round it when it is bright enough
color r,g,b Colour of object (when rendered as a point). Each of r,g,b is a floating point number between 0 and 1.
tex_map string File name of a PNG or JPEG texture file to be applied to the object. Texture file is searched for in the .../textures directory
tex_halo string File name of a PNG or JPEG texture file to be used as the halo image if the halo option is set to true
tex_big_halo string File name of a PNG or JPEG texture file to be used as the “big halo” image
big_halo_size float The angular size of the big halo texture. Typical values range between 10 and 200.
coord_func string Select the method of calculating the orbit. Possible values are: ell_orbit, comet_orbit, <planet>_special (specific calculations for major bodies).
lighting boolean Turn on or off lighting effects
albedo float Specify the albedo of the body
absolute_magnitude float Absolute magnitude
atmosphere boolean Has body atmosphere?
rot_periode float Specify the rotational period of the body in hours
rot_obliquity float Angle between rotational axis and perpendicular to orbital plane in degrees
rot_equator_ascending_node float Rotational parameter
sidereal_period float Rotational period in days
orbit_Period float Time for one full orbit in days
orbit_SemiMajorAxis float Keplarian orbital element
orbit_Eccentricity float Keplarian orbital element
orbit_Inclination float Keplarian orbital element
orbit_AscendingNode float Keplarian orbital element
orbit_LongOfPericenter float Orbital element used in ell_orbit calculations
orbit_MeanLongitude float Orbital element used in ell_orbit calculations
ascending float Orbital element used in ell_orbit calculations
hidden boolean Display planet as seen from other bodies, or not
orbit_TimeAtPericenter float Object parameter used in comet_orbit calculations
orbit_PericenterDistance float Object parameter used in comet_orbit calculations
orbit_MeanAnomoly float Object parameter used in comet_orbit calculations
orbit_ArgOfPericenter float Object parameter used in comet_orbit calculations
orbit_Epoch float JD epoch for orbit elements
orbit_visualization_period float Orbital period (in Earth's days) of body for visualization their orbits
landscape string default landscape for this body
minor_planet_number integer MPC number of minor planet (used only for asteroids)
rings boolean Has body rings?
rings_outer_size float Outer size of rings
rings_inner_size float Inner size of rings
tex_ring string File name of a PNG or JPEG texture file to be used as the “rings” image
type string Type of body (using for asteroids and comets)

Orbital calculations for the major planets is handled by sophisticated custom algorithms, and are accurate for a comparatively long time. For asteroids and comets the calculations are not as accurate, and the data in ssystem.ini for these bodies should be updated periodically (every year or two).

At present this must be done manually by editing the ssystem.ini file.

An example entry might look like this:

name = Ceres
parent = Sun
radius = 470
oblateness = 0.0
albedo = 0.113
halo = true
color = 1.0,1.0,1.0
tex_halo = star16x16.png
coord_func = comet_orbit
#orbit_TimeAtPericenter = 2453194.01564059
#orbit_PericenterDistance = 2.54413510097202
orbit_Epoch = 2453800.5
orbit_MeanAnomaly = 129.98342
orbit_SemiMajorAxis = 2.7653949
orbit_Eccentricity = 0.0800102
orbit_ArgOfPericenter = 73.23162
orbit_AscendingNode = 80.40970
orbit_Inclination = 10.58687
lighting = true
sidereal_period = 1680.15

Other Configuration Files

In addition to the files discussed in the previous sections, Stellarium uses various other data files. Many of these files may be edited easily to change Stellarium's behaviour[4].

File Purpose
.../data/base_locations.txt Each line is one record which describes a location which will appear on the map in the location dialogwindow!location.

A \# character at the beginning of the record indicates that the record is a comment, and will be ignored by Stellarium. Each record is TAB separated with the following fields:

  1. Location name: province/state
  2. Country: ISO Code/Full English Name
  3. Type code: (C/B=Capital, R=Regional capital, N=Normal city, O=Observatory, L=Lander
  4. Population: in thousands
  5. Latitude: decimal degrees N/S
  6. Longitude: decimal degrees E/W
  7. Altitude: in meters
  8. Light pollution level: 0-9 Bortle scale value
  9. Timezone: emtpy means automatic
  10. Planet: empty means Earth
  11. Landscape ID: the ID for a landscape to be used with thiis location, or empty means “use default”.
.../data/user_locations.txt The same format as base_locations.txt. This file is added to when auser defines a new location, and is usually found in the user data directory area, rather than the installation area.
.../stars/*/name.fab This file defines the Flamsteed designation for a star (see section Flamsteed Designation). Each line of the file contains one record of two fields, separated by the pipe character (|). The first field is the Hipparcos catalogue number of the star, the second is the Flamsteed designation, e.g:


.../data/ Time zone information.

Taking Screenshots

You can save what is on the screen to a file by pressing Control-S. Screenshots are taken in .png format, and have filenames something like this: stellarium-000.png, stellariuim-001.png (the number increments to prevent over-writing existing files).

Stellarium creates screenshots in different directories depending in your system type, see section Files and Directories.


  1. The installation directory was referred to as the config root directory in previous versions of this guide
  2. Windows Vista users who do not run Stellarium with administrator priviliges should adjust the shortcut in the start menu to specify a different directory for screenshots as the Desktop directory is not writable for normal progams. The next release of Stellarium will include a GUI option to specify the screenshot directory.
  3. It is possible to specify a different name for the main configuration file using the --config-file command line option. See section Command Line Options for details.
  4. Not all files in the .../data directory are listed here - only the ones which the advanced user is most likely to want to modify.

{{#if: Configuration | « Configuration |   }} Contents {{#if: Built-in Plugins | Built-in Plugins » |   }}

Personal tools
in this wiki
other languages