コード例 #1
0
def main():
    from xpra.os_util import set_application_name, set_prgname
    set_prgname("OSX Shadow Test")
    set_application_name("OSX Shadow Test")

    defaults = make_defaults_struct()
    for x in ("daemon", "clipboard", "mmap", "speaker", "microphone",
              "cursors", "bell", "notifications", "system_tray", "sharing",
              "delay_tray", "opengl"):
        setattr(defaults, x, False)

    loop_exit = gtk.main_quit
    loop_run = gtk.main

    XPRA_DISPLAY = ":10"
    sp = "~/.xpra/%s-%s" % (socket.gethostname(), XPRA_DISPLAY[1:])
    sockpath = os.path.expanduser(sp)

    listener = socket.socket(socket.AF_UNIX)
    listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    listener.setblocking(1)
    listener.bind(sockpath)
    sockets = [listener]

    ss = ShadowServer()
    ss.init(sockets, defaults)
    ss.run()

    gobject.timeout_add(1000 * 120, loop_exit)
    loop_run()
コード例 #2
0
ファイル: test_shadowserver.py プロジェクト: Brainiarc7/xpra
def main():
    from xpra.os_util import set_application_name, set_prgname
    set_prgname("OSX Shadow Test")
    set_application_name("OSX Shadow Test")

    defaults = make_defaults_struct()
    for x in ("daemon", "clipboard", "mmap", "speaker", "microphone",
              "cursors", "bell", "notifications",
              "system_tray", "sharing",
              "delay_tray", "opengl"):
        setattr(defaults, x, False)

    loop_exit = gtk.main_quit
    loop_run = gtk.main


    XPRA_DISPLAY = ":10"
    sp = "~/.xpra/%s-%s" % (socket.gethostname(), XPRA_DISPLAY[1:])
    sockpath = os.path.expanduser(sp)

    listener = socket.socket(socket.AF_UNIX)
    listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    listener.setblocking(1)
    listener.bind(sockpath)
    sockets = [listener]

    ss = ShadowServer()
    ss.init(sockets, defaults)
    ss.run()

    gobject.timeout_add(1000*120, loop_exit)
    loop_run()
コード例 #3
0
def main():
    from xpra.os_util import set_application_name, set_prgname
    if sys.platform.startswith("win"):
        from xpra.platform.win32 import set_redirect_output, set_log_filename
        set_redirect_output(True)
        set_log_filename("Keyboard_Test.log")
    init()
    set_prgname("Keyboard Test Tool")
    set_application_name("Keyboard Test Tool")
    KeyboardStateInfoWindow()
    gtk.main()
コード例 #4
0
    def init(self, opts):
        log("ServerCore.init(%s)", opts)
        self.session_name = opts.session_name
        set_application_name(self.session_name)

        self._tcp_proxy = opts.tcp_proxy
        self.encryption_keyfile = opts.encryption_keyfile
        self.password_file = opts.password_file
        self.compression_level = opts.compression_level

        self.init_auth(opts)
コード例 #5
0
ファイル: test_clipboard.py プロジェクト: svn2github/Xpra
def main():	
	logging.basicConfig(format="%(asctime)s %(message)s")
	logging.root.setLevel(logging.DEBUG)

	from xpra.os_util import set_application_name, set_prgname
	set_prgname("Primary Clipboard Test Tool")
	set_application_name("Primary Clipboard Test Tool")
	if sys.platform.startswith("win"):
		from xpra.platform.win32 import set_redirect_output, set_log_filename
		set_redirect_output(True)
		set_log_filename("Primary_Clipboard_Test.log")
	init()

	frc = FakeRemoteClipboard()
	gobject.timeout_add(1000, frc.fake_token)
	#gobject.timeout_add(1200, fake_target, 0)
	#gobject.timeout_add(1400, fake_target, 1)
	#gobject.timeout_add(1600, fake_target, 2)
	#gobject.timeout_add(1800, fake_data, 2)
	#gobject.timeout_add(2500, fake_data, 3)
	#gobject.timeout_add(3500, fake_data, 5)
	gtk.main()
コード例 #6
0
def main():
    logging.basicConfig(format="%(asctime)s %(message)s")
    logging.root.setLevel(logging.DEBUG)

    from xpra.os_util import set_application_name, set_prgname
    set_prgname("Primary Clipboard Test Tool")
    set_application_name("Primary Clipboard Test Tool")
    if sys.platform.startswith("win"):
        from xpra.platform.win32 import set_redirect_output, set_log_filename
        set_redirect_output(True)
        set_log_filename("Primary_Clipboard_Test.log")
    init()

    frc = FakeRemoteClipboard()
    gobject.timeout_add(1000, frc.fake_token)
    #gobject.timeout_add(1200, fake_target, 0)
    #gobject.timeout_add(1400, fake_target, 1)
    #gobject.timeout_add(1600, fake_target, 2)
    #gobject.timeout_add(1800, fake_data, 2)
    #gobject.timeout_add(2500, fake_data, 3)
    #gobject.timeout_add(3500, fake_data, 5)
    gtk.main()
コード例 #7
0
def init_main(prgname):
    logging.basicConfig(format="%(asctime)s %(message)s")
    logging.root.setLevel(logging.DEBUG)
    from xpra.os_util import set_application_name, set_prgname
    set_prgname(prgname)
    set_application_name(prgname)
コード例 #8
0
ファイル: test_protocol_base.py プロジェクト: svn2github/Xpra
def init_main(prgname):
    logging.basicConfig(format="%(asctime)s %(message)s")
    logging.root.setLevel(logging.DEBUG)
    from xpra.os_util import set_application_name, set_prgname
    set_prgname(prgname)
    set_application_name(prgname)