X11 Move Window from Command-Line
Occasionally a window is created using some coordinates that are not actually visible. Most often for me this happens when I'm bouncing between machines and am redirecting X11 windows from one to another. A quick solution for moving the window to a new position.
List the windows on the machine:
$ wmctrl -lG
Which will list for every window, the window ID, x coordinate, y coordinate, width, height, hostname, and title.
0x00600003 0 89 361 933 950 macton-computer Slashdot - Google Chrome0x02200006 0 2724 187 816 507 macton-computer macton@macton-computer: ~
Then move the windows into whatever position is on screen using the window ID. For example, to move the Chrome window (which is not visible) to approximately the same coordinates as the terminal window (which is visible.)
$ xdotool windowmove 0x00600003 2724 200
Done.
If you are missing wmctrl, on Ubuntu:
$ sudo apt-get install -y wmctrl
If you are missing xdotool, on Ubuntu:
$ sudo apt-get install xdotool
Comments
Post a Comment