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

Marco Molteni molter at tin.it
Wed Jan 25 13:06:43 EST 2006

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.

> 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...

He who receives an idea from me, receives instruction himself
without lessening mine; as he who lights his taper at mine,
receives light without darkening me. -- Thomas Jefferson

More information about the openbox mailing list