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. You can view a list of supported GJS features by version here.

Installing GJS

Install GJS from any of the packages below.

Verifying Your GJS Version

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

gjs --version

...into a terminal. You can see the features your version of GTK supports here. If your version is below 1.48.x it is recommended you use GNOME Builderopen in new window 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.

Last Updated: 3/28/2022, 6:57:58 PM
Contributors: Evan Welsh, Sonny Piers, Veena Nagar, aditi-1400