Ubuntu – Allow mouse events to pass through terminal

command linemousewindow-manager

I work on a laptop with a small screen and I do not have access to multiple monitors on this machine like I do at work. I have set my terminal up with transparency so I can see through to whatever I am developing on the browser behind the terminal but I would love to be able to click through the terminal and interact with the browser directly.

I have not tried anything outside of google searching because I don't have any experience with this type of thing.

EDIT: The "possible duplicate" question doesn't answer my question because it basically just makes a script for doing a quicker alt+tab window switch. I have no problem using alt+tab to switch windows, I would just prefer to not have to switch windows at all. I want my mouse to interact with the browser while my keyboard interacts with the terminal.

Best Answer

Why this is not possible

What you ask, is essentially impossible. To make the explanation simple, there are two types of graphical desktops: stacking and tiling. Unity is an example of stacking desktop, where you have a stack of windows ( kind of like cafeteria tray stack ) , where the currently active window is the top one.

The mouse behavior has been defined in X11 such that clicking on a window brings it to the top of the stack. While there are ways to keep window below others (most notably with wmctrl), there is no way to click through a window without raising it into focus. This is not up to tweaking unfortunately - unless you are willing to create some form of new layer for GUI yourself, and so far I've not heard of any such project.

If you request so, I can even place bounty on this question, but I can bet there will be no answer which satisfies your exact requirements.

Somewhat of a workaround

One can do this: set transparent terminal window to minimum size, set it as "always on top" and click on *anything around the window itself.

enter image description here In this screenshot you can see two approaches to this : one via default right click on window border and via wmctrl command. The last one can allow for scripting approach to this , but the basic premise is the same - you have to click on anything around teminal itself.

Possible alternatives

  • There are drop down terminals such as Guake. You can have a drop down terminal linked to F12 key, with window that retains position on top, and you can click on anything around it
  • Use split screen with terminal and the desired other window linked together

Guake example

enter image description here

Related Question