示例#1
0
def get_defaults():
    global GLOBAL_DEFAULTS
    if GLOBAL_DEFAULTS is not None:
        return GLOBAL_DEFAULTS
    from xpra.platform.features import DEFAULT_SSH_COMMAND, OPEN_COMMAND, DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS, DEFAULT_PULSEAUDIO_COMMAND, \
                                        DEFAULT_ENV, CAN_DAEMONIZE
    from xpra.platform.paths import get_download_dir, get_remote_run_xpra_scripts
    try:
        from xpra.platform.info import get_username
        username = get_username()
    except:
        username = ""
    conf_dirs = [os.environ.get("XPRA_CONF_DIR")]
    build_root = os.environ.get("RPM_BUILD_ROOT")
    if build_root:
        conf_dirs.append(os.path.join(build_root, "etc", "xpra"))
    xpra_cmd = sys.argv[0]
    bin_dir = None
    if len(sys.argv) > 0:
        for strip in ("/usr/bin", "/bin"):
            pos = xpra_cmd.find(strip)
            if pos >= 0:
                bin_dir = xpra_cmd[:pos + len(strip)]
                root = xpra_cmd[:pos] or "/"
                conf_dirs.append(os.path.join(root, "etc", "xpra"))
                break
    if sys.prefix == "/usr":
        conf_dirs.append("/etc/xpra")
    else:
        conf_dirs.append(os.path.join(sys.prefix, "etc", "xpra"))
    for conf_dir in [x for x in conf_dirs if x]:
        if os.path.exists(conf_dir):
            break
    xvfb = detect_xvfb_command(conf_dir, bin_dir)

    def addtrailingslash(v):
        if v.endswith("/"):
            return v
        return v + "/"

    if WIN32:
        bind_dirs = ["Main"]
    else:
        bind_dirs = ["auto"]

    ssl_protocol = "TLSv1_2"
    if sys.version_info < (2, 7, 9):
        ssl_protocol = "SSLv23"

    GLOBAL_DEFAULTS = {
        "encoding":
        "",
        "title":
        "@title@ on @client-machine@",
        "username":
        username,
        "password":
        "",
        "auth":
        "",
        "vsock-auth":
        "",
        "tcp-auth":
        "",
        "ssl-auth":
        "",
        "wm-name":
        DEFAULT_NET_WM_NAME,
        "session-name":
        "",
        "dock-icon":
        "",
        "tray-icon":
        "",
        "window-icon":
        "",
        "password-file":
        "",
        "keyboard-raw":
        False,
        "keyboard-layout":
        "",
        "keyboard-layouts": [],
        "keyboard-variant":
        "",
        "keyboard-variants": [],
        "keyboard-options":
        "",
        "clipboard":
        "yes",
        "clipboard-direction":
        "both",
        "clipboard-filter-file":
        "",
        "remote-clipboard":
        "CLIPBOARD",
        "local-clipboard":
        "CLIPBOARD",
        "pulseaudio-command":
        " ".join(DEFAULT_PULSEAUDIO_COMMAND),
        "encryption":
        "",
        "tcp-encryption":
        "",
        "encryption-keyfile":
        "",
        "tcp-encryption-keyfile":
        "",
        "pidfile":
        "",
        "ssh":
        DEFAULT_SSH_COMMAND,
        "systemd-run":
        get_default_systemd_run(),
        "systemd-run-args":
        "",
        "xvfb":
        " ".join(xvfb),
        "socket-dir":
        "",
        "log-dir":
        "auto",
        "log-file":
        "$DISPLAY.log",
        "border":
        "auto,5:off",
        "window-close":
        "auto",
        "max-size":
        "",
        "desktop-scaling":
        "auto",
        "display":
        "",
        "tcp-proxy":
        "",
        "download-path":
        get_download_dir(),
        "open-command":
        OPEN_COMMAND,
        "remote-logging":
        "both",
        "lpadmin":
        "/usr/sbin/lpadmin",
        "lpinfo":
        "/usr/sbin/lpinfo",
        "add-printer-options":
        ["-E", "-o printer-is-shared=false", "-u allow:$USER"],
        "pdf-printer":
        "",
        "postscript-printer":
        DEFAULT_POSTSCRIPT_PRINTER,
        "debug":
        "",
        "input-method":
        "none",
        "sound-source":
        "",
        "html":
        "auto",
        "socket-permissions":
        "600",
        "exec-wrapper":
        "",
        "dbus-launch":
        "dbus-launch --close-stderr",
        "webcam": ["auto", "no"][OSX],
        #ssl options:
        "ssl":
        "auto",
        "ssl-key":
        "",
        "ssl-cert":
        "",
        "ssl-protocol":
        ssl_protocol,
        "ssl-ca-certs":
        "default",
        "ssl-ca-data":
        "",
        "ssl-ciphers":
        "DEFAULT",
        "ssl-client-verify-mode":
        "optional",
        "ssl-server-verify-mode":
        "required",
        "ssl-verify-flags":
        "X509_STRICT",
        "ssl-check-hostname":
        False,
        "ssl-server-hostname":
        "localhost",
        "ssl-options":
        "ALL,NO_COMPRESSION",
        "quality":
        0,
        "min-quality":
        30,
        "speed":
        0,
        "min-speed":
        30,
        "compression_level":
        1,
        "dpi":
        0,
        "video-scaling":
        1,
        "file-size-limit":
        100,
        "idle-timeout":
        0,
        "server-idle-timeout":
        0,
        "sync-xvfb":
        0,
        "auto-refresh-delay":
        0.15,
        "daemon":
        CAN_DAEMONIZE,
        "use-display":
        False,
        "fake-xinerama":
        not OSX and not WIN32,
        "resize-display":
        not OSX and not WIN32,
        "tray":
        True,
        "pulseaudio":
        not OSX and not WIN32,
        "dbus-proxy":
        not OSX and not WIN32,
        "mmap": ["no", "yes"][not OSX and not WIN32],
        "mmap-group":
        False,
        "speaker": ["disabled", "on"][has_sound_support()],
        "microphone": ["disabled", "off"][has_sound_support()],
        "readonly":
        False,
        "keyboard-sync":
        True,
        "pings":
        False,
        "cursors":
        True,
        "bell":
        True,
        "notifications":
        True,
        "xsettings":
        not OSX and not WIN32,
        "system-tray":
        True,
        "sharing":
        False,
        "delay-tray":
        False,
        "windows":
        True,
        "exit-with-children":
        False,
        "exit-with-client":
        False,
        "start-after-connect":
        False,
        "start-new-commands":
        False,
        "proxy-start-sessions":
        True,
        "av-sync":
        True,
        "exit-ssh":
        True,
        "dbus-control":
        not WIN32 and not OSX,
        "opengl":
        get_opengl_default(),
        "mdns":
        not WIN32,
        "file-transfer":
        True,
        "printing":
        True,
        "open-files":
        False,
        "swap-keys":
        OSX,  #only used on osx
        "desktop-fullscreen":
        False,
        "global-menus":
        True,
        "pulseaudio-configure-commands":
        [" ".join(x) for x in DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS],
        "socket-dirs": [],
        "remote-xpra":
        get_remote_run_xpra_scripts(),
        "encodings": ["all"],
        "proxy-video-encoders": [],
        "video-encoders": ["all"],
        "csc-modules": ["all"],
        "video-decoders": ["all"],
        "speaker-codec": [],
        "microphone-codec": [],
        "compressors": ["all"],
        "packet-encoders": ["all"],
        "key-shortcut":
        get_default_key_shortcuts(),
        "bind":
        bind_dirs,
        "bind-vsock": [],
        "bind-tcp": [],
        "bind-ssl": [],
        "start": [],
        "start-child": [],
        "start-after-connect": [],
        "start-child-after-connect": [],
        "start-on-connect": [],
        "start-child-on-connect": [],
        "start-env":
        DEFAULT_ENV,
        "env": [],
    }
    return GLOBAL_DEFAULTS
示例#2
0
文件: config.py 项目: ljmljz/xpra
def get_defaults():
    global GLOBAL_DEFAULTS
    if GLOBAL_DEFAULTS is not None:
        return GLOBAL_DEFAULTS
    from xpra.platform.features import DEFAULT_SSH_COMMAND, OPEN_COMMAND, DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS, DEFAULT_PULSEAUDIO_COMMAND, XDUMMY, XDUMMY_WRAPPER, DISPLAYFD, DEFAULT_ENV, CAN_DAEMONIZE
    from xpra.platform.paths import get_download_dir, get_default_log_dir, get_socket_dirs, get_remote_run_xpra_scripts
    try:
        from xpra.platform.info import get_username
        username = get_username()
    except:
        username = ""
    if WIN32 or OSX or PYTHON3:
        xvfb = ""
    elif XDUMMY:
        xvfb = get_Xdummy_command(use_wrapper=XDUMMY_WRAPPER, log_dir=get_default_log_dir())
    else:
        xvfb = get_Xvfb_command()
    def addtrailingslash(v):
        if v.endswith("/"):
            return v
        return v+"/"
    if WIN32:
        bind_dirs = []
    else:
        bind_dirs = [addtrailingslash(get_socket_dirs()[0])]

    GLOBAL_DEFAULTS = {
                    "encoding"          : "",
                    "title"             : "@title@ on @client-machine@",
                    "username"          : username,
                    "auth"              : "",
                    "vsock-auth"        : "",
                    "tcp-auth"          : "",
                    "wm-name"           : DEFAULT_NET_WM_NAME,
                    "session-name"      : "",
                    "dock-icon"         : "",
                    "tray-icon"         : "",
                    "window-icon"       : "",
                    "password-file"     : "",
                    "clipboard"         : "yes",
                    "clipboard-filter-file" : "",
                    "remote-clipboard"  : "CLIPBOARD",
                    "local-clipboard"   : "CLIPBOARD",
                    "pulseaudio-command": " ".join(DEFAULT_PULSEAUDIO_COMMAND),
                    "encryption"        : "",
                    "tcp-encryption"    : "",
                    "encryption-keyfile": "",
                    "tcp-encryption-keyfile": "",
                    "ssh"               : DEFAULT_SSH_COMMAND,
                    "xvfb"              : " ".join(xvfb),
                    "socket-dir"        : "",
                    "log-dir"           : get_default_log_dir(),
                    "log-file"          : "$DISPLAY.log",
                    "border"            : "auto,5:off",
                    "window-close"      : "auto",
                    "max-size"          : "",
                    "desktop-scaling"   : "auto",
                    "display"           : "",
                    "tcp-proxy"         : "",
                    "download-path"     : get_download_dir(),
                    "open-command"      : OPEN_COMMAND,
                    "remote-logging"    : "both",
                    "lpadmin"           : "/usr/sbin/lpadmin",
                    "lpinfo"            : "/usr/sbin/lpinfo",
                    "pdf-printer"       : "",
                    "postscript-printer": "",
                    "debug"             : "",
                    "input-method"      : "none",
                    "sound-source"      : "",
                    "html"              : "",
                    "socket-permissions": "600",
                    "exec-wrapper"      : "",
                    "dbus-launch"       : "dbus-launch --close-stderr",
                    "webcam"            : "auto",
                    "quality"           : 0,
                    "min-quality"       : 30,
                    "speed"             : 0,
                    "min-speed"         : 30,
                    "compression_level" : 1,
                    "dpi"               : 0,
                    "video-scaling"     : 1,
                    "file-size-limit"   : 10,
                    "idle-timeout"      : 0,
                    "server-idle-timeout" : 0,
                    "sync-xvfb"         : 0,
                    "auto-refresh-delay": 0.15,
                    "daemon"            : CAN_DAEMONIZE,
                    "use-display"       : False,
                    "displayfd"         : DISPLAYFD,
                    "fake-xinerama"     : not OSX and not WIN32,
                    "resize-display"    : not OSX and not WIN32,
                    "tray"              : True,
                    "pulseaudio"        : not OSX and not WIN32,
                    "dbus-proxy"        : not OSX and not WIN32,
                    "mmap"              : ["off", "on"][not OSX and not WIN32],
                    "mmap-group"        : False,
                    "speaker"           : ["disabled", "on"][has_sound_support],
                    "microphone"        : ["disabled", "off"][has_sound_support],
                    "readonly"          : False,
                    "keyboard-sync"     : True,
                    "pings"             : False,
                    "cursors"           : True,
                    "bell"              : True,
                    "notifications"     : True,
                    "xsettings"         : not OSX and not WIN32,
                    "system-tray"       : True,
                    "sharing"           : False,
                    "delay-tray"        : False,
                    "windows"           : True,
                    "exit-with-children": False,
                    "exit-with-client"  : False,
                    "start-after-connect": False,
                    "start-new-commands": False,
                    "av-sync"           : True,
                    "exit-ssh"          : True,
                    "dbus-control"      : not WIN32 and not OSX,
                    "opengl"            : OPENGL_DEFAULT,
                    "mdns"              : not WIN32,
                    "file-transfer"     : True,
                    "printing"          : True,
                    "open-files"        : False,
                    "swap-keys"         : OSX,  #only used on osx
                    "shadow-fullscreen" : False,
                    "global-menus"      : True,
                    "pulseaudio-configure-commands"  : [" ".join(x) for x in DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS],
                    "socket-dirs"       : [],
                    "remote-xpra"       : get_remote_run_xpra_scripts(),
                    "encodings"         : ["all"],
                    "video-encoders"    : ["all"],
                    "csc-modules"       : ["all"],
                    "video-decoders"    : ["all"],
                    "speaker-codec"     : [],
                    "microphone-codec"  : [],
                    "compressors"       : ["all"],
                    "packet-encoders"   : ["all"],
                    "key-shortcut"      : get_default_key_shortcuts(),
                    "bind"              : bind_dirs,
                    "bind-vsock"        : [],
                    "bind-tcp"          : [],
                    "start"             : [],
                    "start-child"       : [],
                    "start-after-connect"       : [],
                    "start-child-after-connect" : [],
                    "start-on-connect"          : [],
                    "start-child-on-connect"    : [],
                    "env"               : DEFAULT_ENV,
                    }
    return GLOBAL_DEFAULTS
示例#3
0
文件: config.py 项目: svn2github/Xpra
def get_defaults():
    global GLOBAL_DEFAULTS
    if GLOBAL_DEFAULTS is not None:
        return GLOBAL_DEFAULTS
    from xpra.platform.features import DEFAULT_SSH_COMMAND, OPEN_COMMAND, DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS, DEFAULT_PULSEAUDIO_COMMAND, \
                                        DEFAULT_ENV, CAN_DAEMONIZE
    from xpra.platform.paths import get_download_dir, get_remote_run_xpra_scripts
    try:
        from xpra.platform.info import get_username
        username = get_username()
    except:
        username = ""
    conf_dirs = [os.environ.get("XPRA_CONF_DIR")]
    build_root = os.environ.get("RPM_BUILD_ROOT")
    if build_root:
        conf_dirs.append(os.path.join(build_root, "etc", "xpra"))
    xpra_cmd = sys.argv[0]
    bin_dir = None
    if len(sys.argv)>0:
        for strip in ("/usr/bin", "/bin"):
            pos = xpra_cmd.find(strip)
            if pos>=0:
                bin_dir = xpra_cmd[:pos+len(strip)]
                root = xpra_cmd[:pos] or "/"
                conf_dirs.append(os.path.join(root, "etc", "xpra"))
                break
    if sys.prefix=="/usr":
        conf_dirs.append("/etc/xpra")
    else:
        conf_dirs.append(os.path.join(sys.prefix, "etc", "xpra"))
    for conf_dir in [x for x in conf_dirs if x]:
        if os.path.exists(conf_dir):
            break
    xvfb = detect_xvfb_command(conf_dir, bin_dir)
    def addtrailingslash(v):
        if v.endswith("/"):
            return v
        return v+"/"
    if WIN32:
        bind_dirs = ["Main"]
    else:
        bind_dirs = ["auto"]

    ssl_protocol = "TLSv1_2"
    if sys.version_info<(2, 7, 9):
        ssl_protocol = "SSLv23"

    GLOBAL_DEFAULTS = {
                    "encoding"          : "",
                    "title"             : "@title@ on @client-machine@",
                    "username"          : username,
                    "password"          : "",
                    "auth"              : "",
                    "vsock-auth"        : "",
                    "tcp-auth"          : "",
                    "ssl-auth"          : "",
                    "wm-name"           : DEFAULT_NET_WM_NAME,
                    "session-name"      : "",
                    "dock-icon"         : "",
                    "tray-icon"         : "",
                    "window-icon"       : "",
                    "password-file"     : "",
                    "keyboard-raw"      : False,
                    "keyboard-layout"   : "",
                    "keyboard-layouts"  : [],
                    "keyboard-variant"  : "",
                    "keyboard-variants" : [],
                    "keyboard-options"  : "",
                    "clipboard"         : "yes",
                    "clipboard-direction" : "both",
                    "clipboard-filter-file" : "",
                    "remote-clipboard"  : "CLIPBOARD",
                    "local-clipboard"   : "CLIPBOARD",
                    "pulseaudio-command": " ".join(DEFAULT_PULSEAUDIO_COMMAND),
                    "encryption"        : "",
                    "tcp-encryption"    : "",
                    "encryption-keyfile": "",
                    "tcp-encryption-keyfile": "",
                    "pidfile"           : "",
                    "ssh"               : DEFAULT_SSH_COMMAND,
                    "systemd-run"       : get_default_systemd_run(),
                    "systemd-run-args"  : "",
                    "xvfb"              : " ".join(xvfb),
                    "socket-dir"        : "",
                    "log-dir"           : "auto",
                    "log-file"          : "$DISPLAY.log",
                    "border"            : "auto,5:off",
                    "window-close"      : "auto",
                    "max-size"          : "",
                    "desktop-scaling"   : "auto",
                    "display"           : "",
                    "tcp-proxy"         : "",
                    "download-path"     : get_download_dir(),
                    "open-command"      : OPEN_COMMAND,
                    "remote-logging"    : "both",
                    "lpadmin"           : "/usr/sbin/lpadmin",
                    "lpinfo"            : "/usr/sbin/lpinfo",
                    "add-printer-options" : ["-E", "-o printer-is-shared=false", "-u allow:$USER"],
                    "pdf-printer"       : "",
                    "postscript-printer": DEFAULT_POSTSCRIPT_PRINTER,
                    "debug"             : "",
                    "input-method"      : "none",
                    "sound-source"      : "",
                    "html"              : "auto",
                    "socket-permissions": "600",
                    "exec-wrapper"      : "",
                    "dbus-launch"       : "dbus-launch --close-stderr",
                    "webcam"            : ["auto", "no"][OSX],
                    #ssl options:
                    "ssl"               : "auto",
                    "ssl-key"           : "",
                    "ssl-cert"          : "",
                    "ssl-protocol"      : ssl_protocol,
                    "ssl-ca-certs"      : "default",
                    "ssl-ca-data"       : "",
                    "ssl-ciphers"       : "DEFAULT",
                    "ssl-client-verify-mode"   : "optional",
                    "ssl-server-verify-mode"   : "required",
                    "ssl-verify-flags"  : "X509_STRICT",
                    "ssl-check-hostname": False,
                    "ssl-server-hostname": "localhost",
                    "ssl-options"       : "ALL,NO_COMPRESSION",
                    "quality"           : 0,
                    "min-quality"       : 30,
                    "speed"             : 0,
                    "min-speed"         : 30,
                    "compression_level" : 1,
                    "dpi"               : 0,
                    "video-scaling"     : 1,
                    "file-size-limit"   : 100,
                    "idle-timeout"      : 0,
                    "server-idle-timeout" : 0,
                    "sync-xvfb"         : 0,
                    "auto-refresh-delay": 0.15,
                    "daemon"            : CAN_DAEMONIZE,
                    "use-display"       : False,
                    "fake-xinerama"     : not OSX and not WIN32,
                    "resize-display"    : not OSX and not WIN32,
                    "tray"              : True,
                    "pulseaudio"        : not OSX and not WIN32,
                    "dbus-proxy"        : not OSX and not WIN32,
                    "mmap"              : ["no", "yes"][not OSX and not WIN32],
                    "mmap-group"        : False,
                    "speaker"           : ["disabled", "on"][has_sound_support()],
                    "microphone"        : ["disabled", "off"][has_sound_support()],
                    "readonly"          : False,
                    "keyboard-sync"     : True,
                    "pings"             : False,
                    "cursors"           : True,
                    "bell"              : True,
                    "notifications"     : True,
                    "xsettings"         : not OSX and not WIN32,
                    "system-tray"       : True,
                    "sharing"           : False,
                    "delay-tray"        : False,
                    "windows"           : True,
                    "exit-with-children": False,
                    "exit-with-client"  : False,
                    "start-after-connect": False,
                    "start-new-commands": False,
                    "proxy-start-sessions": True,
                    "av-sync"           : True,
                    "exit-ssh"          : True,
                    "dbus-control"      : not WIN32 and not OSX,
                    "opengl"            : get_opengl_default(),
                    "mdns"              : not WIN32,
                    "file-transfer"     : True,
                    "printing"          : True,
                    "open-files"        : False,
                    "swap-keys"         : OSX,  #only used on osx
                    "desktop-fullscreen": False,
                    "global-menus"      : True,
                    "pulseaudio-configure-commands"  : [" ".join(x) for x in DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS],
                    "socket-dirs"       : [],
                    "remote-xpra"       : get_remote_run_xpra_scripts(),
                    "encodings"         : ["all"],
                    "proxy-video-encoders" : [],
                    "video-encoders"    : ["all"],
                    "csc-modules"       : ["all"],
                    "video-decoders"    : ["all"],
                    "speaker-codec"     : [],
                    "microphone-codec"  : [],
                    "compressors"       : ["all"],
                    "packet-encoders"   : ["all"],
                    "key-shortcut"      : get_default_key_shortcuts(),
                    "bind"              : bind_dirs,
                    "bind-vsock"        : [],
                    "bind-tcp"          : [],
                    "bind-ssl"          : [],
                    "start"             : [],
                    "start-child"       : [],
                    "start-after-connect"       : [],
                    "start-child-after-connect" : [],
                    "start-on-connect"          : [],
                    "start-child-on-connect"    : [],
                    "start-env"         : DEFAULT_ENV,
                    "env"               : [],
                    }
    return GLOBAL_DEFAULTS
示例#4
0
def get_defaults():
    global GLOBAL_DEFAULTS
    if GLOBAL_DEFAULTS is not None:
        return GLOBAL_DEFAULTS
    from xpra.platform.features import DEFAULT_SSH_COMMAND, OPEN_COMMAND, DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS, DEFAULT_PULSEAUDIO_COMMAND, XDUMMY, XDUMMY_WRAPPER, DISPLAYFD, DEFAULT_ENV, CAN_DAEMONIZE
    from xpra.platform.paths import get_download_dir, get_default_log_dir, get_socket_dirs, get_remote_run_xpra_scripts
    try:
        from xpra.platform.info import get_username
        username = get_username()
    except:
        username = ""
    if WIN32 or OSX or PYTHON3:
        xvfb = ""
    elif XDUMMY:
        xvfb = get_Xdummy_command(use_wrapper=XDUMMY_WRAPPER, log_dir=get_default_log_dir())
    else:
        xvfb = get_Xvfb_command()
    def addtrailingslash(v):
        if v.endswith("/"):
            return v
        return v+"/"
    if WIN32:
        bind_dirs = []
    else:
        bind_dirs = [addtrailingslash(get_socket_dirs()[0])]

    GLOBAL_DEFAULTS = {
                    "encoding"          : "",
                    "title"             : "@title@ on @client-machine@",
                    "username"          : username,
                    "auth"              : "",
                    "vsock-auth"        : "",
                    "tcp-auth"          : "",
                    "wm-name"           : DEFAULT_NET_WM_NAME,
                    "session-name"      : "",
                    "dock-icon"         : "",
                    "tray-icon"         : "",
                    "window-icon"       : "",
                    "password-file"     : "",
                    "clipboard"         : "yes",
                    "clipboard-filter-file" : "",
                    "remote-clipboard"  : "CLIPBOARD",
                    "local-clipboard"   : "CLIPBOARD",
                    "pulseaudio-command": " ".join(DEFAULT_PULSEAUDIO_COMMAND),
                    "encryption"        : "",
                    "tcp-encryption"    : "",
                    "encryption-keyfile": "",
                    "tcp-encryption-keyfile": "",
                    "ssh"               : DEFAULT_SSH_COMMAND,
                    "xvfb"              : " ".join(xvfb),
                    "socket-dir"        : "",
                    "log-dir"           : get_default_log_dir(),
                    "log-file"          : "$DISPLAY.log",
                    "border"            : "auto,5:off",
                    "window-close"      : "auto",
                    "max-size"          : "",
                    "desktop-scaling"   : "auto",
                    "display"           : "",
                    "tcp-proxy"         : "",
                    "download-path"     : get_download_dir(),
                    "open-command"      : OPEN_COMMAND,
                    "remote-logging"    : "both",
                    "lpadmin"           : "/usr/sbin/lpadmin",
                    "lpinfo"            : "/usr/sbin/lpinfo",
                    "pdf-printer"       : "",
                    "postscript-printer": "",
                    "debug"             : "",
                    "input-method"      : "none",
                    "sound-source"      : "",
                    "html"              : "",
                    "socket-permissions": "600",
                    "exec-wrapper"      : "",
                    "dbus-launch"       : "dbus-launch --close-stderr",
                    "webcam"            : "auto",
                    "quality"           : 0,
                    "min-quality"       : 30,
                    "speed"             : 0,
                    "min-speed"         : 30,
                    "compression_level" : 1,
                    "dpi"               : 0,
                    "video-scaling"     : 1,
                    "file-size-limit"   : 10,
                    "idle-timeout"      : 0,
                    "server-idle-timeout" : 0,
                    "sync-xvfb"         : 0,
                    "auto-refresh-delay": 0.15,
                    "daemon"            : CAN_DAEMONIZE,
                    "use-display"       : False,
                    "displayfd"         : DISPLAYFD,
                    "fake-xinerama"     : not OSX and not WIN32,
                    "resize-display"    : not OSX and not WIN32,
                    "tray"              : True,
                    "pulseaudio"        : not OSX and not WIN32,
                    "dbus-proxy"        : not OSX and not WIN32,
                    "mmap"              : not OSX and not WIN32,
                    "mmap-group"        : False,
                    "speaker"           : ["disabled", "on"][has_sound_support],
                    "microphone"        : ["disabled", "off"][has_sound_support],
                    "readonly"          : False,
                    "keyboard-sync"     : True,
                    "pings"             : False,
                    "cursors"           : True,
                    "bell"              : True,
                    "notifications"     : True,
                    "xsettings"         : not OSX and not WIN32,
                    "system-tray"       : True,
                    "sharing"           : False,
                    "delay-tray"        : False,
                    "windows"           : True,
                    "exit-with-children": False,
                    "exit-with-client"  : False,
                    "start-after-connect": False,
                    "start-new-commands": False,
                    "av-sync"           : True,
                    "exit-ssh"          : True,
                    "dbus-control"      : not WIN32 and not OSX,
                    "opengl"            : OPENGL_DEFAULT,
                    "mdns"              : not WIN32,
                    "file-transfer"     : True,
                    "printing"          : True,
                    "open-files"        : False,
                    "swap-keys"         : OSX,  #only used on osx
                    "shadow-fullscreen" : False,
                    "global-menus"      : True,
                    "pulseaudio-configure-commands"  : [" ".join(x) for x in DEFAULT_PULSEAUDIO_CONFIGURE_COMMANDS],
                    "socket-dirs"       : [],
                    "remote-xpra"       : get_remote_run_xpra_scripts(),
                    "encodings"         : ["all"],
                    "video-encoders"    : ["all"],
                    "csc-modules"       : ["all"],
                    "video-decoders"    : ["all"],
                    "speaker-codec"     : [],
                    "microphone-codec"  : [],
                    "compressors"       : ["all"],
                    "packet-encoders"   : ["all"],
                    "key-shortcut"      : get_default_key_shortcuts(),
                    "bind"              : bind_dirs,
                    "bind-vsock"        : [],
                    "bind-tcp"          : [],
                    "start"             : [],
                    "start-child"       : [],
                    "start-after-connect"       : [],
                    "start-child-after-connect" : [],
                    "start-on-connect"          : [],
                    "start-child-on-connect"    : [],
                    "env"               : DEFAULT_ENV,
                    }
    return GLOBAL_DEFAULTS