예제 #1
0
def find_libfakeXinerama():
    libname = "fakeXinerama"
    try:
        from ctypes.util import find_library
        flibname = find_library("fakeXinerama")
        if flibname:
            libname = flibname
    except Exception:
        pass
    if POSIX:
        for lib_dir in os.environ.get("LD_LIBRARY_PATH",
                                      "/usr/lib").split(os.pathsep):
            lib_path = os.path.join(lib_dir, libname)
            if not os.path.exists(lib_dir):
                continue
            if os.path.exists(lib_path) and os.path.isfile(lib_path):
                return lib_path
    if LINUX:
        try:
            libpath = find_lib_ldconfig("fakeXinerama")
            if libpath:
                return libpath
        except Exception as e:
            log("find_libfakeXinerama()", exc_info=True)
            log.error(
                "Error: cannot launch ldconfig -p to locate libfakeXinerama:")
            log.error(" %s", e)
    return find_lib(libname)
예제 #2
0
파일: fakeXinerama.py 프로젝트: ljmljz/xpra
def find_libfakeXinerama():
    if sys.platform.startswith("linux"):
        try:
            libpath = find_lib_ldconfig("fakeXinerama")
            if libpath:
                return libpath
        except Exception as e:
            log.warn("Failed to launch ldconfig -p: %s", e)
    return find_lib("libfakeXinerama.so.1")
예제 #3
0
def find_libfakeXinerama():
    if LINUX:
        try:
            libpath = find_lib_ldconfig("fakeXinerama")
            if libpath:
                return libpath
        except Exception as e:
            log.warn("Failed to launch ldconfig -p: %s", e)
    return find_lib("libfakeXinerama.so.1")
예제 #4
0
def find_libfakeXinerama():
    if sys.platform.startswith("linux"):
        try:
            libpath = find_lib_ldconfig("fakeXinerama")
            if libpath:
                return libpath
        except Exception as e:
            log.warn("Failed to launch ldconfig -p: %s", e)
    return find_lib("libfakeXinerama.so.1")
예제 #5
0
def find_libfakeXinerama():
    if LINUX:
        try:
            libpath = find_lib_ldconfig("fakeXinerama")
            if libpath:
                return libpath
        except Exception as e:
            log.error(
                "Error: cannot launch ldconfig -p to locate libfakeXinerama:")
            log.error(" %s", e)
    return find_lib("libfakeXinerama.so.1")