[openbox] shrinking all the windows when connecting via VNC ?

Mikael Magnusson mangosoft at comhem.se
Wed Jan 25 14:32:46 EST 2006

On Wed, 25 Jan 2006, Marco Molteni wrote:

> On Tue, 24 Jan 2006 17:38:54 +0100 (CET)
> Mikael Magnusson <mangosoft at comhem.se> wrote:
>> On Tue, 24 Jan 2006, Marco Molteni wrote:
>>> I have remotehost with a screen resolution of say 2000x1000, on that
>>> host instead of vncserver I use x11vnc, which allows me to share the
>>> same physical view (like running vncserver on windows), and I
>>> connect to it from localhost, which has a screen resolution of say
>>> 1500x500.
>>> What I do now is to resize by hand the various windows, so to see
>>> them all inside the vncviewer window, which I keep maximized and
>>> undecorated (via devilspie).
>>> Is there a trick to resize all my windows (or the desktop)
>>> automatically, instead of forcing me to do it by hand? wmctrl? Any
>>> hint?
>> You can run xrandr on the big display to set a smaller res, if it
>> supports  the RANDR extension. This usually crashes vnc
>> clients/servers (at least  when i tried it :) but you can always
>> restart them afterwards. vncviewer  for windows supports downscaling
>> the display locally too, but maybe that's  not preferable.
> well I tried the xrandr way, but the existing windows keep their
> size, while I want to resize the windows (in order to be able to
> see them completely in the small display). Your suggestion should
> work fine if I have no windows on the desktop, call xrandr to
> set the big display to the small display resolution, and then start
> opening windows.

Ah, maybe openbox doesn't resize existing windows, just repositions them.

>> You could also hack in some action code that lets you call the
>> callback  that openbox has for randr changes with a custom resolution,
>> it will place  all windows onscreen when that happens. (look in
>> action.c and grep for  RANDR in the source to maybe find the right
>> places/things to call.)
> mhhh, this sounds promising...

This would have the same result as the above, but without actually 
changing the resolution, just moving the windows (and not resizing them).

> marco

Mikael Magnusson

More information about the openbox mailing list