/eval-gjs

Evaluate GJS script through DBus

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Eval GJS GNOME Shell Extension

The original extension is great, i just wanted my to use my username on shell scripts, bit selfish, I know.

As of GNOME 41, the dbus method Eval() is now restricted with MetaContext:unsafe-mode property (see this commit). This extension provides unrestricted Eval() dbus method for running arbitrary code in the compositor.

Features

  • Run arbitrary GJS code like you would with GNOME Eval() dbus method.
  • Main, Gio, GLib and Meta available by default.

Installation

git clone git://github.com/cantudo/eval-gjs.git
cd eval-gjs
make install

Example Usage

gdbus call \
  --session \
  --dest org.gnome.Shell \
  --object-path /dev/cantudo/EvalGjs \
  --method dev.cantudo.EvalGjs.Eval "Main.overview.show();"