Development Team/Jhbuild: Difference between revisions

Other commands: fix subsections
Configure the mode and resolution of Sugar: fullscreen isn't hardcoded anymore
Line 67: Line 67:
== Configure the mode and resolution of Sugar ==
== Configure the mode and resolution of Sugar ==


You can make Sugar run in a window as well as specify a resolution. Within the sugar-jhbuild/install/share/sugar/shell directory, backup, then edit the python program file '''emulator.py''':
You can make Sugar run fullscreen or specify a size (in pixels):


  cd sugar-jhbuild
  ./sugar-jhbuild run sugar-emulator --fullscreen
cp install/bin/sugar-emulator install/bin/sugar-emulator.backup
  ./sugar-jhbuild run sugar-emulator --dimensions 1200x900
  nano install/bin/sugar-emulator


Find this piece of code:
The default size of 800x600 is currently the minimum that should work without issues. I.e. activities should be tested to work in this mode (and in others as well).
 
<PRE>
    cmd = [ 'Xephyr' ]
    cmd.append(':%d' % display)
    cmd.append('-ac')
 
    if gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900:
        cmd.append('-fullscreen')
    else:
        cmd.append('-screen')
        cmd.append('%dx%d' % (1200, 900))
</PRE> 
 
Comment out the '''if''' and '''else''' instructions, and specify the screen resolution and mode you want (it's important to delete 4 spaces before the "cmd.append" lines):
 
<PRE>
    cmd = [ 'Xephyr' ]
    cmd.append(':%d' % display)
    cmd.append('-ac')
 
#    if gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900:
#        cmd.append('-fullscreen')
#    else:
    cmd.append('-screen')
    cmd.append('%dx%d' % (800, 600))
</PRE>
 
Sugar will now run on a 800x600 window. This file may be replaced next time you update sugar-jhbuild, and you'll have to do this again.  Also note that 800x600 is not an optimal resolution for the window, because the activity circle will be vertically off center.  1024x768 is a more useable resolution.


== Other commands ==
== Other commands ==