Home » Notes » How to Open Looking Glass in GNOME

How to Open Looking Glass in GNOME

Most browsers come equipped with developer tools that enable the inspection of page elements and execution of JavaScript code live on the page itself. Interestingly, parts of the GNOME desktop environment are also written in JavaScript, including the GNOME Shell and its extensions. Thus, there is a tool that can help to interact with this code. It is called Looking Glass.

Looking Glass can be accessed using the Run Command dialog. Press Alt + F2, type lg, and then hit Enter:

Also, if you want to add a button on panel that will open Looking Glass, you can use this extension. After installing this extension you will see the following button on the left side on top panel:

After opening, you will see the console, which has a few tabs:

  • Emulator - here you can evaluate JavaScript code and inspect JavaScript objects.
  • Windows - displays a list of currently opened windows.
  • Extensions - shows a list of activated extensions.
  • Actors - allows to examine UI elements hierarchy.
  • Flags - allows to configure additional debug features.

For instance, you can view the contents of the global object simply by typing its name and pressing Enter:

This global object is analog of the window object in browser JavaScript. Moreover, you can inspect the parameters using the button with the target icon located in the upper left corner:

This tool allows you to analyze any objects present on the desktop. To close the console, press the Esc key.

Rate the Article

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
Creative Commons License
The article is distributed under Creative Commons ShareAlike 4.0 license. Link to the source is required .

Leave a Comment