I’m looking for a solution which would allow me to move and resize windows (e.g. rdesktop or firefox, etc…) in X. Preferably independent of either GNOME or KDE. The purpose of this is to be able to perform demo, where certain windows would be placed on a laptop’s external monitor, without the obvious mouse cursor movements and resizing.
In good old Motif Windows manager there was the geometry parameter which was honoured by almost all X applications. As I could not find a similar thing for Konsole in KDE 4 >:(, I doubt that todays Windows managers have such a feature.
yeah… however if I’m not mistaken, the -geometry parameter is a one-time affair; it only applies when the application is started. It seems to me, that the solution is related to the window manager’s capability to change a particular window’s size and position. I’m not sure what’s involved, but I don’t think that it should be too hard to achieve. After all every window manager does this when the user resizes or moves the window.
Seems that I can answer my own question… xdotool does exactly what I need. While browsing for information on the Compiz site found this page Plugins/Dbus - Compiz Wiki which lists some nice options to interact with X and the Compiz window manager.
xdotool
xdotool lets you programatically (or manually) simulate keyboard input and
mouse activity, move and resize windows, etc. It does this using X11’s XTEST
extension and other Xlib functions.
Of course -geometry only works at the start of the application. And you did ask for that imho, not for locking the resizing/moving of it after it is opened.