How to use the xpra.version_util.add_version_info function in xpra

To help you get started, we’ve selected a few xpra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dscho / Xpra / trunk / src / xpra / server / server_base.py View on Github external
"window_unmap"                 : True,
             "xsettings-tuple"              : True,
             "change-quality"               : True,
             "change-min-quality"           : True,
             "change-speed"                 : True,
             "change-min-speed"             : True,
             "client_window_properties"     : True,
             "sound_sequence"               : True,
             "notify-startup-complete"      : True,
             "suspend-resume"               : True,
             "encoding.generic"             : True,
             "exit_server"                  : True,
             "sound.server_driven"          : True,
             "server_type"                  : "base",
             })
        add_version_info(capabilities)
        for k,v in codec_versions.items():
            capabilities["encoding.%s.version" % k] = v
        return capabilities
github dscho / Xpra / tags / v0.11.x / src / xpra / server / server_base.py View on Github external
"window_unmap"                 : True,
             "xsettings-tuple"              : True,
             "change-quality"               : True,
             "change-min-quality"           : True,
             "change-speed"                 : True,
             "change-min-speed"             : True,
             "client_window_properties"     : True,
             "sound_sequence"               : True,
             "notify-startup-complete"      : True,
             "suspend-resume"               : True,
             "encoding.generic"             : True,
             "exit_server"                  : True,
             "sound.server_driven"          : True,
             "server_type"                  : "base",
             })
        add_version_info(capabilities)
        for k,v in codec_versions.items():
            capabilities["encoding.%s.version" % k] = v
        return capabilities
github dscho / Xpra / tags / v0.10.x / src / xpra / server / server_base.py View on Github external
def do_get_info(self, proto, server_sources, window_ids):
        start = time.time()
        info = {}
        add_version_info(info, "server.")
        info["server.type"] = "Python"
        info["server.byteorder"] = sys.byteorder
        info["server.platform"] = PLATFORM_NAME
        info["server.platform.release"] = python_platform.release()
        info["server.platform.platform"] = python_platform.platform()
        if sys.platform.startswith("linux"):
            info["server.platform.linux_distribution"] = python_platform.linux_distribution()
        info["server.pid"] = os.getpid()
        for x in ("uid", "gid"):
            if hasattr(os, "get%s" % x):
                try:
                    info["server."+x] = getattr(os, "get%s" % x)()
                except:
                    pass
        info["server.hostname"] = socket.gethostname()
        info["server.start_time"] = int(self.start_time)
github dscho / Xpra / trunk / src / xpra / server / server_core.py View on Github external
#this function is for non UI thread info
    info = {
            prefix+"pid"                : os.getpid(),
            prefix+"byteorder"          : sys.byteorder,
            prefix+"hostname"           : socket.gethostname(),
            prefix+"python.full_version": sys.version,
            prefix+"python.version"     : sys.version_info[:3],
            }
    for x in ("uid", "gid"):
        if hasattr(os, "get%s" % x):
            try:
                info[prefix+x] = getattr(os, "get%s" % x)()
            except:
                pass
    info.update(get_platform_info(prefix))
    add_version_info(info, prefix)
    return info
github dscho / Xpra / tags / v0.12.x / src / xpra / server / server_base.py View on Github external
"window_refresh_config"        : True,
             "xsettings-tuple"              : True,
             "change-quality"               : True,
             "change-min-quality"           : True,
             "change-speed"                 : True,
             "change-min-speed"             : True,
             "client_window_properties"     : True,
             "sound_sequence"               : True,
             "notify-startup-complete"      : True,
             "suspend-resume"               : True,
             "encoding.generic"             : True,
             "exit_server"                  : True,
             "sound.server_driven"          : True,
             "server_type"                  : "base",
             })
        add_version_info(capabilities)
        for k,v in codec_versions.items():
            capabilities["encoding.%s.version" % k] = v
        return capabilities
github dscho / Xpra / trunk / src / xpra / server / server_core.py View on Github external
capabilities.update({
                        "start_time"            : int(self.start_time),
                        "current_time"          : int(now),
                        "elapsed_time"          : int(now - self.start_time),
                        "server_type"           : "core",
                        "info-request"          : True,
                        "uuid"                  : get_user_uuid(),
                        })
        mid = get_machine_id()
        if mid:
            capabilities["machine_id"] = mid
        if self.session_name:
            capabilities["session_name"] = self.session_name
        if self._reverse_aliases:
            capabilities["aliases"] = self._reverse_aliases
        add_version_info(capabilities)
        return capabilities
github dscho / Xpra / tags / v0.9.x / src / xpra / client_base.py View on Github external
def make_hello(self, challenge_response=None):
        capabilities = {}
        add_version_info(capabilities)
        if challenge_response:
            assert self.password
            capabilities["challenge_response"] = challenge_response
        if self.encryption:
            assert self.encryption in ENCRYPTION_CIPHERS
            capabilities["cipher"] = self.encryption
            iv = get_hex_uuid()[:16]
            capabilities["cipher.iv"] = iv
            key_salt = get_hex_uuid()
            capabilities["cipher.key_salt"] = key_salt
            iterations = 1000
            capabilities["cipher.key_stretch_iterations"] = iterations
            self._protocol.set_cipher_in(self.encryption, iv, self.get_password(), key_salt, iterations)
            log("encryption capabilities: %s", [(k,v) for k,v in capabilities.items() if k.startswith("cipher")])
        if self.encoding:
            capabilities["encoding"] = self.encoding
github dscho / Xpra / tags / v0.10.x / src / xpra / client / client_base.py View on Github external
def make_hello(self, challenge_response=None):
        capabilities = {}
        add_version_info(capabilities)
        capabilities["python.version"] = sys.version_info[:3]
        if challenge_response:
            assert self.password
            capabilities["challenge_response"] = challenge_response
        if self.encryption:
            assert self.encryption in ENCRYPTION_CIPHERS
            capabilities["cipher"] = self.encryption
            iv = get_hex_uuid()[:16]
            capabilities["cipher.iv"] = iv
            key_salt = get_hex_uuid()
            capabilities["cipher.key_salt"] = key_salt
            iterations = 1000
            capabilities["cipher.key_stretch_iterations"] = iterations
            self._protocol.set_cipher_in(self.encryption, iv, self.get_password(), key_salt, iterations)
            log("encryption capabilities: %s", [(k,v) for k,v in capabilities.items() if k.startswith("cipher")])
        capabilities["platform"] = sys.platform
github dscho / Xpra / tags / v0.8.x / src / xpra / server_base.py View on Github external
def do_get_info(self, proto, server_sources, window_ids):
        start = time.time()
        info = {}
        add_version_info(info)
        add_gtk_version_info(info, gtk)
        info["hostname"] = socket.gethostname()
        info["root_window_size"] = gtk.gdk.get_default_root_window().get_size()
        info["max_desktop_size"] = self.get_max_screen_size()
        info["session_name"] = self.session_name or ""
        info["password_file"] = self.password_file or ""
        info["randr"] = self.randr
        info["clipboard"] = self._clipboard_helper is not None
        info["cursors"] = self.cursors
        info["bell"] = self.bell
        info["notifications"] = self.notifications_forwarder is not None
        info["pulseaudio"] = self.pulseaudio
        info["start_time"] = int(self.start_time)
        info["encodings"] = ",".join(ENCODINGS)
        info["platform"] = sys.platform
        info["python_version"] = python_platform.python_version()