Mailing List Archive

Negotiating server screen size
Hi,
Is it possible for the client to negotiate server screen size?

Of course, while connecting to a running server there may be nothing to
negotiate...
However, while connecting to a pending server (e.g. in inetd mode), it
could be pleasent for the client to choose the screen size, isn't it?

How to do that?

Regards




_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
Christophe Lohr wrote:
> Hi,
> Is it possible for the client to negotiate server screen size?
>
Yep, but keep in mind that the terms client and server might have a
different location than you think. And then, it might even not. To avoid
problems with the terms, its better to use the terms viewer and service.

> Of course, while connecting to a running server there may be nothing to
> negotiate...
>
Some current display systems can change the resolution on the fly hence,
something might be possible here. For example msWindows remote desktop
pointing to a remote XP system can change the resolution on the fly.
> However, while connecting to a pending server (e.g. in inetd mode), it
> could be pleasent for the client to choose the screen size, isn't it?
>

If you are speaking of a inetd implementation of vnc, there it is
possible to pick the resolution (and colordepth) since ages. The first
configuration of vnc in combination with inetd I have seen (over 10
years ago) already provided this choice. There it was the portnumber
that set the resolution and colordepth. By head it was (roughly) as follows:

The inetd configuration has a line to start Xvnc for the next combinations:
port 5950 starts xvnc with 640x480, 8 bits color
port 5951 starts xvnc with 640x480, 16 bits color
port 5952 starts xvnc with 640x480, 24 (or 32?) bits color
port 5960, xvnc 800x600, 8 bits
port 5961, xvnc 800x600, 16 bits
port 5962, xvnc 800x600, 24 bits

Or use the next scheme
8 bits:
5950 640x480
5951 800x600
5952 1024x768
5953 1200x1024
16bits:
5960 640x480
5961 800x600
5962 1024x768
5963 1200x1024
24/32 bits:
5970 640x480
5971 800x600
5972 1024x768
5973 1200x1024


In the end, using the 59xx series let you use vncviewer with both
display numbers (50, 51, 52...) and portnumbers.


CBee

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
Le lundi 14 septembre 2009 à 15:01 +0200, Corne Beerse a écrit :
> To avoid problems with the terms, its better to use the terms viewer and service.

> Some current display systems can change the resolution on the fly hence,
> something might be possible here. For example msWindows remote desktop
> pointing to a remote XP system can change the resolution on the fly.

Who descides to change the resolution? the service or the viewer?
Is it feasable with vnc system?

I use remote desktop to connect to an XP server. The "rdesktop" viewer
has a "geometry" option. I use an exotic one: 1278x945 (equals to the
size of my display minus borders of the window minus the size of buttons
bars)...

I'd like to have such functionnality while using a VNC viewer to connect
to an Unix system.


> If you are speaking of a inetd implementation of vnc, there it is
> possible to pick the resolution (and colordepth) since ages. The first
> configuration of vnc in combination with inetd I have seen (over 10
> years ago) already provided this choice. There it was the portnumber
> that set the resolution and colordepth. By head it was (roughly) as follows:
>
> The inetd configuration has a line to start Xvnc for the next combinations:
> port 5950 starts xvnc with 640x480, 8 bits color
> port 5951 starts xvnc with 640x480, 16 bits color
> port 5952 starts xvnc with 640x480, 24 (or 32?) bits color
(..)

Well... such workaround implies (1) the administrator of the vnc service
to be kind enough to collect wish of "viewer" users (no troll please,
just real live ;-) ), (2) the "viewer" users to know the configuration
chosen or to scan port to discover it, and (3) to open several ports for
the VNC service on the NAT/firwall.

So, I wonder if a protocol extension could be interesting. Isn't it?

Regards,
Christophe.





_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
Den 2009-09-14 21:37 skrev Christophe Lohr:
> So, I wonder if a protocol extension could be interesting. Isn't it?

Look here:
http://www.tigervnc.org/cgi-bin/rfbproto

And search for ExtendedDesktopSize. I don't know what implementations
support that extension though...

Cheers,
Peter

_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
On Tue, 15 Sep 2009 08:40:29 +0200
Peter Rosin <peda@lysator.liu.se> wrote:

> Den 2009-09-14 21:37 skrev Christophe Lohr:
> > So, I wonder if a protocol extension could be interesting. Isn't it?
>
> Look here:
> http://www.tigervnc.org/cgi-bin/rfbproto
>
> And search for ExtendedDesktopSize. I don't know what implementations
> support that extension though...
>

TigerVNC 1.0.0 does, but I haven't seen anyone else mentioning it yet.

Rgds
--
Pierre Ossman OpenSource-based Thin Client Technology
System Developer Telephone: +46-13-21 46 00
Cendio AB Web: http://www.cendio.com
Re: Negotiating server screen size [ In reply to ]
Pierre Ossman a écrit :
> On Tue, 15 Sep 2009 08:40:29 +0200
> Peter Rosin <peda@lysator.liu.se> wrote:
>
>
>> Den 2009-09-14 21:37 skrev Christophe Lohr:
>>
>>> So, I wonder if a protocol extension could be interesting. Isn't it?
>>>
>> Look here:
>> http://www.tigervnc.org/cgi-bin/rfbproto
>>
>> And search for ExtendedDesktopSize. I don't know what implementations
>> support that extension though...
>>
>>
>
> TigerVNC 1.0.0 does, but I haven't seen anyone else mentioning it yet.
>

Excellent, it works!

However, this feature is about resizing screen of an existing session.
It may have some funny effects:
- let's start Xvnc on an big screen:
$ ./Xvnc :2 -geometry 1600x1024 -once -SecurityTypes none -query
localhost -once

- then start vncviewer requesting a small screen:
$ ./vncviewer DesktopSize=640x480 localhost:2

One can only see the top left corner of the xdm login window which is at
the center of the 1600x1024 screen...
Do windows receive any XWindow event to be warned that the screen size
has changed?


Another strange point is that the DesktopSize should belong to a short
list of standards screens sizes... As far as I understand source code,
it is in relation to xrandr !?


Regards


_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
On Wed, 16 Sep 2009 17:18:11 +0200
Christophe Lohr <christophe.lohr@cegetel.net> wrote:

>
> Excellent, it works!
>
> However, this feature is about resizing screen of an existing session.
> It may have some funny effects:
> - let's start Xvnc on an big screen:
> $ ./Xvnc :2 -geometry 1600x1024 -once -SecurityTypes none -query
> localhost -once
>
> - then start vncviewer requesting a small screen:
> $ ./vncviewer DesktopSize=640x480 localhost:2
>
> One can only see the top left corner of the xdm login window which is at
> the center of the 1600x1024 screen...
> Do windows receive any XWindow event to be warned that the screen size
> has changed?
>

They can listen for a RandR specific notification that the screen has
changed, yes. If you try a modern desktop environment you'll notice
that it resizes when the screen changes (you can even control the
session size with the desktop screen configuration tools).

>
> Another strange point is that the DesktopSize should belong to a short
> list of standards screens sizes... As far as I understand source code,
> it is in relation to xrandr !?
>

You can select any resolution you want on the vncviewer command line.
The reason you see a finite set with the xrandr tool is because of the
way RandR works. What you see is a default list, but more resolutions
can be added.

Rgds
--
Pierre Ossman OpenSource-based Thin Client Technology
System Developer Telephone: +46-13-21 46 00
Cendio AB Web: http://www.cendio.com
Re: Negotiating server screen size [ In reply to ]
Pierre Ossman a écrit :
> You can select any resolution you want on the vncviewer command line.
>
Yes, one can gives any resolution to the DesktopSize option of the Tiger
vncviewer, however only requests of standard resolutions are honored.
Otherwise the screen is not resized.


> The reason you see a finite set with the xrandr tool is because of the
> way RandR works. What you see is a default list, but more resolutions
> can be added.
>
Within the Tiger Xvnc server, the xrandr command gives nothing... no
resolutions at all.

Regards.





_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
Re: Negotiating server screen size [ In reply to ]
On Wed, 16 Sep 2009 18:10:23 +0200
Christophe Lohr <christophe.lohr@cegetel.net> wrote:

> Pierre Ossman a écrit :
> > You can select any resolution you want on the vncviewer command line.
> >
> Yes, one can gives any resolution to the DesktopSize option of the Tiger
> vncviewer, however only requests of standard resolutions are honored.
> Otherwise the screen is not resized.
>

Something must be wrong with your build in that case. I've been
actively using it with all kinds of odd sizes.

> > The reason you see a finite set with the xrandr tool is because of the
> > way RandR works. What you see is a default list, but more resolutions
> > can be added.
> >
> Within the Tiger Xvnc server, the xrandr command gives nothing... no
> resolutions at all.
>

Same thing here.

What version of TigerVNC are you using? And where did you get the build
from?

Rgds
--
Pierre Ossman OpenSource-based Thin Client Technology
System Developer Telephone: +46-13-21 46 00
Cendio AB Web: http://www.cendio.com