← 返回命令列表

Linux command

lg 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Open the Looking Glass debugger

> Alt+F2, type "lg", press Enter

Enable Looking Glass on systems where it is hidden

gsettings set org.gnome.shell development-tools true

Re-disable Looking Glass

gsettings set org.gnome.shell development-tools false

Reference the most recent evaluator result inside Looking Glass

> it

Recall an earlier numbered result inside Looking Glass

> r([number])

Slow GNOME Shell animations for debugging

> St.set_slow_down_factor([factor])

说明

Looking Glass is the integrated debugger, inspector, and JavaScript REPL of GNOME Shell. It is opened from inside a running GNOME session by pressing Alt+F2 and entering the keyword lg. It is intended for debugging the shell itself and writing or troubleshooting GNOME Shell extensions. The interface offers four panes. The Evaluator is an interactive JavaScript prompt with full access to the GNOME Shell process, including the St, Clutter, Meta, and GLib APIs. The Windows pane lists open windows. The Extensions pane shows installed shell extensions and links to their source. The Errors pane displays logged errors (in newer releases these are typically routed to journalctl). A picker tool in the top-left lets the user click a UI element on screen to retrieve the corresponding actor in the evaluator for inspection. Press Esc in the evaluator pane to dismiss Looking Glass.

FAQ

What is the lg command used for?

Looking Glass is the integrated debugger, inspector, and JavaScript REPL of GNOME Shell. It is opened from inside a running GNOME session by pressing Alt+F2 and entering the keyword lg. It is intended for debugging the shell itself and writing or troubleshooting GNOME Shell extensions. The interface offers four panes. The Evaluator is an interactive JavaScript prompt with full access to the GNOME Shell process, including the St, Clutter, Meta, and GLib APIs. The Windows pane lists open windows. The Extensions pane shows installed shell extensions and links to their source. The Errors pane displays logged errors (in newer releases these are typically routed to journalctl). A picker tool in the top-left lets the user click a UI element on screen to retrieve the corresponding actor in the evaluator for inspection. Press Esc in the evaluator pane to dismiss Looking Glass.

How do I run a basic lg example?

Run `> Alt+F2, type "lg", press Enter` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more lg examples?

This page includes 6 examples for lg, plus related commands for nearby Linux tasks.