Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Unnamed
Tuesday, April 15th, 2008 at 12:56:17pm UTC 

  1. === modified file 'bin/ubiquity-dm'
  2. --- bin/ubiquity-dm     2008-03-21 19:09:39 +0000
  3. +++ bin/ubiquity-dm     2008-04-15 12:54:24 +0000
  4. @@ -114,8 +114,32 @@
  5.              time.sleep(1)
  6.              timeout -= 1
  7.  
  8. +        extras = []
  9.          if self.frontend == 'gtk_ui' or self.frontend == 'mythbuntu_ui':
  10. -            if os.access(background, os.R_OK):
  11. +            # Accessibility infrastructure
  12. +            gconf_dir = ('xml:readwrite:%s' %
  13. +                '~root/.gconf')
  14. +            accessibility = 'false'
  15. +            if osextras.find_on_path('gconftool-2'):
  16. +                subp = subprocess.Popen(
  17. +                    ['gconftool-2', '--config-source', gconf_dir,
  18. +                     '--get', '/desktop/gnome/interface/accessibility'],
  19. +                    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  20. +                accessibility = subp.communicate()[0].rstrip('\n')
  21. +            if accessibility == 'true':
  22. +                if os.path.exists('/usr/lib/at-spi/at-spi-registryd'):
  23. +                    extras.append(subprocess.Popen(['/usr/lib/at-spi/at-spi-registryd'],
  24. +                        stdin=null, stdout=logfile, stderr=logfile))
  25. +                    os.environ['GTK_MODULES'] = 'gail:atk-bridge'
  26. +
  27. +            maybe_drop_privileges = []
  28. +            if accessibility != 'true':
  29. +                maybe_drop_privileges['preexec_fn'] = self.drop_privileges
  30. +
  31. +            # Don't show the background image in v1 accessibility profile. It
  32. +            # is not shown in the GNOME desktop after all.
  33. +            fp = open('/proc/cmdline', 'r')
  34. +            if os.access(background, os.R_OK) and not 'access=v1' in fp.readline():
  35.                  import gtk
  36.                  pixbuf = gtk.gdk.pixbuf_new_from_file(background)
  37.                  root = gtk.gdk.get_default_root_window()
  38. @@ -125,53 +149,36 @@
  39.                  root.set_back_pixmap(pixmap, False)
  40.                  root.clear()
  41.                  gtk.gdk.flush()
  42. +            fp.close()
  43.  
  44. -        extras = []
  45.          if self.frontend in ('gtk_ui', 'mythbuntu_ui'):
  46.              if osextras.find_on_path('metacity'):
  47.                  wm = subprocess.Popen(['metacity', '--sm-disable'],
  48.                      stdin=null, stdout=logfile, stderr=logfile,
  49. -                    preexec_fn=self.drop_privileges)
  50. +                    **maybe_drop_privileges)
  51.              elif osextras.find_on_path('xfwm4'):
  52.                  wm = subprocess.Popen('xfwm4',
  53.                      stdin=null, stdout=logfile, stderr=logfile,
  54. -                    preexec_fn=self.drop_privileges)
  55. +                    **maybe_drop_privileges)
  56.              else:
  57.                  raise MissingProgramError, \
  58.                      "No window manager found (tried metacity, xfwm4)"
  59.  
  60.              if os.path.exists('/usr/lib/gnome-settings-daemon/gnome-settings-daemon'):
  61.                  extras.append(subprocess.Popen(['/usr/lib/gnome-settings-daemon/gnome-settings-daemon'],
  62. -                    stdin=null, stdout=logfile, stderr=logfile, preexec_fn=self.drop_privileges))
  63. +                    stdin=null, stdout=logfile, stderr=logfile, **maybe_drop_privileges))
  64.  
  65. -            # Accessibility
  66. -            gconf_dir = ('xml:readwrite:%s' %
  67. -                os.path.expanduser('~%s/.gconf' %
  68. -                self.username))
  69. -            accessibility = 'false'
  70. -            if osextras.find_on_path('gconftool-2'):
  71. -                subp = subprocess.Popen(
  72. -                    ['gconftool-2', '--config-source', gconf_dir,
  73. -                     '--get', '/desktop/gnome/interface/accessibility'],
  74. -                    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  75. -                accessibility = subp.communicate()[0].rstrip('\n')
  76. +            # Accessibility tools
  77.              if accessibility == 'true':
  78. -                if os.path.exists('/usr/lib/at-spi/at-spi-registryd'):
  79. -                    extras.append(subprocess.Popen(['/usr/lib/at-spi/at-spi-registryd'],
  80. -                        stdin=null, stdout=logfile, stderr=logfile,
  81. -                        preexec_fn=self.drop_privileges))
  82. -                    os.environ['GTK_MODULES'] = 'gail:atk-bridge'
  83.                  fp = open('/proc/cmdline', 'r')
  84.                  if 'access=m2' in fp.readline():
  85.                      if osextras.find_on_path('onboard'):
  86.                          extras.append(subprocess.Popen(['onboard'],
  87. -                            stdin=null, stdout=logfile, stderr=logfile,
  88. -                            preexec_fn=self.drop_privileges))
  89. +                            stdin=null, stdout=logfile, stderr=logfile))
  90.                  else:
  91.                      if osextras.find_on_path('orca'):
  92.                          extras.append(subprocess.Popen(['orca', '-n'],
  93. -                            stdin=null, stdout=logfile, stderr=logfile,
  94. -                            preexec_fn=self.drop_privileges))
  95. +                            stdin=null, stdout=logfile, stderr=logfile))
  96.                  fp.close()
  97.          elif self.frontend == 'kde_ui':
  98.              wm = subprocess.Popen('kwin', stdin=null, stdout=logfile,
  99.  
  100. === modified file 'debian/changelog'
  101. --- debian/changelog    2008-04-15 00:49:38 +0000
  102. +++ debian/changelog    2008-04-15 12:55:38 +0000
  103. @@ -1,3 +1,17 @@
  104. +ubiquity (1.8.6) UNRELEASED; urgency=low
  105. +
  106. +  * bin/ubiquity-dm:
  107. +    - Move code relating to at-spi-registryd to ensure that a11y is loaded
  108. +      before the background and window manager. (LP: #197887)
  109. +    - Ensure that orca/onboard are only run if the a11y gconf key is set.
  110. +    - Don't show any background image if the v1 profile is selected, similar to
  111. +      what happens in the GNOME desktop with this profile enabled.
  112. +    - Do not drop privileges when running the window manager,
  113. +      gnome-settings-daemon, or any of the a11y tools. Privileges are still
  114. +      dropped when accessibility is not enabled.
  115. +
  116. + -- Luke Yelavich <[email protected]>  Tue, 15 Apr 2008 22:01:16 +1000
  117. +
  118.  ubiquity (1.8.5) hardy; urgency=low
  119.  
  120.    [ Evan Dandrea ]

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right