Ejemplo n.º 1
0
		gtk_main_quit_on_fatal_exceptions_enable()
		opts = AdHocStruct()
		opts.clipboard = True
		opts.pulseaudio = True
		opts.password_file = xpra_opts.password_file
		opts.title = "@title@ on @client-machine@"
		opts.encoding = xpra_opts.encoding
		opts.jpegquality = xpra_opts.jpegquality
		opts.max_bandwidth = 0.0
		opts.auto_refresh_delay = 0.0
		opts.key_shortcuts = []
		opts.compression_level = 3
		from xpra.platform import DEFAULT_SSH_CMD
		opts.ssh = DEFAULT_SSH_CMD
		opts.remote_xpra = ".xpra/run-xpra"
		opts.debug = None
                opts.no_tray = False
		opts.dock_icon = None
		opts.tray_icon = None
		opts.window_icon = None
		opts.readonly = False
		opts.session_name = "Xpra session"
		opts.mmap = True
		opts.keyboard_sync = True

		import logging
		logging.root.setLevel(logging.INFO)
		logging.root.addHandler(logging.StreamHandler(sys.stderr))

		app = XpraClient(socket_wrapper, opts)
		app.run()
Ejemplo n.º 2
0
def default_bool(varname, default_value):
    if varname not in defaults:
        return default_value
    v = defaults.get(varname)
    return str_to_bool(v, default_value)


from wimpiggy.util import AdHocStruct
xpra_opts = AdHocStruct()
xpra_opts.encoding = default_str("encoding", DEFAULT_ENCODING,
                                 ENCODING_OPTIONS)
xpra_opts.jpegquality = default_int("jpegquality", 90)
xpra_opts.host = defaults.get("host", "127.0.0.1")
xpra_opts.port = default_int("port", 10000)
xpra_opts.mode = default_str("mode", "tcp", ["tcp", "ssh"])
xpra_opts.debug = default_bool("debug", False)
xpra_opts.no_tray = default_bool("debug", False)
xpra_opts.dock_icon = default_str("dock-icon", "")
xpra_opts.tray_icon = default_str("tray-icon", "")
xpra_opts.window_icon = default_str("window-icon", "")
xpra_opts.password_file = default_str("password-file", "")
xpra_opts.clipboard = default_bool("clipboard", True)
xpra_opts.pulseaudio = default_bool("pulseaudio", True)
xpra_opts.mmap = default_bool("mmap", True)
xpra_opts.mmap_group = default_bool("mmap-group", False)
xpra_opts.readonly = default_bool("readonly", False)
xpra_opts.keyboard_sync = default_bool("keyboard-sync", True)
xpra_opts.compression_level = default_int("compression", 3)
xpra_opts.send_pings = default_bool("pings", False)
xpra_opts.dpi = default_int("dpi", 96)
xpra_opts.cursors = default_bool("cursors", True)
Ejemplo n.º 3
0
		return  False
	return default_value
def default_bool(varname, default_value):
	if varname not in defaults:
		return default_value
	v = defaults.get(varname)
	return str_to_bool(v, default_value)

from wimpiggy.util import AdHocStruct
xpra_opts = AdHocStruct()
xpra_opts.encoding = default_str("encoding", DEFAULT_ENCODING, ENCODING_OPTIONS)
xpra_opts.jpegquality = default_int("jpegquality", 90)
xpra_opts.host = defaults.get("host", "127.0.0.1")
xpra_opts.port = default_int("port", 10000)
xpra_opts.mode = default_str("mode", "tcp", ["tcp", "ssh"])
xpra_opts.debug = default_bool("debug", False)
xpra_opts.no_tray = default_bool("debug", False)
xpra_opts.dock_icon = default_str("dock-icon", "")
xpra_opts.tray_icon = default_str("tray-icon", "")
xpra_opts.window_icon = default_str("window-icon", "")
xpra_opts.password_file = default_str("password-file", "")
xpra_opts.clipboard = default_bool("clipboard", True)
xpra_opts.pulseaudio = default_bool("pulseaudio", True)
xpra_opts.mmap = default_bool("mmap", True)
xpra_opts.mmap_group = default_bool("mmap-group", False)
xpra_opts.readonly = default_bool("readonly", False)
xpra_opts.keyboard_sync = default_bool("keyboard-sync", True)
xpra_opts.compression_level = default_int("compression", 3)
xpra_opts.send_pings = default_bool("pings", False)
xpra_opts.dpi = default_int("dpi", 96)
xpra_opts.cursors = default_bool("cursors", True)
Ejemplo n.º 4
0
XPRA_COMPRESSION_OPTIONS_DICT = {
    LOSSY_5: 5,
    LOSSY_20: 20,
    LOSSY_50: 50,
    LOSSY_90: 90
}

# Default connection options
from wimpiggy.util import AdHocStruct
xpra_opts = AdHocStruct()
xpra_opts.encoding = "png"
xpra_opts.jpegquality = 90
xpra_opts.host = "127.0.0.1"
xpra_opts.port = 16010
xpra_opts.mode = "tcp"
xpra_opts.debug = False
xpra_opts.autoconnect = False
xpra_opts.no_tray = False
xpra_opts.dock_icon = ""
xpra_opts.tray_icon = ""
xpra_opts.password_file = False
xpra_opts.clipboard = True
xpra_opts.pulseaudio = True
xpra_opts.mmap = True
xpra_opts.readonly = False
xpra_opts.keyboard_sync = True
xpra_opts.compression_level = 3
xpra_opts.auto_refresh_delay = 0.0
xpra_opts.max_bandwidth = 0.0
xpra_opts.window_icon = ""
xpra_opts.key_shortcuts = ["Meta+Shift+F4:quit"]
Ejemplo n.º 5
0
XPRA_COMPRESSION_OPTIONS = [LOSSY_5, LOSSY_20, LOSSY_50, LOSSY_90]
XPRA_COMPRESSION_OPTIONS_DICT = {LOSSY_5 : 5,
						LOSSY_20 : 20,
						LOSSY_50 : 50,
						LOSSY_90 : 90
						}

# Default connection options
from wimpiggy.util import AdHocStruct
xpra_opts = AdHocStruct()
xpra_opts.encoding = "png"
xpra_opts.jpegquality = 90
xpra_opts.host = "127.0.0.1"
xpra_opts.port = 16010
xpra_opts.mode = "tcp"
xpra_opts.debug = False
xpra_opts.autoconnect = False
xpra_opts.no_tray = False
xpra_opts.dock_icon = ""
xpra_opts.tray_icon = ""
xpra_opts.password_file = False
xpra_opts.clipboard = True
xpra_opts.pulseaudio = True
xpra_opts.mmap = True
xpra_opts.readonly = False
xpra_opts.keyboard_sync = True
xpra_opts.compression_level = 3
xpra_opts.auto_refresh_delay = 0.0
xpra_opts.max_bandwidth = 0.0
xpra_opts.window_icon = ""
xpra_opts.key_shortcuts = ["Meta+Shift+F4:quit"]
Ejemplo n.º 6
0
        opts = AdHocStruct()
        opts.clipboard = True
        opts.pulseaudio = True
        opts.password_file = None
        opts.title_suffix = None
        opts.title = "@title@ on @client-machine@"
        opts.encoding = "rgb24"
        opts.jpegquality = 80
        opts.max_bandwidth = 0.0
        opts.auto_refresh_delay = 0.0
        opts.key_shortcuts = []
        opts.compression_level = 3
        from xpra.platform import DEFAULT_SSH_CMD
        opts.ssh = DEFAULT_SSH_CMD
        opts.remote_xpra = ".xpra/run-xpra"
        opts.debug = None
        opts.dock_icon = None

        import logging
        logging.root.setLevel(logging.INFO)
        logging.root.addHandler(logging.StreamHandler(sys.stderr))

        app = XpraClient(socket_wrapper, opts)
        app.run()

    def launch_xpra(self):
        """ Launches Xpra in a new process """
        cmd = "xpra"
        if sys.platform.startswith("win"):
            if hasattr(sys, "frozen"):
                exedir = os.path.dirname(sys.executable)