×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    6

    Question How can I display and record my phone's screen on a PC display having Linux?

    Hi.
    I do this because I could not find a Linux software that does it.
    My "weak" solution is by continuously taking screen-shots, and saving them on the mobile's memory disk. The following Python code illustrates more:
    Code:
    import appuifw, e32
    import graphics 
    import appswitch
    global running
    running = 1
    def quit():
            appuifw.note(u"Exit key pressed!")
    	running = 0
            app_lock.signal()
    
    def capture(): 
    	#we will capture a screen shot every 1 second.
    	#We will let obexftp dowenload the screenshot from the mobile in a shell script as  "screenshot.jpg"
    	#Geeqie is already set to re-read and re-display "screenshot.jpg" on change.
    	appswitch.switch_to_bg(u"Python")
    	e32.ao_sleep(1)
    	while running==1 :
              try:	
    		print "taking a picture\n"
    		#Take the screenshot 1
    		img1 = graphics.screenshot()
    		#Save it to the specified path E:\\screenshot.jpg (on the memory card)
    		img1.save(u"E:\\screenshot.jpg")
    		e32.ao_sleep(0.5)
    		print "picture taken\n"
                except Exception:
                       print "exception handled"
    
    appuifw.app.menu=[(u"start screen capture",capture)]
    
    appuifw.app.exit_key_handler = quit
    app_lock = e32.Ao_lock()
    app_lock.wait()
    Then I used obexftp to download E:\\screenshot.jpg to my desktop in an infinite loop using shell/bash.
    The following shell code explains:
    Code:
     cd /tmp #on debian linux /tmp is a mount point of a RAM disk. This is where E:\\screenshot.jpg is going to be saved on the desktop.
     while true; 
         do obexftp -u 1 -c 'E:' -g screenshot.jpg  ;  # I am using usb cable to download. Do read obexftp manual: man obexftp.
         sleep 0.1;
     done;
    There is an image viewer called Geeqie. This viewer can re-display and re-read an image if any change happens to its contents.
    And this what I am doing with the downloaded file. Using the /tmp mount point of a RAM disk can speed up the reading and display of E:\\screenshot.jpg
    and saves my hard disk.


    What I noticed is that this idea works. However, it's very slow and primitive, because I am saving the screen-shot on the phone before downloading it.
    So my question is how can I skip this step by directly sending the screen-shot to the desktop? How can I, at least, save the screen-shot on the phone's RAM?

    The aim of all of this is to make tutorial videos in Arabic about pyS60 by recording a video of my desktop and my phone at the same time.
    Here is an example video:
    http://www.4shared.com/file/23497827...art1-conv.html

    Thanks.
    Last edited by ranixlb; 2010-03-14 at 12:35. Reason: removed a bug in the python code. bug: crashes when obexftp downloading and screenshot saving coincides. exception handled.

Similar Threads

  1. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×