Programmatically change display size in Pharo 8 / 9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Programmatically change display size in Pharo 8 / 9

Max Leske

Hi all,

I'm trying to change the size of the display programmatically but am having some trouble. It used to be possible to do Display setExtent: 50@50 depth: 16 and that would take care of everything. I can still do that but 1. the renderer reverts the changes immediately and 2. if I prevent the renderer from reverting the changes the rendering is broken (which I can understand).

So: how am I supposed to change the display size? Note: this is for the remote frame buffer in headless mode, so technically there's no OS window. Still the VM returns a fixed size of something close to 900x700.

I can live with the fixed size if I have to but I'd rather be able to change the size (and also the bit depth as I don't need 32 bits for VNC).

Cheers,
Max


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Programmatically change display size in Pharo 8 / 9

Sven Van Caekenberghe-2
Hi Max,

Not an answer, but do you really need VNC to deploy on a server ?

This is often unreliably and a bit overkill, it is also alien to the rest of the server world.

Provided you can build your project automatically from a single Metacello invocation, you can build server side, command line as well.

I use a simple command line REPL for those harder problems that require interacting with the image.

  https://github.com/svenvc/NeoConsole

You can type arbitrary expressions, look at code and even patch a method. Yes, it is all primitive, but it can make a night and day difference if you don't understand what is happening in real time.

I have never felt a need to use VNC for a full interactive IDE on a server.

But maybe you have other reasons to go in that direction.

Sven

> On 24 Apr 2020, at 10:51, Max Leske <[hidden email]> wrote:
>
> Hi all,
>
> I'm trying to change the size of the display programmatically but am having some trouble. It used to be possible to do Display setExtent: 50@50 depth: 16 and that would take care of everything. I can still do that but 1. the renderer reverts the changes immediately and 2. if I prevent the renderer from reverting the changes the rendering is broken (which I can understand).
>
> So: how am I supposed to change the display size? Note: this is for the remote frame buffer in headless mode, so technically there's no OS window. Still the VM returns a fixed size of something close to 900x700.
>
> I can live with the fixed size if I have to but I'd rather be able to change the size (and also the bit depth as I don't need 32 bits for VNC).
>
> Cheers,
> Max
>


Reply | Threaded
Open this post in threaded view
|

Re: Programmatically change display size in Pharo 8 / 9

Max Leske
Hi Sven,


On 24 Apr 2020, at 11:08, Sven Van Caekenberghe wrote:

> Hi Max,
>
> Not an answer, but do you really need VNC to deploy on a server ?

It's certainly debatable. We're used to having it, that's the main reason.

>
> This is often unreliably and a bit overkill, it is also alien to the rest of the server world.
>
> Provided you can build your project automatically from a single Metacello invocation, you can build server side, command line as well.

We do have something similar and in most cases that's enough.

>
> I use a simple command line REPL for those harder problems that require interacting with the image.
>
>   https://github.com/svenvc/NeoConsole
>
> You can type arbitrary expressions, look at code and even patch a method. Yes, it is all primitive, but it can make a night and day difference if you don't understand what is happening in real time.

Looks cool! I might give that a whirl. While our solution does work it has some rather annoying drawbacks. Actually, having a better way to interact via terminal would make VNC access even less important.

>
> I have never felt a need to use VNC for a full interactive IDE on a server.
>
> But maybe you have other reasons to go in that direction.
>
> Sven


Thanks for you thoughts.


Cheers,
Max

>
>> On 24 Apr 2020, at 10:51, Max Leske <[hidden email]> wrote:
>>
>> Hi all,
>>
>> I'm trying to change the size of the display programmatically but am having some trouble. It used to be possible to do Display setExtent: 50@50 depth: 16 and that would take care of everything. I can still do that but 1. the renderer reverts the changes immediately and 2. if I prevent the renderer from reverting the changes the rendering is broken (which I can understand).
>>
>> So: how am I supposed to change the display size? Note: this is for the remote frame buffer in headless mode, so technically there's no OS window. Still the VM returns a fixed size of something close to 900x700.
>>
>> I can live with the fixed size if I have to but I'd rather be able to change the size (and also the bit depth as I don't need 32 bits for VNC).
>>
>> Cheers,
>> Max
>>

signature.asc (849 bytes) Download Attachment