Ubuntu – How to one invoke lg (Looking Glass) from a command line

11.10gnomejavascript

I had asked another question which is related. I know that I can invoke lg (looking glass) via the gnome-shell "run application" window (by pressing Alt+F2). What I'd like to know is how to do this from a command line?

For example, if I wanted to pop up the looking glass from a shell script, how would I do it?

(my other question)

Best Answer

You can use the following command to launch looking glass from a terminal or keyboard shortcut:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.lookingGlass.toggle();'

When you get in DE, you can't use keyboard shortcut to run "looking glass", you have to use ALT+F2 to run it at first time.