Skip to content

Installing GJS and Running The Examples

This guide is built for running the examples you will encounter in the first half of this guide, for setting up an application development environment go here;

Using The Command Line

Using the command line is possible but can be difficult if your distribution is not running a modern version of GJS by default. Beginning examples may function properly, while more advanced topics fail due to missing features.

Installing GJS

Install GJS from any of the packages below.

  • Ubuntu 18.04
  • Debian Stretch
  • Arch Linux
  • more at pkgs.org

Verifying Your GJS Version

Verify your system has a recent version of GJS. Type...

gjs --version

...into a terminal. If your version is below 1.48.x it is recommended you use GNOME Builder or build GJS from source.

Running A Tutorial

Open a new file and place the code you would like to run in a code viewer of your choosing.

Save the code to a file, file.js.

Run this in terminal:

gjs file.js

The program output will appear in the terminal.

MIT Licensed | GJS, A GNOME Project