Home » Questions » Computers [ Ask a new question ]

How to make a launch command set focus to an already running app instance in ubuntu / linux?

How to make a launch command set focus to an already running app instance in ubuntu / linux?

I'm using a program called easystroke to invoke commands from mouse gestures - typically to launch an application. 'gnome-terminal', for example. If I already have a gnome-terminal window open, and I invoke the gnome-terminal gesture, I'd like to be setting focus to the already running instance, rather than spawn a new instance, which is of course what happens now. (I am actually more interested in this for my gmail chrome app shortcut, and other larger apps.)

Asked by: Guest | Views: 106
Total answers/comments: 1
Guest [Entry]

xwit "program name" will bring a window to front by name. Anything on Linux that can use an executable can use a #!/bin/sh script with execute priveledges turned on. xwit can also move the mouse pointer, move the window, resize the window, give a list of window names matching a pattern, get a unique windowid for a particular window or close a window... anything you can do to a window you can do through xwit.