On 26 January 2011 17:44, Yanni Chiu <[email protected]> wrote: > On 26/01/11 9:27 AM, Igor Stasenko wrote: >> >> UIManager, during image startup, checks if image runs headless, and if >> so, then it switching to non-interactive mode. >> The non-interactive mode means that any request to UI manager which >> normally leads to some user interaction now will trigger an error >> (ErrorNonInteractive). >> If you run image headful again, it will switch to usual UI manager >> back, so don't expect to have this error when running headful image. >> And be careful when testing/writing your code: image will run using >> different ui manager depending on startup conditions. > > This is great work! > > I will test it out shortly, but I'm wondering about the VNC scenario. I run > on a remote Linux server with "-headless". VNC is not started in the image. > If I suspect a problem, then I use the Seaside app at /tools/vnc to start > the VNC server. Then I attach to the image with a VNC client, and proceed to > debug. > > I suspect this scenario will be broken. The problem is that the "-headless" > flag does not mean there is no interactive UI needed. It means that there is > no local display.
Well, the aim of this changes is to offer the default scenario for core images which have nothing like VNC loaded. Sure thing VNC could intrude (see my previous post) and change this in any way it likes it. The point it that we had almost nothing to offer to people who not using VNC until now. > If there is a way the flip the switch, in the running > image, then the /tools/vnc code could flip that switch. > Yes, sure there is the way to flip the switch. The simpest way of doing that is to do following: UIManager default: nil. And of course the discussion about nice API around this stuff is welcome. If you have any better ideas how to make image with VNC server to play nicely with new changes, feel free to present it. For instance, one idea is to have VNC server running , but if there is no connections then use non-interactive UI manager, and only if there user connected then use interactive mode. Also, varoius different hooks /extensions could be made , like providing a choice what to do on unhandled error, i.e. instead of quitting the image, one could send a email and kill the process which raised an error :) > -- > Yanni > -- Best regards, Igor Stasenko AKA sig.
