Exemple #1
0
# This file is part of Xpra.
# Copyright (C) 2010 Nathaniel Smith <*****@*****.**>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import sys

#don't bother trying to forward system tray with Ubuntu's "unity":
from xpra.os_util import is_unity, is_Ubuntu, is_Fedora
SYSTEM_TRAY_SUPPORTED = not is_unity()
#this is only our best guess
#there is more logic in setup.py, but it requires more effort too:
XDUMMY = not is_Ubuntu() and not sys.platform.find("bsd") >= 0
#displayfd requires Xdummy, and we don't support servers with py3k:
DISPLAYFD = XDUMMY and sys.version_info[0] < 3
XDUMMY_WRAPPER = is_Fedora()

DEFAULT_ENV = [
    "#avoid Ubuntu's global menu, which is a mess and cannot be forwarded:",
    "UBUNTU_MENUPROXY=",
    "QT_X11_NO_NATIVE_MENUBAR=1",
    "#fix for MainSoft's MainWin buggy window management:",
    "MWNOCAPTURE=true",
    "MWNO_RIT=true",
    "MWWM=allwm",
    "#force GTK3 applications to use X11 so we can intercept them:",
    "GDK_BACKEND=x11",
]

DEFAULT_SSH_CMD = "ssh"
CLIPBOARDS = ["CLIPBOARD", "PRIMARY", "SECONDARY"]
Exemple #2
0
# This file is part of Xpra.
# Copyright (C) 2010 Nathaniel Smith <*****@*****.**>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import sys

#don't bother trying to forward system tray with Ubuntu's "unity":
from xpra.os_util import is_unity, is_Ubuntu, is_Fedora
SYSTEM_TRAY_SUPPORTED = not is_unity()
#this is only our best guess
#there is more logic in setup.py, but it requires more effort too:
XDUMMY = not is_Ubuntu()
#displayfd requires Xdummy, and we don't support servers with py3k:
DISPLAYFD = XDUMMY and sys.version_info[0]<3
XDUMMY_WRAPPER = is_Fedora()

DEFAULT_ENV = [
             "#avoid Ubuntu's global menu, which is a mess and cannot be forwarded:",
             "UBUNTU_MENUPROXY=",
             "QT_X11_NO_NATIVE_MENUBAR=1",
             "#fix for MainSoft's MainWin buggy window management:",
             "MWNOCAPTURE=true",
             "MWNO_RIT=true",
             "MWWM=allwm",
             ]

DEFAULT_SSH_CMD = "ssh"
CLIPBOARDS=["CLIPBOARD", "PRIMARY", "SECONDARY"]
Exemple #3
0
def can_use_appindicator():
    return get_appindicator() is not None and is_unity()
Exemple #4
0
        if is_X11():
            try:
                from xpra.x11.bindings.xi2_bindings import X11XI2Bindings as _X11XI2Bindings  #@UnresolvedImport
                X11XI2 = _X11XI2Bindings()
            except Exception:
                log.error("no XI2 bindings", exc_info=True)
    return X11XI2


device_bell = None
GTK_MENUS = envbool("XPRA_GTK_MENUS", False)
RANDR_DPI = envbool("XPRA_RANDR_DPI", True)
XSETTINGS_DPI = envbool("XPRA_XSETTINGS_DPI", True)
USE_NATIVE_TRAY = envbool(
    "XPRA_USE_NATIVE_TRAY",
    is_unity() or (is_gnome() and not is_Fedora()) or is_kde())
XINPUT_WHEEL_DIV = envint("XPRA_XINPUT_WHEEL_DIV", 15)
DBUS_SCREENSAVER = envbool("XPRA_DBUS_SCREENSAVER", False)


def get_xwindow(win):
    from xpra.gtk_common.gtk_util import get_xwindow as _get_xwindow
    return _get_xwindow(win)


def gl_check():
    if not is_X11() and is_Wayland():
        return "disabled under wayland with GTK3 (buggy)"
    return None

Exemple #5
0
 def test_de(self):
     is_unity()
     is_gnome()
     is_kde()
Exemple #6
0
X11WindowBindings = None
X11XI2Bindings = None
if is_X11():
    try:
        from xpra.x11.bindings.window_bindings import X11WindowBindings #@UnresolvedImport
        from xpra.x11.bindings.xi2_bindings import X11XI2Bindings       #@UnresolvedImport
    except Exception as e:
        log.error("no X11 bindings", exc_info=True)
        del e

device_bell = None
GTK_MENUS = envbool("XPRA_GTK_MENUS", False)
RANDR_DPI = envbool("XPRA_RANDR_DPI", True)
XSETTINGS_DPI = envbool("XPRA_XSETTINGS_DPI", True)
USE_NATIVE_TRAY = envbool("XPRA_USE_NATIVE_TRAY", is_unity() or (is_gnome() and not is_Fedora()) or is_kde())
XINPUT_WHEEL_DIV = envint("XPRA_XINPUT_WHEEL_DIV", 15)
DBUS_SCREENSAVER = envbool("XPRA_DBUS_SCREENSAVER", False)


def gl_check():
    if not is_X11() and is_Wayland():
        return "disabled under wayland with GTK3 (buggy)"
    return None


def get_native_system_tray_classes():
    return []

def get_wm_name():
    wm_name = os.environ.get("XDG_CURRENT_DESKTOP", "")
Exemple #7
0
        if is_X11():
            try:
                from xpra.x11.bindings.xi2_bindings import X11XI2Bindings as _X11XI2Bindings  #@UnresolvedImport
                X11XI2 = _X11XI2Bindings()
            except Exception:
                log.error("no XI2 bindings", exc_info=True)
    return X11XI2


device_bell = None
GTK_MENUS = envbool("XPRA_GTK_MENUS", False)
RANDR_DPI = envbool("XPRA_RANDR_DPI", True)
XSETTINGS_DPI = envbool("XPRA_XSETTINGS_DPI", True)
USE_NATIVE_TRAY = envbool(
    "XPRA_USE_NATIVE_TRAY",
    is_unity() or (is_Ubuntu() and is_gnome())
    or (is_gnome() and not is_Fedora()) or is_kde())
XINPUT_WHEEL_DIV = envint("XPRA_XINPUT_WHEEL_DIV", 15)
DBUS_SCREENSAVER = envbool("XPRA_DBUS_SCREENSAVER", False)


def gl_check():
    if not is_X11() and is_Wayland():
        return "disabled under wayland with GTK3 (buggy)"
    return None


def get_native_system_tray_classes():
    return []