コード例 #1
0
ファイル: client_launcher.py プロジェクト: svn2github/Xpra
		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()

	def launch_xpra(self):
コード例 #2
0
ファイル: client_launcher.py プロジェクト: svn2github/Xpra
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)
xpra_opts.bell = default_bool("bell", True)
xpra_opts.notifications = default_bool("notifications", True)
コード例 #3
0
ファイル: client_launcher.py プロジェクト: rudresh2319/Xpra
xpra_opts.min_speed = default_int("min-speed", -1)
xpra_opts.sockdir = None
xpra_opts.host = defaults.get("host", "127.0.0.1")
xpra_opts.username = ""
try:
    import getpass
    xpra_opts.username = getpass.getuser()
except:
    pass
xpra_opts.remote_xpra = default_str("remote_xpra", ".xpra/run-xpra")
xpra_opts.session_name = default_str("session_name", None)
xpra_opts.port = default_int("port", 10000)
xpra_opts.mode = default_str("mode", "tcp", ["tcp", "tcp + aes", "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 = default_str("password", "")
xpra_opts.password_file = default_str("password-file", "")
xpra_opts.clipboard = default_bool("clipboard", True)
xpra_opts.pulseaudio = default_bool("pulseaudio", True)
xpra_opts.pulseaudio_command = default_str("pulseaudio_command", "")
xpra_opts.mmap = default_bool("mmap", True)
xpra_opts.mmap_group = default_bool("mmap-group", False)
xpra_opts.speaker = default_bool("speaker", True)
xpra_opts.speaker_codec = [
    x for x in [default_str("speaker_codec", "")] if bool(x)
]
xpra_opts.microphone = default_bool("microphone", True)
xpra_opts.microphone_codec = [
コード例 #4
0
ファイル: client_launcher.py プロジェクト: svn2github/Xpra
						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"]
xpra_opts.password_file = ""
xpra_opts.send_pings = False
コード例 #5
0
        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)
            else: