#!/usr/bin/python
import gio
import time

firefox = gio.AppInfo("/usr/bin/firefox")
totem = gio.AppInfo("/usr/bin/totem")

while True:
    firefox.set_as_default_for_type("x-scheme-handler/http")
    print gio.app_info_get_default_for_type("x-scheme-handler/http", False)
    time.sleep(10)

    totem.set_as_default_for_type("x-scheme-handler/http")
    print gio.app_info_get_default_for_type("x-scheme-handler/http", False)
    time.sleep(10)
