[vbox-dev] Guest os display image from vbox python API?

Grigory Petrov eyeofhell at me.com
Fri Jun 26 02:25:08 PDT 2009

It seems that my test on ubuntu was wrong: it works with some tinkering. It seems that getFramebuffer() method is completely different on ubuntu and windows. On windows, it takes 4 arguments and use 2-nd to return IFrameBuffer object. On Ubuntu, it takes 1 argument and return IFrameBuffer object. So, how to use it on windows?
On Thursday, June 25, 2009, at 08:12AM, "Grigory Petrov" <eyeofhell at me.com> wrote:
>In virtualbox API documentation it is listed that getFramebuffer()  
>takes more than one parameter. I have tried your example code on both  
>windows and ubuntu, beta1 and beta2. It's always 'invalid number of  
>parameters' error. What is a trick to run a code you have suggested?
>Best, Grigory Petrov
>On Jun 23, 2009, at 2:21 PM, Nikolay Igotti <Nikolay.Igotti at Sun.COM>  
>> Hi Grigory,
>> Yes, it is possible, although in somewhat convoluted way, for  
>> example on Linux in vboxshell one can issue following command  
>> (assuming you started guest in not headless mode):
>> vbox> guest nt4sp6 os.system('xwd -id '+str 
>> (console.display.getFramebuffer(0)[0].winId)+'| xwdtopnm | pnmtopng  
>> > /tmp/Screenshot.png')
>> It will take screen of the first display in guest called 'nt4sp6',  
>> although relying upon few external programs
>> for image conversion. Similar approach can be taken on Windows.
>> We're considering implementing more straightforward API in the future.
>> Thanks,
>>   Nikolay
>> Grigory Petrov wrote:
>>> Hello.
>>> Is it possible to use Python API in order to get image of guest os  
>>> display? (complete display or part of display, with or without  
>>> guest additions, it doesn't matter). I can speculate that this can  
>>> be done somehow via getFramebuffer() method, but exact sequence is  
>>> unclear - it's no example available :(.
>>> Best, Grigory
>>> _______________________________________________
>>> vbox-dev mailing list
>>> vbox-dev at virtualbox.org
>>> http://vbox.innotek.de/mailman/listinfo/vbox-dev

More information about the vbox-dev mailing list