xpra icon
Bug tracker and wiki

Changes in tags/v0.17.x [12925:27514] in xpra


Ignore:
Location:
tags/v0.17.x
Files:
2 deleted
74 edited

Legend:

Unmodified
Added
Removed
  • tags/v0.17.x/debian/changelog

    r12925 r27514  
     1xpra (0.17.6-1) UNRELEASED; urgency=low
     2  * fix for Ubuntu frame extents bug
     3
     4 -- Antoine Martin <antoine@nagafix.co.uk>  Sun, 30 Oct 2016 16:59:13 +0700
     5
     6xpra (0.17.6-1) UNRELEASED; urgency=low
     7  * fix server-side av-sync queue level accounting
     8  * fix system lockups with Nvidia Pascal GPUs
     9  * fix osx log directory lookup for shadow servers
     10  * fix win32 system authentication for shadow servers
     11  * fix pycups errors with non string options
     12  * fix for GTK3: force X11 backend
     13  * fix yaml missing version
     14  * fix missing lzo with OSX builds
     15  * fix osx bug report tool command
     16  * fix osx build stripping
     17  * fix clang builds (ignore warning from cython generated code)
     18  * fix build failures when nvcc is on the PATH
     19  * fix race condition in authentication handling (mostly harmless)
     20  * fix logging error in fakexinerama error handler
     21  * fix desktop scaling reset (was rounding)
     22  * fix file transfer via control channel command
     23  * fix handling of fatal errors when there are no socket directories
     24  * fix pulseaudio process tagging
     25  * fix proxy server when running on Python 2.6 and older glib versions
     26  * fix proxy packet re-compression, server type exported
     27  * fix minor debug logging error, avoid a spurious refresh warning
     28  * fix read-only mode command line parsing and tray menu errors
     29  * fix video encoding failures when video automatic scaling changes
     30  * fix hidden launcher bug on OSX with connection files
     31  * fix non-X11 servers image corruption
     32  * fix MS Windows and OSX build compatibility with OpenSSL 1.1
     33  * fix video region detection dbus API
     34  * fix compilation with older versions of Cython
     35  * fix avoid crash with older versions of python-netifaces
     36  * fix stuck sound processes, use force exit if needed
     37  * fix disabled video region flag not honoured
     38  * fix stuck key modifiers when window loses focus
     39  * fix proxy hello data format
     40  * fix proxy authentication errors, add missing xpra info
     41  * fix display not honoured when connecting to a proxy
     42  * fix proxy failures with a single display detected more than once
     43  * fix proxy IO thread timeouts
     44  * fix authentication salt and hash handling (size and sanity checks)
     45  * fix some system authentication modules
     46
     47 -- Antoine Martin <antoine@nagafix.co.uk>  Fri, 28 Oct 2016 12:23:44 +0700
     48
     49xpra (0.17.5-2) UNRELEASED; urgency=low
     50  * force rebuild
     51
     52 -- Antoine Martin <antoine@nagafix.co.uk>  Thu, 25 Aug 2016 12:48:04 +0700
     53
     54xpra (0.17.5-1) UNRELEASED; urgency=low
     55  * fix sound codec order: prevent incompatibilities with gdp payloader
     56  * fix internal error with some values for the window title option
     57  * fix crash on FreeBSD caused by buggy netifaces package
     58  * fix strict build on FreeBSD, use correct Xvfb command
     59  * fix video region statistics not correctly reset
     60  * fix OSX PKG installation errors on El Capitan and later
     61  * fix OSX installation warnings
     62  * fix X11 keyboard layout setup code corner case handling
     63  * fix VP9 speed setting to prevent excruciatingly slow compression
     64  * fix honour socket-dirs value found in configuration files
     65  * fix Fedora 25+ builds hanging during printer probing
     66  * fix unnecessary delay in network layer of MS Windows clients
     67  * fix xvid encoder debug overlay (now only enabled with debugging)
     68  * fix x265 compilation with python3
     69  * fix cursor errors with no data to send
     70  * fix v4l2 module build on older platforms, add missing build switch
     71  * fix CentOS 7.1 cryptography packaging dependency
     72  * fix misleading cryptography import error message
     73  * fix logging loops with 'network' and 'crypto' debug flags
     74  * fix spurious sound log messages on some platforms (ie: CentOS 6.x)
     75  * fix webcam spurious warnings when already disabled
     76  * fix webcam skewed picture
     77  * fix size calculations for the 1 pixel bottom edge of video areas
     78  * fix heavy import with side effects for shadow servers
     79  * fix MS Windows shadow servers picture corruption
     80  * fix jpeg wrongly included in auto-refresh encodings
     81  * fix compatibility with ffmpeg 3.1+, warn but don't fail
     82  * fix socket-dir option not being honoured
     83  * fix log dir in commented out Xvfb example
     84  * fix build on some non US locales
     85
     86 -- Antoine Martin <antoine@nagafix.co.uk>  Wed, 24 Aug 2016 12:57:37 +0700
     87
    188xpra (0.17.4-1) UNRELEASED; urgency=low
    289  * fix severe regression in damage handling
  • tags/v0.17.x/debian/control

    r12925 r27514  
    3434#wily:        ,xvfb
    3535#xenial:        ,xvfb
     36#yakkety:        ,xserver-xorg-video-dummy
    3637# for opengl support:
    3738        ,python-gtkglext1
     
    4950#wily:        ,python-lz4
    5051#xenial:        ,python-lz4
     52#yakkety:        ,python-lz4
    5153#if you use Ubuntu, you will "want" this mess:
    5254#trusty:        ,python-appindicator
    5355#wily:        ,python-appindicator
    5456#xenial:        ,python-appindicator
     57#yakkety:        ,python-appindicator
    5558Recommends:
    5659#version specific values (sigh), uncomment the one you need:
     
    6568#trusty:        ,libx264-142
    6669#wily:        ,libx264-148
     70#yakkety:        ,libx264-148
    6771        ,libxvidcore4
    6872#webp
     
    7175#trusty:        ,libwebp5
    7276#wily:        ,libwebp5
     77#yakkety:        ,libwebp5
    7378#AES encryption:
    7479#jessie:        ,python-cryptography
     
    7782#wily:        ,python-cryptography
    7883#xenial:        ,python-cryptography
     84#yakkety:        ,python-cryptography
    7985# audio-related:
    8086        ,gstreamer1.0-plugins-base
     
    96102#wily:        ,python-lzo
    97103#xenial:        ,python-lzo
     104#yakkety:        ,python-lzo
    98105#for html5 support:
    99106#jessie:        ,websockify
  • tags/v0.17.x/osx/Helpers/Bug_Report

    r12925 r27514  
    66PYTHON="$full_path/PythonExecWrapper"
    77
    8 exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.client.gtk_base.bug_report import main;main()" "$@"
     8exec "$PYTHON" "$exe_name" -c "import sys;sys.argv[0]=\"$full_path/$exe_name\";from xpra.scripts.bug_report import main;main()" "$@"
  • tags/v0.17.x/osx/Info.plist

    r12925 r27514  
    1212        <string>Xpra</string>
    1313        <key>CFBundleGetInfoString</key>
    14         <string>0.17.4, (c) 2012-2016 http://xpra.org/</string>
     14        <string>0.17.6, (c) 2012-2016 http://xpra.org/</string>
    1515        <key>CFBundleIconFile</key>
    1616        <string>xpra.icns</string>
     
    2222        <string>APPL</string>
    2323        <key>CFBundleShortVersionString</key>
    24         <string>0.17.4</string>
     24        <string>0.17.6</string>
    2525        <key>CFBundleSignature</key>
    2626        <string>????</string>
    2727        <key>CFBundleVersion</key>
    28         <string>0.17.4</string>
     28        <string>0.17.6</string>
    2929        <key>NSHumanReadableCopyright</key>
    3030        <string>Copyright 2012-2016 Antoine Martin antoine@devloop.org.uk, GNU General Public License.</string>
  • tags/v0.17.x/osx/Xpra.bundle

    r12925 r27514  
    8383        </binary>
    8484        <binary>
     85                ${prefix}/lib/liblzo*.dylib
     86        </binary>
     87        <binary>
    8588                ${prefix}/lib/libssl*.dylib
    8689        </binary>
  • tags/v0.17.x/osx/Xpra_NoDock.app/Contents/Info.plist

    r12925 r27514  
    1212        <string>Xpra Without Tray</string>
    1313        <key>CFBundleGetInfoString</key>
    14         <string>0.17.4, (c) 2012-2016 http://xpra.org/</string>
     14        <string>0.17.6, (c) 2012-2016 http://xpra.org/</string>
    1515        <key>CFBundleIconFile</key>
    1616        <string>xpra.icns</string>
     
    3838        <string>Xpra</string>
    3939</dict>
     40</plist>
  • tags/v0.17.x/osx/make-app.sh

    r12925 r27514  
    33STRIP_DEFAULT="${STRIP_DEFAULT:=1}"
    44STRIP_GSTREAMER_PLUGINS="${STRIP_GSTREAMER_PLUGINS:=$STRIP_DEFAULT}"
    5 STRIP_SOURCE="${STRIP_SOURCE:$STRIP_DEFAULT}"
    6 STRIP_OPENGL="${STRIP_OPENGL:$STRIP_DEFAULT}"
    7 STRIP_NUMPY="${STRIP_NUMPY:$STRIP_DEFAULT}"
     5STRIP_SOURCE="${STRIP_SOURCE:=$STRIP_DEFAULT}"
     6STRIP_OPENGL="${STRIP_OPENGL:=$STRIP_DEFAULT}"
     7STRIP_NUMPY="${STRIP_NUMPY:=$STRIP_DEFAULT}"
    88
    99IMAGE_DIR="./image/Xpra.app"
     
    144144        find $LIBDIR/python/xpra/ -name "$x" -print -exec rm "{}" \; | sed "s+$LIBDIR/python/xpra/++g" | xargs -L 1 echo "* "
    145145done
    146 
    147 if [ "$STRIP_SOURCE" == "1" ]; then
    148         echo "removing py if we have the pyc:"
    149         #only remove ".py" source if we have a binary ".pyc" for it:
    150         for x in `find $LIBDIR/python/xpra -name "*.py" -type f`; do
    151                 d="`dirname $x`"
    152                 f="`basename $x`"
    153                 if [ -r "$d/${f}c" ]; then
    154                         echo "* $x"
    155                         rm "$x"
    156                 fi
    157         done
    158 fi
    159146
    160147
     
    215202        popd
    216203fi
     204
     205
     206if [ "$STRIP_SOURCE" == "1" ]; then
     207        echo "removing py if we have the pyc:"
     208        #only remove ".py" source if we have a binary ".pyc" for it:
     209        for x in `find $LIBDIR -name "*.py" -type f`; do
     210                d="`dirname $x`"
     211                f="`basename $x`"
     212                if [ -r "$d/${f}c" ]; then
     213                        #echo "* $x"
     214                        rm "${x}"
     215                fi
     216        done
     217fi
     218
    217219
    218220#gst bits expect to find dylibs in Frameworks!?
  • tags/v0.17.x/osx/postinstall

    r12925 r27514  
    22# this script will:
    33# * fix cups backend permissions which are not preserved:
    4 # * add scripts in /usr/bin to launch the xpra commands
     4# * add scripts in /usr/local/bin to launch the xpra commands
    55
    66chown root:wheel /usr/libexec/cups/backend/xpraforwarder
     
    1010APP_ROOT="/Applications/Xpra.app"
    1111if [ -d "$APP_ROOT" ]; then
     12        if [ ! -e "/usr/local/bin" ]; then
     13                mkdir /usr/local/bin
     14        fi
     15
    1216        for x in Xpra Xpra_Launcher; do
    13                 echo '#!/bin/sh' > /usr/bin/$x
    14                 echo exec $APP_ROOT/Contents/MacOS/$x \"\$@\" >> /usr/bin/$x
    15                 chown root:wheel /usr/bin/$x
    16                 chmod 755 /usr/bin/$x
     17                echo '#!/bin/sh' > /usr/local/bin/$x
     18                echo exec $APP_ROOT/Contents/MacOS/$x \"\$@\" >> /usr/local/bin/$x
     19                chown root:wheel /usr/local/bin/$x
     20                chmod 755 /usr/local/bin/$x
    1721        done
    1822        for x in Bug_Report Config_info Encoding_info GStreamer_info GTK_info Keyboard_Tool Keymap_info Network_info OpenGL_check Path_info PowerMonitor Print Python Version_info Webcam_Test;do
    19                 echo '#!/bin/sh' > /usr/bin/Xpra_$x
    20                 echo exec $APP_ROOT/Contents/Helpers/$x \"\$@\" >> /usr/bin/Xpra_$x
    21                 chown root:wheel /usr/bin/Xpra_$x
    22                 chmod 755 /usr/bin/Xpra_$x
     23                echo '#!/bin/sh' > /usr/local/bin/Xpra_$x
     24                echo exec $APP_ROOT/Contents/Helpers/$x \"\$@\" >> /usr/local/bin/Xpra_$x
     25                chown root:wheel /usr/local/bin/Xpra_$x
     26                chmod 755 /usr/local/bin/Xpra_$x
    2327        done
    2428fi
  • tags/v0.17.x/rpmbuild/python-pycuda.spec

    r12925 r27514  
    99
    1010Name:           python-pycuda
    11 Version:        2016.1
     11Version:        2016.1.1
    1212Release:        1
    1313Url:            http://mathema.tician.de/software/pycuda
     
    1515License:        MIT
    1616Group:          Development/Libraries/Python
    17 Source:         http://pypi.python.org/pypi/cuda/%{version}/pycuda-%{version}.tar.gz
     17Source:         https://pypi.python.org/packages/d6/98/ff0f751fd5c97c9d286b90ffe1ed8aa21faf1a640b74b662f02d8afcc87c/pycuda-%{version}.tar.gz
    1818BuildRoot:      %{_tmppath}/%{name}-%{version}-build
    1919
  • tags/v0.17.x/rpmbuild/xpra.spec

    r12925 r27514  
    44# later version. See the file COPYING for details.
    55
    6 %define version 0.17.4
     6%define version 0.17.6
    77%if ! %{defined build_no}
    88%define build_no 0
     
    8888%define requires_crypto python-crypto
    8989%endif
     90%if "%{?dist}"==".el7_1"
     91#no python cryptography:
     92%define requires_crypto python-crypto
     93%endif
    9094
    9195
     
    416420
    417421%changelog
     422* Sat Oct 29 2016 Antoine Martin <antoine@devloop.org.uk> 0.17.6-2
     423- don't require rpmfusion repository to install this rpm
     424
     425* Fri Oct 28 2016 Antoine Martin <antoine@devloop.org.uk> 0.17.6-1
     426- fix server-side av-sync queue level accounting
     427- fix system lockups with Nvidia Pascal GPUs
     428- fix osx log directory lookup for shadow servers
     429- fix win32 system authentication for shadow servers
     430- fix pycups errors with non string options
     431- fix for GTK3: force X11 backend
     432- fix yaml missing version
     433- fix missing lzo with OSX builds
     434- fix osx bug report tool command
     435- fix osx build stripping
     436- fix clang builds (ignore warning from cython generated code)
     437- fix build failures when nvcc is on the PATH
     438- fix race condition in authentication handling (mostly harmless)
     439- fix logging error in fakexinerama error handler
     440- fix desktop scaling reset (was rounding)
     441- fix file transfer via control channel command
     442- fix handling of fatal errors when there are no socket directories
     443- fix pulseaudio process tagging
     444- fix proxy server when running on Python 2.6 and older glib versions
     445- fix proxy packet re-compression, server type exported
     446- fix minor debug logging error, avoid a spurious refresh warning
     447- fix read-only mode command line parsing and tray menu errors
     448- fix video encoding failures when video automatic scaling changes
     449- fix hidden launcher bug on OSX with connection files
     450- fix non-X11 servers image corruption
     451- fix MS Windows and OSX build compatibility with OpenSSL 1.1
     452- fix video region detection dbus API
     453- fix compilation with older versions of Cython
     454- fix avoid crash with older versions of python-netifaces
     455- fix stuck sound processes, use force exit if needed
     456- fix disabled video region flag not honoured
     457- fix stuck key modifiers when window loses focus
     458- fix proxy hello data format
     459- fix proxy authentication errors, add missing xpra info
     460- fix display not honoured when connecting to a proxy
     461- fix proxy failures with a single display detected more than once
     462- fix proxy IO thread timeouts
     463- fix authentication salt and hash handling (size and sanity checks)
     464- fix some system authentication modules
     465
     466* Thu Aug 25 2016 Antoine Martin <antoine@devloop.org.uk> 0.17.5-2
     467- force rebuild
     468
     469* Wed Aug 24 2016 Antoine Martin <antoine@devloop.org.uk> 0.17.6-1
     470- fix sound codec order: prevent incompatibilities with gdp payloader
     471- fix internal error with some values for the window title option
     472- fix crash on FreeBSD caused by buggy netifaces package
     473- fix strict build on FreeBSD, use correct Xvfb command
     474- fix video region statistics not correctly reset
     475- fix OSX PKG installation errors on El Capitan and later
     476- fix OSX installation warnings
     477- fix X11 keyboard layout setup code corner case handling
     478- fix VP9 speed setting to prevent excruciatingly slow compression
     479- fix honour socket-dirs value found in configuration files
     480- fix Fedora 25+ builds hanging during printer probing
     481- fix unnecessary delay in network layer of MS Windows clients
     482- fix xvid encoder debug overlay (now only enabled with debugging)
     483- fix x265 compilation with python3
     484- fix cursor errors with no data to send
     485- fix v4l2 module build on older platforms, add missing build switch
     486- fix CentOS 7.1 cryptography packaging dependency
     487- fix misleading cryptography import error message
     488- fix logging loops with 'network' and 'crypto' debug flags
     489- fix spurious sound log messages on some platforms (ie: CentOS 6.x)
     490- fix webcam spurious warnings when already disabled
     491- fix webcam skewed picture
     492- fix size calculations for the 1 pixel bottom edge of video areas
     493- fix heavy import with side effects for shadow servers
     494- fix MS Windows shadow servers picture corruption
     495- fix jpeg wrongly included in auto-refresh encodings
     496- fix compatibility with ffmpeg 3.1+, warn but don't fail
     497- fix socket-dir option not being honoured
     498- fix log dir in commented out Xvfb example
     499- fix build on some non US locales
     500
    418501* Mon Jun 27 2016 Antoine Martin <antoine@devloop.org.uk> 0.17.4-1
    419502- fix severe regression in damage handling
  • tags/v0.17.x/src/NEWS

    r12925 r27514  
     1v0.17.6 (2016-10-28)
     2======================
     3        -- fix server-side av-sync queue level accounting
     4        -- fix system lockups with Nvidia Pascal GPUs
     5        -- fix osx log directory lookup for shadow servers
     6        -- fix win32 system authentication for shadow servers
     7        -- fix pycups errors with non string options
     8        -- fix for GTK3: force X11 backend
     9        -- fix yaml missing version
     10        -- fix missing lzo with OSX builds
     11        -- fix osx bug report tool command
     12        -- fix osx build stripping
     13        -- fix clang builds (ignore warning from cython generated code)
     14        -- fix build failures when nvcc is on the PATH
     15        -- fix race condition in authentication handling (mostly harmless)
     16        -- fix logging error in fakexinerama error handler
     17        -- fix desktop scaling reset (was rounding)
     18        -- fix file transfer via control channel command
     19        -- fix handling of fatal errors when there are no socket directories
     20        -- fix pulseaudio process tagging
     21        -- fix proxy server when running on Python 2.6 and older glib versions
     22        -- fix proxy packet re-compression, server type exported
     23        -- fix minor debug logging error, avoid a spurious refresh warning
     24        -- fix read-only mode command line parsing and tray menu errors
     25        -- fix video encoding failures when video automatic scaling changes
     26        -- fix hidden launcher bug on OSX with connection files
     27        -- fix non-X11 servers image corruption
     28        -- fix MS Windows and OSX build compatibility with OpenSSL 1.1
     29        -- fix video region detection dbus API
     30        -- fix compilation with older versions of Cython
     31        -- fix avoid crash with older versions of python-netifaces
     32        -- fix stuck sound processes, use force exit if needed
     33        -- fix disabled video region flag not honoured
     34        -- fix stuck key modifiers when window loses focus
     35        -- fix proxy hello data format
     36        -- fix proxy authentication errors, add missing xpra info
     37        -- fix display not honoured when connecting to a proxy
     38        -- fix proxy failures with a single display detected more than once
     39        -- fix proxy IO thread timeouts
     40        -- fix authentication salt and hash handling (size and sanity checks)
     41        -- fix some system authentication modules
     42
     43
     44v0.17.5 (2016-08-24)
     45======================
     46        -- fix sound codec order: prevent incompatibilities with gdp payloader
     47        -- fix internal error with some values for the window title option
     48        -- fix crash on FreeBSD caused by buggy netifaces package
     49        -- fix strict build on FreeBSD, use correct Xvfb command
     50        -- fix video region statistics not correctly reset
     51        -- fix OSX PKG installation errors on El Capitan and later
     52        -- fix OSX installation warnings
     53        -- fix X11 keyboard layout setup code corner case handling
     54        -- fix VP9 speed setting to prevent excruciatingly slow compression
     55        -- fix honour socket-dirs value found in configuration files
     56        -- fix Fedora 25+ builds hanging during printer probing
     57        -- fix unnecessary delay in network layer of MS Windows clients
     58        -- fix xvid encoder debug overlay (now only enabled with debugging)
     59        -- fix x265 compilation with python3
     60        -- fix cursor errors with no data to send
     61        -- fix v4l2 module build on older platforms, add missing build switch
     62        -- fix CentOS 7.1 cryptography packaging dependency
     63        -- fix misleading cryptography import error message
     64        -- fix logging loops with 'network' and 'crypto' debug flags
     65        -- fix spurious sound log messages on some platforms (ie: CentOS 6.x)
     66        -- fix webcam spurious warnings when already disabled
     67        -- fix proxy server: connection errors, video proxy encoding, etc
     68        -- fix Xnest / Xephyr window detection code
     69        -- fix incorrect value for x264 API
     70        -- fix paths accumulating duplicates in run-xpra script
     71        -- fix race condition in video cleanup
     72        -- fix socket-dirs option syntax in default config file
     73        -- fix multifile authentication module
     74        -- fix dbus crash on exit which prevented Xvfb from being killed
     75        -- fix webcam skewed picture
     76        -- fix size calculations for the 1 pixel bottom edge of video areas
     77        -- fix heavy import with side effects for shadow servers
     78        -- fix MS Windows shadow servers picture corruption
     79        -- fix jpeg wrongly included in auto-refresh encodings
     80        -- fix compatibility with ffmpeg 3.1+, warn but don't fail
     81        -- fix socket-dir option not being honoured
     82        -- fix log dir in commented out Xvfb example
     83        -- fix build on some non US locales
     84
     85
    186v0.17.4 (2016-06-27)
    287======================
     
    69154
    70155
    71 v0.17.0 (2015-04-18)
     156v0.17.0 (2016-04-18)
    72157======================
    73158        -- GStreamer 1.6.x on MS Windows and OSX
  • tags/v0.17.x/src/cups/xpraforwarder

    r12925 r27514  
    3838import urlparse
    3939
    40 __version__ = "0.17.4"
     40__version__ = "0.17.6"
    4141
    4242#Writes a syslog entry (msg) at the default facility:
  • tags/v0.17.x/src/etc/xpra/xpra.conf.in

    r12925 r27514  
    266266#socket-dirs = ~/.xpra
    267267#socket-dirs = /var/run/xpra
    268 socket-dirs = %(socket_dirs)s
     268%(socket_dirs)s
    269269
    270270# Where to create new sockets
  • tags/v0.17.x/src/html5/index.html

    r12925 r27514  
    260260
    261261                            // and connect
    262                             client.connect(server, port, false);
     262                            var ssl = document.location.protocol=="https:";
     263                            client.connect(server, port, ssl);
    263264
    264265                            // attach a callback for paste on the screen
  • tags/v0.17.x/src/setup.py

    r12925 r27514  
    7777        return -1, "", ""
    7878    stdout, stderr = p.communicate()
    79     return p.returncode, stdout.decode(), stderr.decode()
     79    return p.returncode, stdout.decode("utf-8"), stderr.decode("utf-8")
    8080PKG_CONFIG = os.environ.get("PKG_CONFIG", "pkg-config")
    8181has_pkg_config = False
     
    157157vpx_ENABLED             = DEFAULT and pkg_config_ok("--atleast-version=1.3", "vpx", fallback=WIN32)
    158158webcam_ENABLED          = DEFAULT and not OSX
    159 v4l2_ENABLED            = DEFAULT and (not WIN32 and not OSX)
     159v4l2_ENABLED            = DEFAULT and (not WIN32 and not OSX and not sys.platform.startswith("freebsd"))
    160160#ffmpeg 2 onwards:
    161161dec_avcodec2_ENABLED    = DEFAULT and pkg_config_ok("--atleast-version=56", "libavcodec", fallback=WIN32)
     
    209209            "nvenc4", "nvenc5", "nvenc6",
    210210            "vpx", "webp", "pillow",
     211            "v4l2",
    211212            "dec_avcodec2", "csc_swscale",
    212213            "csc_opencl", "csc_cython", "csc_opencv", "csc_libyuv",
     
    659660                        "-Wno-unknown-attributes",
    660661                        "-Wno-unused-function",
     662                        "-Wno-self-assign",
    661663                        "-Wno-sometimes-uninitialized"]
    662664            elif get_gcc_version()>=[4, 4]:
     
    671673                    #see: http://trac.cython.org/ticket/395
    672674                    eifd += ["-fno-strict-aliasing"]
     675                elif sys.platform.startswith("freebsd"):
     676                    eifd += ["-Wno-error=unused-function"]
    673677            else:
    674678                #older versions of OSX ship an old gcc,
     
    841845            dist = out.split(":")[-1].strip()
    842846        print("found OS release: %s %s" % (dist, release))
    843         if release in ("raring", "saucy", "trusty", "vivid", "wily"):
     847        if release in ("raring", "saucy", "trusty", "vivid", "wily", "xenial"):
    844848            #yet another instance of Ubuntu breaking something
    845849            print("Warning: Ubuntu '%s' breaks Xorg/Xdummy usage - using Xvfb fallback" % release)
     
    882886            #(the buildbot's uid!)
    883887            socket_dirs = [x for x in socket_dirs if x.find(str(os.getuid()))<0]
    884         def addtrailingslash(v):
    885             if v.endswith("/"):
    886                 return v
    887             return v+"/"
    888         bind = addtrailingslash(socket_dirs[0])
     888        bind = "auto"
    889889    #FIXME: we should probably get these values from the default config instead
    890890    pdf, postscript = "", ""
     
    905905            pdf = get_printer_def("pdf")
    906906            postscript = get_printer_def("postscript")
     907            print("pdf=%s, postscript=%s" % (pdf, postscript))
    907908        except Exception as e:
    908909            print("could not probe for pdf/postscript printers: %s" % e)
     
    919920            lines.append(line+" \\\n")
    920921        return  (" ".join(lines)).rstrip("\\\n")
     922    log_dir = get_default_log_dir().replace("~/", "${HOME}/")
    921923    SUBS = {'xvfb_command'          : pretty_cmd(xvfb_command),
    922924            'ssh_command'           : DEFAULT_SSH_COMMAND,
     
    930932            'bind'                  : bind,
    931933            'socket_dirs'           : "".join(("socket-dirs = %s\n" % x) for x in socket_dirs),
    932             'log_dir'               : get_default_log_dir(),
     934            'log_dir'               : log_dir,
    933935            'mdns'                  : not is_RH(),      #no python-avahi on RH / CentOS
    934936            'dbus_proxy'            : bstr(not OSX and not WIN32),
     
    21402142    else:
    21412143        nvcc_exe = "nvcc"
    2142         for v in ("-5.5", "-6.0", "-6.5", "-7.0", "-7.5", "8.0", ""):
     2144        for v in ("-5.5", "-6.0", "-6.5", "-7.0", "-7.5", "-8.0", ""):
    21432145            path_options += ["/usr/local/cuda%s/bin" % v, "/opt/cuda%s/bin" % v]
    21442146    options = [os.path.join(x, nvcc_exe) for x in path_options]
     
    21482150            code, out, err = get_status_output(["which", nvcc_exe])
    21492151            if code==0:
    2150                 options.append(0, out)
     2152                options.insert(0, out)
    21512153        except:
    21522154            pass
     
    23112313if dec_avcodec2_ENABLED:
    23122314    avcodec2_pkgconfig = pkgconfig("avcodec", "avutil")
     2315    if is_msvc():
     2316        add_to_keywords(avcodec2_pkgconfig, 'extra_compile_args', "/wd4996")
     2317    else:
     2318        add_to_keywords(avcodec2_pkgconfig, 'extra_compile_args', "-Wno-error=deprecated-declarations")
    23132319    cython_add(Extension("xpra.codecs.dec_avcodec2.decoder",
    23142320                ["xpra/codecs/dec_avcodec2/decoder.pyx"]+membuffers_c,
  • tags/v0.17.x/src/win32/BUILD.BAT

    r12925 r27514  
    9494SET PATH=%PATH%;%GSTREAMER%\sdk\bin;%GSTREAMER%\bin
    9595SET PY2EXE_ARGS=%BUILD_ARGS%
     96REM Adding OpenSSL to PATH so py2exe can find the DLLs:
     97SET PATH=%XPRA_WIN32_BUILD_LIB_PREFIX%\OpenSSL\bin;%PATH%
    9698IF %SHOW_DEPENDENCIES% NEQ 0 SET PY2EXE_ARGS=%BUILD_ARGS% -x
    9799SET PY2EXE_LOG=win32\py2exe-xpra.log
  • tags/v0.17.x/src/win32/xpra.iss

    r12925 r27514  
    11[Setup]
    22AppName=Xpra
    3 AppVerName=Xpra 0.17.4
     3AppVerName=Xpra 0.17.6
    44AppPublisher=devloop
    55AppPublisherURL=http://xpra.org/
     
    1111SolidCompression=true
    1212AllowUNCPath=false
    13 VersionInfoVersion=0.17.4
     13VersionInfoVersion=0.17.6
    1414VersionInfoCompany=devloop
    1515VersionInfoDescription=multi-platform screen and application forwarding system
  • tags/v0.17.x/src/xpra/__init__.py

    r12925 r27514  
    55# later version. See the file COPYING for details.
    66
    7 __version__ = "0.17.4"
     7__version__ = "0.17.6"
  • tags/v0.17.x/src/xpra/client/client_base.py

    r12925 r27514  
    2929from xpra.version_util import version_compat_check, get_version_info, local_version
    3030from xpra.platform.info import get_name
    31 from xpra.os_util import get_hex_uuid, get_machine_id, get_user_uuid, load_binary_file, SIGNAMES, strtobytes, bytestostr
     31from xpra.os_util import get_machine_id, get_user_uuid, load_binary_file, SIGNAMES, strtobytes, bytestostr
    3232from xpra.util import flatten_dict, typedict, updict, xor, repr_ellipsized, nonl, disconnect_is_an_error, dump_all_frames
    3333from xpra.net.file_transfer import FileTransferHandler
     
    537537        #they also tell us which digest to use:
    538538        digest = packet[3]
    539         client_salt = get_hex_uuid()+get_hex_uuid()
     539        client_salt = get_salt(len(salt))
    540540        #TODO: use some key stretching algorigthm? (meh)
    541541        try:
     
    554554                warn_server_and_exit(EXIT_ENCRYPTION, "server requested digest %s, cowardly refusing to use it without encryption" % digest, "invalid digest")
    555555                return
    556             challenge_response = xor(password, salt)
     556            salt = salt[:len(password)]
     557            challenge_response = strtobytes(xor(password, salt))
    557558        else:
    558559            warn_server_and_exit(EXIT_PASSWORD_REQUIRED, "server requested an unsupported digest: %s" % digest, "invalid digest")
  • tags/v0.17.x/src/xpra/client/client_window_base.py

    r12925 r27514  
    195195                        return value
    196196                    title = re.sub("@[\w\-]*@", metadata_replace, title)
    197                     if sys.version<'3':
    198                         utf8_title = title.encode("utf-8")
    199                     else:
    200                         utf8_title = title
     197                if sys.version<'3':
     198                    utf8_title = title.encode("utf-8")
     199                else:
     200                    utf8_title = title
    201201            except Exception as e:
    202202                log.error("error parsing window title: %s", e)
  • tags/v0.17.x/src/xpra/client/gl/gl_window_backing_base.py

    r12925 r27514  
    207207        self.paint_screen = False
    208208        self.paint_spinner = False
    209         self.draw_needs_refresh = False
    210209        self.offscreen_fbo = None
    211210        self.pending_fbo_paint = []
     
    214213
    215214        GTKWindowBacking.__init__(self, wid, window_alpha)
     215        self.draw_needs_refresh = False
    216216        self.init_gl_config(window_alpha)
    217217        self.init_backing()
  • tags/v0.17.x/src/xpra/client/gtk_base/client_launcher.py

    r12925 r27514  
    819819                    app.__osx_open_file = False
    820820                    def do_open_file(filename):
    821                         app.__osx_open_file = True
    822821                        app.update_options_from_file(filename)
    823822                        #the compressors and packet encoders cannot be changed from the UI
     
    826825                        app.update_gui_from_config()
    827826                        if app.config.autoconnect:
     827                            app.__osx_open_file = True
    828828                            glib.idle_add(app.do_connect)
    829829                    def open_file(_, filename):
  • tags/v0.17.x/src/xpra/client/gtk_base/gtk_client_window_base.py

    r12925 r27514  
    893893        if self._client.server_window_frame_extents and "frame" not in state:
    894894            wfs = self.get_window_frame_size()
    895             if wfs:
     895            if wfs and len(wfs)==4:
    896896                state["frame"] = self._client.crect(*wfs)
    897897                self._current_frame_extents = wfs
  • tags/v0.17.x/src/xpra/client/gtk_base/gtk_tray_menu_base.py

    r12925 r27514  
    567567    def make_keyboardsyncmenuitem(self):
    568568        def set_keyboard_sync_tooltip():
    569             if not self.client.keyboard_helper:
     569            kh = self.client.keyboard_helper
     570            if not kh:
    570571                self.keyboard_sync_menuitem.set_tooltip_text("Keyboard support is not loaded")
    571             elif self.client.keyboard_helper.keyboard_sync:
     572            elif kh.keyboard_sync:
    572573                self.keyboard_sync_menuitem.set_tooltip_text("Disable keyboard synchronization (prevents spurious key repeats on high latency connections)")
    573574            else:
     
    581582        set_sensitive(self.keyboard_sync_menuitem, False)
    582583        def set_keyboard_sync_menuitem(*args):
    583             log("set_keyboard_sync_menuitem%s enabled=%s", args, self.client.keyboard_helper.keyboard_sync)
    584             self.keyboard_sync_menuitem.set_active(self.client.keyboard_helper.keyboard_sync)
    585             set_sensitive(self.keyboard_sync_menuitem, True)
     584            kh = self.client.keyboard_helper
     585            set_sensitive(self.keyboard_sync_menuitem, bool(kh))
     586            if kh:
     587                log("set_keyboard_sync_menuitem%s enabled=%s", args, kh.keyboard_sync)
     588            self.keyboard_sync_menuitem.set_active(bool(kh) and bool(kh.keyboard_sync))
    586589            set_keyboard_sync_tooltip()
    587590        self.client.after_handshake(set_keyboard_sync_menuitem)
     
    892895            c.connect("toggled", activate_cb, menu)
    893896            return c
     897        webcam = self.menuitem("Webcam", "webcam.png", "Forward webcam pictures to the server", None)
     898        if not self.client.webcam_forwarding:
     899            webcam.set_tooltip_text("Webcam forwarding is disabled")
     900            set_sensitive(webcam, False)
     901            return webcam
     902            return c
    894903        def start_webcam(*args):
    895904            webcamlog("start_webcam%s", args)
     
    903912        menu.append(off)
    904913
    905         webcam = self.menuitem("Webcam", "webcam.png", "Forward webcam pictures to the server", None)
    906914        webcam.set_submenu(menu)
    907915        def webcam_changed(*args):
  • tags/v0.17.x/src/xpra/client/ui_client_base.py

    r12925 r27514  
    10031003
    10041004    def scaleset(self, xscale=1, yscale=1):
    1005         self.scale_change(xscale/self.xscale, yscale/self.yscale)
     1005        scalinglog("scaleset(%s, %s) current scaling: %s, %s", xscale, yscale, self.xscale, self.yscale)
     1006        self.scale_change(float(xscale)/self.xscale, float(yscale)/self.yscale)
    10061007
    10071008    def scale_change(self, xchange=1, ychange=1):
     1009        scalinglog("scale_change(%s, %s)", xchange, ychange)
    10081010        if self.server_is_shadow and self.shadow_fullscreen:
    10091011            scalinglog("scale_change(%s, %s) ignored, fullscreen shadow mode is active", xchange, ychange)
     
    12751277                log("window_close_event(%i) metadata=%s", wid, metadata)
    12761278                class_instance = metadata.get("class-instance")
    1277                 title = metadata.get("title")
    1278                 log("window_close_event(%i) title=%s, class-instance(%s)=%s", wid, title, class_instance)
    1279                 if title in TITLE_CLOSEEXIT:
     1279                title = metadata.get("title", "")
     1280                log("window_close_event(%i) title=%s, class-instance=%s", wid, title, class_instance)
     1281                matching_title_close = [x for x in TITLE_CLOSEEXIT if x and title.startswith(x)]
     1282                if matching_title_close:
    12801283                    log.info("window-close event on %s window, disconnecting", title)
    12811284                    self.quit(0)
    12821285                    return True
    1283                 if class_instance and class_instance[0] in WM_CLASS_CLOSEEXIT:
     1286                if class_instance and class_instance[1] in WM_CLASS_CLOSEEXIT:
    12841287                    log.info("window-close event on %s window, disconnecting", class_instance[0])
    12851288                    self.quit(0)
     
    17421745        #the server will have a handle on the mmap file by now, safe to delete:
    17431746        self.clean_mmap()
    1744         server_auto_refresh_delay = c.intget("auto_refresh_delay", 0)/1000.0
    1745         if server_auto_refresh_delay==0 and self.auto_refresh_delay>0:
    1746             log.warn("Warning: server does not support auto-refresh!")
     1747        if self.windows_enabled:
     1748            server_auto_refresh_delay = c.intget("auto_refresh_delay", 0)/1000.0
     1749            if server_auto_refresh_delay==0 and self.auto_refresh_delay>0:
     1750                log.warn("Warning: server does not support auto-refresh!")
    17471751        self.server_encodings = c.strlistget("encodings")
    17481752        self.server_core_encodings = c.strlistget("encodings.core", self.server_encodings)
     
    17861790            proxy_version = c.strget("proxy.build.version", proxy_version)
    17871791            proxy_distro = c.strget("linux_distribution")
    1788             msg = "via: %s proxy version %s" % (platform_name(proxy_platform, proxy_distro or proxy_release), std(proxy_version))
     1792            msg = "via: %s proxy version %s" % (platform_name(proxy_platform, proxy_distro or proxy_release), std(proxy_version or "unknown"))
    17891793            if proxy_hostname:
    17901794                msg += " on '%s'" % std(proxy_hostname)
     
    18911895        c = self.server_capabilities
    18921896        if self.client_supports_remote_logging and c.boolget("remote-logging"):
     1897            #check for debug:
     1898            from xpra.log import is_debug_enabled
     1899            for x in ("network", "crypto"):
     1900                if is_debug_enabled(x):
     1901                    log.warn("Warning: cannot enable remote logging as '%s' debug logging is enabled", x)
     1902                    return
    18931903            log.info("enabled remote logging")
    18941904            if not self.log_both:
  • tags/v0.17.x/src/xpra/codecs/csc_libyuv/colorspace_converter.pyx

    r12925 r27514  
    363363                planes.append(memory_as_readonly_pybuffer(<void *> scaled_planes[i], self.scaled_size[i]))
    364364            self.frames += 1
    365             out_image = YUVImageWrapper(0, 0, self.src_width, self.src_height, planes, self.dst_format, 24, strides, ImageWrapper._3_PLANES)
     365            out_image = YUVImageWrapper(0, 0, self.dst_width, self.dst_height, planes, self.dst_format, 24, strides, ImageWrapper._3_PLANES)
    366366            out_image.cython_buffer = <unsigned long> scaled_buffer
    367367        else:
     
    371371                planes.append(memory_as_readonly_pybuffer(<void *> out_planes[i], self.out_size[i]))
    372372            self.frames += 1
    373             out_image = YUVImageWrapper(0, 0, self.src_width, self.src_height, planes, self.dst_format, 24, strides, ImageWrapper._3_PLANES)
     373            out_image = YUVImageWrapper(0, 0, self.dst_width, self.dst_height, planes, self.dst_format, 24, strides, ImageWrapper._3_PLANES)
    374374            out_image.cython_buffer = <unsigned long> output_buffer
    375375        return out_image
  • tags/v0.17.x/src/xpra/codecs/enc_x264/encoder.pyx

    r12925 r27514  
    5252
    5353cdef extern from "x264.h":
     54    int X264_KEYINT_MAX_INFINITE
    5455
    5556    int X264_BUILD
     
    464465        set_f_rf(&param, get_x264_quality(self.quality, self.profile))
    465466        #we never lose frames or use seeking, so no need for regular I-frames:
    466         param.i_keyint_max = 999999
     467        param.i_keyint_max = X264_KEYINT_MAX_INFINITE
    467468        #we don't want IDR frames either:
    468         param.i_keyint_min = 999999
     469        param.i_keyint_min = X264_KEYINT_MAX_INFINITE
    469470        param.b_intra_refresh = 0   #no intra refresh
    470471        param.b_open_gop = 1        #allow open gop
  • tags/v0.17.x/src/xpra/codecs/enc_x265/encoder.pyx

    r12925 r27514  
    497497        cdef int saved_quality = self.quality
    498498        cdef int saved_speed = self.speed
    499         cdef int i                        #@DuplicatedSignature
     499        cdef unsigned int i                        #@DuplicatedSignature
    500500
    501501        assert self.context!=NULL
  • tags/v0.17.x/src/xpra/codecs/image_wrapper.py

    r12925 r27514  
    5353
    5454    def get_y(self):
    55         return self.x
     55        return self.y
    5656
    5757    def get_width(self):
  • tags/v0.17.x/src/xpra/codecs/nvenc4/encoder.pyx

    r12925 r27514  
    19911991            picParams.codecPicParams.h264PicParams.displayPOCSyntax = 2*self.frames
    19921992            picParams.codecPicParams.h264PicParams.refPicFlag = self.frames==0
    1993             picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
    1994             picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
     1993            #picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
     1994            #picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
    19951995            picParams.codecPicParams.h264PicParams.colourPlaneId = 0
    19961996            picParams.frameIdx = self.frames
  • tags/v0.17.x/src/xpra/codecs/nvenc5/encoder.pyx

    r12925 r27514  
    20392039            picParams.codecPicParams.h264PicParams.displayPOCSyntax = 2*self.frames
    20402040            picParams.codecPicParams.h264PicParams.refPicFlag = self.frames==0
    2041             picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
    2042             picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
     2041            #picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
     2042            #picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
    20432043            picParams.codecPicParams.h264PicParams.colourPlaneId = 0
    20442044            picParams.frameIdx = self.frames
  • tags/v0.17.x/src/xpra/codecs/nvenc6/encoder.pyx

    r12925 r27514  
    13611361        log("presets for %s: %s", guidstr(codec), csv(presets.keys()))
    13621362        for name, x in presets.items():
    1363             preset_speed = PRESET_SPEED.get(x, 50)
    1364             preset_quality = PRESET_QUALITY.get(x, 50)
     1363            preset_speed = PRESET_SPEED.get(name, 50)
     1364            preset_quality = PRESET_QUALITY.get(name, 50)
    13651365            log("preset %s: speed=%s, quality=%s", name, preset_speed, preset_quality)
    13661366            #log("%s speed=%s, quality=%s, lossless=%s", x, preset_speed, preset_quality, x in LOSSLESS_PRESETS)
    1367             if x in LOSSLESS_PRESETS and self.pixel_format!="YUV444P":
     1367            if name in LOSSLESS_PRESETS and self.pixel_format!="YUV444P":
    13681368                continue
    1369             if self.lossless and (x not in LOSSLESS_PRESETS):
     1369            if self.lossless and (name not in LOSSLESS_PRESETS):
    13701370                continue
    1371             if not self.lossless and (x in LOSSLESS_PRESETS):
     1371            if not self.lossless and (name in LOSSLESS_PRESETS):
    13721372                continue
    13731373            if preset_speed>=0 and preset_quality>=0:
     
    21142114            picParams.codecPicParams.h264PicParams.displayPOCSyntax = 2*self.frames
    21152115            picParams.codecPicParams.h264PicParams.refPicFlag = self.frames==0
    2116             picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
    2117             picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
     2116            #picParams.codecPicParams.h264PicParams.sliceMode = 3            #sliceModeData specifies the number of slices
     2117            #picParams.codecPicParams.h264PicParams.sliceModeData = 1        #1 slice!
    21182118            picParams.codecPicParams.h264PicParams.colourPlaneId = 0
    21192119            picParams.frameIdx = self.frames
  • tags/v0.17.x/src/xpra/codecs/v4l2/pusher.pyx

    r12925 r27514  
    5858    int V4L2_FIELD_SEQ_BT
    5959    int V4L2_FIELD_ALTERNATE
    60     int V4L2_FIELD_INTERLACED_TB
    61     int V4L2_FIELD_INTERLACED_BT
     60    #int V4L2_FIELD_INTERLACED_TB
     61    #int V4L2_FIELD_INTERLACED_BT
    6262    #formats:
    6363    int V4L2_PIX_FMT_GREY
     
    162162    V4L2_FIELD_SEQ_BT               : "SEQ BT",
    163163    V4L2_FIELD_ALTERNATE            : "ALTERNATE",
    164     V4L2_FIELD_INTERLACED_TB        : "INTERLACED TB",
    165     V4L2_FIELD_INTERLACED_BT        : "INTERLACED BT",
     164    #V4L2_FIELD_INTERLACED_TB        : "INTERLACED TB",
     165    #V4L2_FIELD_INTERLACED_BT        : "INTERLACED BT",
    166166}
    167167COLORSPACE_STR = {
     
    419419            offset = DEFAULT_OFFSET
    420420        #log("offset(%s)=%s", self.rowstride, offset)
    421         cdef size_t l = self.framesize + offset + self.rowstride*8
     421        cdef size_t l = self.framesize + offset + self.rowstride
    422422        cdef uint8_t* buf = <uint8_t*> xmemalign(l)
    423423        memset(buf, 0, l)
  • tags/v0.17.x/src/xpra/codecs/vpx/encoder.pyx

    r12925 r27514  
    267267def get_output_colorspaces(encoding, input_colorspace):
    268268    assert encoding in get_encodings(), "invalid encoding: %s" % encoding
    269     csdict = COLORSPACES[encoding]
    270     assert input_colorspace in csdict, "invalid input colorspace: %s" % input_colorspace
     269    csoptions = COLORSPACES[encoding]
     270    assert input_colorspace in csoptions, "invalid input colorspace: %s, %s only supports %s" % (input_colorspace, encoding, csoptions)
    271271    #always unchanged in output:
    272272    return [input_colorspace]
     
    326326        speed = 20
    327327        quality = 50 + 50*int(has_lossless_mode)
    328         v = get_version()
    329         if v and v.startswith("v"):
    330             v = v[1:]   #strip "v"
    331             def intor0(s):
    332                 try:
    333                     return int(s)
    334                 except:
    335                     return 0
    336             vnum = [intor0(x) for x in v.split(".")]
    337             if vnum>=[1,5]:
    338                 #libvpx 1.5 made some significant performance improvements with vp9:
    339                 speed = 50
     328        if VPX_ENCODER_ABI_VERSION>=11:
     329            #libvpx 1.5 made some significant performance improvements with vp9:
     330            speed = 60
    340331    return video_spec(encoding=encoding, output_colorspaces=[colorspace], has_lossless_mode=has_lossless_mode,
    341332                            codec_class=Encoder, codec_type=get_type(),
    342                             quality=50+50*int(has_lossless_mode), speed=speed,
     333                            quality=quality, speed=speed,
    343334                            setup_cost=20, max_w=max_w, max_h=max_h)
    344335
     
    690681        #Valid range for VP9: -8..8
    691682        #But we only use positive values, negative values are just too slow
    692         cdef int range = 8*(1+int(self.encoding=="vp8"))
    693         #note: we don't use the full range since the percentages are mapped to -30 to +70
    694         cdef int value = (speed-30)*2*range//100
    695         value = MIN(range, MAX(0, value))
     683        cdef int minv = 0
     684        cdef int range = 16
     685        if self.encoding=="vp9":
     686            minv = 4
     687            range = 4
     688        #note: we don't use the full range since the percentages are mapped to -20% to +120%
     689        cdef int value = (speed-20)*3*range//200
     690        value = minv + MIN(range, MAX(0, value))
    696691        self.codec_control("cpu speed", VP8E_SET_CPUUSED, value)
    697692
  • tags/v0.17.x/src/xpra/codecs/xvid/encoder.pyx

    r12925 r27514  
    77import os
    88
    9 from xpra.log import Logger
     9from xpra.log import Logger, is_debug_enabled
    1010log = Logger("encoder", "xvid")
    1111
     
    2929
    3030cdef extern from "../../buffers/buffers.h":
    31     int    object_as_buffer(object obj, const void ** buffer, Py_ssize_t * buffer_len)
     31    int object_as_buffer(object obj, const void ** buffer, Py_ssize_t * buffer_len)
    3232    int get_buffer_api_version()
    3333
     
    475475        else:
    476476            frame.type = XVID_TYPE_AUTO
    477         frame.vop_flags = XVID_VOP_HALFPEL | XVID_VOP_HQACPRED | XVID_VOP_DEBUG
     477        frame.vop_flags = XVID_VOP_HALFPEL | XVID_VOP_HQACPRED
    478478        frame.vop_flags |= XVID_VOP_MODEDECISION_RD
     479        if is_debug_enabled("xvid"):
     480            frame.vop_flags |= XVID_VOP_DEBUG
    479481        frame.motion = 0
    480482        #fast:
  • tags/v0.17.x/src/xpra/dbus/common.py

    r12925 r27514  
    88    global _loop
    99    if not _loop:
    10         from dbus.mainloop.glib import DBusGMainLoop
     10        from dbus.mainloop.glib import DBusGMainLoop, threads_init
     11        threads_init()
    1112        _loop = DBusGMainLoop(set_as_default=True)
    1213    return _loop
  • tags/v0.17.x/src/xpra/log.py

    r12925 r27514  
    5252        if c in debug_enabled_categories:
    5353            debug_enabled_categories.remove(c)
     54
     55def is_debug_enabled(category):
     56    if "all" in debug_enabled_categories:
     57        return True
     58    if category in debug_enabled_categories:
     59        return True
     60    return isenvdebug(category) or isenvdebug("ALL")
     61
    5462
    5563def add_disabled_category(*cat):
     
    303311            if cat in debug_disabled_categories:
    304312                disabled = True
    305             if "all" in debug_enabled_categories or cat in debug_enabled_categories or isenvdebug(cat) or isenvdebug("ALL"):
     313            if is_debug_enabled(cat):
    306314                enabled = True
    307315        self.debug_enabled = enabled and not disabled
  • tags/v0.17.x/src/xpra/net/bytestreams.py

    r12925 r27514  
    7979        winerror.ERROR_BROKEN_PIPE : "BROKENPIPE",
    8080        })
    81     #on win32, we want to wait just a little while,
    82     #to prevent servers spinning wildly on non-blocking sockets:
    83     continue_wait = 5
    8481    if sys.version[0]<"3":
    8582        #win32 has problems writing more than 32767 characters to stdout!
     
    9289            return os.write(fd, buf)
    9390        TTY_WRITE = win32ttywrite
     91
     92def set_continue_wait(v):
     93    global continue_wait
     94    continue_wait = v
    9495
    9596
  • tags/v0.17.x/src/xpra/net/crypto.py

    r12925 r27514  
    132132    return IV or get_hex_uuid()[:16]
    133133
    134 def get_salt():
    135     KEY_SALT = None
    136     #KEY_SALT = "0000000000000000"
    137     return KEY_SALT or (get_hex_uuid()+get_hex_uuid())
     134def get_salt(l=64):
     135    #too short: we would not feed enough random data to HMAC
     136    assert l>=32, "salt is too short: only %i bytes" % l
     137    #too long: limit the amount of random data we request from the system
     138    assert l<256, "salt is too long: %i bytes" % l
     139    #all server versions support a client salt,
     140    #they also tell us which digest to use:
     141    salt = get_hex_uuid()
     142    while len(salt)<l:
     143        salt += get_hex_uuid()
     144    return salt[:l]
    138145
    139146def get_iterations():
  • tags/v0.17.x/src/xpra/net/net_util.py

    r12925 r27514  
    11#!/usr/bin/env python
    22# This file is part of Xpra.
    3 # Copyright (C) 2013 Antoine Martin <antoine@devloop.org.uk>
     3# Copyright (C) 2013-2016 Antoine Martin <antoine@devloop.org.uk>
    44# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
    55# later version. See the file COPYING for details.
     
    3535        if not has_netifaces:
    3636                return  {}
    37         #no idea why, but this causes crashes on OSX:
    38         if sys.platform.startswith("darwin"):
     37        #versions older than 0.10.5 can crash when calling gateways()
     38        #https://bitbucket.org/al45tair/netifaces/issues/15/gateways-function-crash-segmentation-fault
     39        if netifaces.version<'0.10.5':
    3940                return {}
    4041        try:
  • tags/v0.17.x/src/xpra/net/packet_encoding.py

    r12925 r27514  
    109109            "rencode"               : r,
    110110            "bencode"               : b,
    111             "yaml"                  : use_yaml,
     111            "yaml"                  : y,
    112112           }
    113113
  • tags/v0.17.x/src/xpra/net/pycryptography_backend.py

    r12925 r27514  
    4646        patch_crypto_be_discovery()
    4747    global backend, ENCRYPTION_CIPHERS
     48    import cryptography
     49    assert cryptography
    4850    from cryptography.hazmat.backends import default_backend
    4951    backend = default_backend()
  • tags/v0.17.x/src/xpra/net/subprocess_wrapper.py

    r12925 r27514  
    190190            self.protocol = None
    191191            p.close()
     192        self.do_stop()
     193
     194    def do_stop(self):
    192195        log("stop() stopping mainloop %s", self.mainloop)
    193196        self.mainloop.quit()
  • tags/v0.17.x/src/xpra/platform/__init__.py

    r12925 r27514  
    7272
    7373_name_set = False
    74 def set_name(prgname=_prgname, appname=_appname):
     74def set_name(prgname=None, appname=None):
    7575    global _name_set
    7676    if not _name_set:
    7777        _name_set = True
    78         set_prgname(prgname)
    79         set_application_name(appname)
     78        set_prgname(prgname or _prgname)
     79        set_application_name(appname or _appname)
    8080
    8181def _glib():
  • tags/v0.17.x/src/xpra/platform/darwin/paths.py

    r12925 r27514  
    101101    try:
    102102        from Foundation import  NSSearchPathForDirectoriesInDomains, NSLibraryDirectory, NSUserDomainMask    #@UnresolvedImport
    103         dirs = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, False)
     103        udirs = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, False)
    104104        #ie: ~/Library/
    105         library_dir = dirs[0]
     105        library_dir = udirs[0]
    106106        return os.path.join(library_dir, "Xpra")
    107107    except:
  • tags/v0.17.x/src/xpra/platform/pycups_printing.py

    r12925 r27514  
    99import os
    1010import cups
     11import time
    1112import subprocess
    1213import shlex
     
    121122    cr = getChildReaper()
    122123    cr.add_process(proc, "lpinfo", command, ignore=True, forget=True)
     124    from xpra.make_thread import make_thread
     125    def watch_lpinfo():
     126        #give it 15 seconds to run:
     127        for _ in range(15):
     128            if proc.poll() is not None:
     129                return      #finished already
     130            time.sleep(1)
     131        log.warn("Warning: lpinfo command is taking too long")
     132        proc.terminate()
     133    make_thread(watch_lpinfo, "lpinfo watcher", daemon=True).start()
    123134    out, err = proc.communicate()
    124135    if proc.wait()!=0:
     
    380391    log("pycups.print_files%s", (printer, filenames, title, options))
    381392    actual_options = DEFAULT_CUPS_OPTIONS.copy()
    382     actual_options.update(options)
     393    actual_options.update(dict((str(k),str(v)) for k,v in options.items()))
    383394    if SIMULATE_PRINT_FAILURE:
    384395        log.warn("Warning: simulating print failure")
  • tags/v0.17.x/src/xpra/platform/win32/shadow_server.py

    r12925 r27514  
    205205            pass
    206206        assert pixels, "no pixels returned from GetBitmapBits"
    207         v = ImageWrapper(0, 0, width, height, pixels, "BGRX", 24, width*4, planes=ImageWrapper.PACKED, thread_safe=True)
     207        v = ImageWrapper(x, y, width, height, pixels, "BGRX", 24, width*4, planes=ImageWrapper.PACKED, thread_safe=True)
    208208        if logger==None:
    209209            logger = log
     
    230230        GTKShadowServerBase.__init__(self)
    231231        self.keycodes = {}
     232        from xpra.net.bytestreams import set_continue_wait
     233        #on win32, we want to wait just a little while,
     234        #to prevent servers spinning wildly on non-blocking sockets:
     235        set_continue_wait(5)
    232236
    233237
  • tags/v0.17.x/src/xpra/platform/win32/window_hooks.py

    r12925 r27514  
    114114            try:
    115115                v = callback(hwnd, msg, wparam, lparam)
    116                 vlog("%s=%s", callback, (hwnd, msg, wparam, lparam), v)
     116                vlog("%s%s=%s", callback, (hwnd, msg, wparam, lparam), v)
    117117            except Exception as e:
    118118                log.error("Error: callback %s failed:", callback)
  • tags/v0.17.x/src/xpra/platform/xposix/features.py

    r12925 r27514  
    1111#this is only our best guess
    1212#there is more logic in setup.py, but it requires more effort too:
    13 XDUMMY = not is_Ubuntu()
     13XDUMMY = not is_Ubuntu() and not sys.platform.find("bsd")>=0
    1414#displayfd requires Xdummy, and we don't support servers with py3k:
    1515DISPLAYFD = XDUMMY and sys.version_info[0]<3
     
    2424             "MWNO_RIT=true",
    2525             "MWWM=allwm",
     26             "#force GTK3 applications to use X11 so we can intercept them:",
     27             "GDK_BACKEND=x11",
    2628             ]
    2729
  • tags/v0.17.x/src/xpra/scripts/config.py

    r12925 r27514  
    754754    options.video_decoders  = getlist(vdstr,    "video decoders",   avedo)
    755755
    756 def fixup_socketdirs(options):
     756def fixup_socketdirs(options, defaults):
    757757    if not options.socket_dirs:
    758758        from xpra.platform.paths import get_socket_dirs
    759         options.socket_dirs = get_socket_dirs()
     759        options.socket_dirs = getattr(defaults, "socket_dirs", get_socket_dirs())
    760760    elif type(options.socket_dirs)==str:
    761761        options.socket_dirs = options.socket_dirs.split(os.path.pathsep)
     
    810810    options.packet_encoders = packet_encoders
    811811
    812 def fixup_options(options):
     812def fixup_options(options, defaults={}):
    813813    fixup_encodings(options)
    814814    fixup_compression(options)
    815815    fixup_packetencoding(options)
    816816    fixup_video_all_or_none(options)
    817     fixup_socketdirs(options)
     817    fixup_socketdirs(options, defaults)
    818818
    819819
  • tags/v0.17.x/src/xpra/scripts/main.py

    r12925 r27514  
    3636INITENV_COMMAND = os.environ.get("XPRA_INITENV_COMMAND", "xpra initenv")
    3737CLIPBOARD_CLASS = os.environ.get("XPRA_CLIPBOARD_CLASS")
     38SSH_DEBUG = os.environ.get("XPRA_SSH_DEBUG", "0")=="1"
    3839
    3940
     
    473474                      help="Use memory mapped transfers for local connections. Default: %s." % enabled_str(defaults.mmap))
    474475    replace_option("--readwrite", "--readonly=no")
     476    replace_option("--readonly", "--readonly=yes")
    475477    group.add_option("--readonly", action="store", metavar="yes|no",
    476478                      dest="readonly", default=defaults.readonly,
     
    661663                      dest="sync_xvfb", default=defaults.sync_xvfb,
    662664                      help="How often to synchronize the virtual framebuffer used for X11 seamless servers (0 to disable). Default: %s." % defaults.sync_xvfb)
    663     from xpra.platform.paths import get_socket_dirs
    664665    group.add_option("--socket-dirs", action="append",
    665666                      dest="socket_dirs", default=[],
    666                       help="Directories to look for the socket files in. Default: %s." % os.path.pathsep.join("'%s'" % x for x in get_socket_dirs()))
     667                      help="Directories to look for the socket files in. Default: %s." % os.path.pathsep.join("'%s'" % x for x in defaults.socket_dirs))
    667668    default_socket_dir_str = defaults.socket_dir or "$XPRA_SOCKET_DIR or the first valid directory in socket-dirs"
    668669    group.add_option("--socket-dir", action="store",
     
    794795    #special case for things stored as lists, but command line option is a CSV string:
    795796    #and may have "none" or "all" special values
    796     fixup_options(options)
     797    fixup_options(options, defaults)
    797798
    798799    #special handling for URL mode:
     
    13681369                if type(x)!=str:
    13691370                    raise InitException("argument is not a string: %s (%s), found in command: %s" % (x, type(x), cmd))
     1371            if SSH_DEBUG:
     1372                sys.stdout.write("executing ssh command: %s\n" % (" ".join("\"%s\"" % x for x in cmd)))
    13701373            child = Popen(cmd, stdin=PIPE, stdout=PIPE, **kwargs)
    13711374        except OSError as e:
     
    15661569            #which may change the username..
    15671570            app.username = opts.username
     1571            app.display = opts.display
    15681572            app.setup_connection(conn)
    15691573        except Exception as e:
  • tags/v0.17.x/src/xpra/scripts/server.py

    r12925 r27514  
    138138
    139139def sh_quotemeta(s):
    140     safe = ("abcdefghijklmnopqrstuvwxyz"
    141             + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    142             + "0123456789"
    143             + "/._:,-+")
    144     quoted_chars = []
    145     for char in s:
    146         if char not in safe:
    147             quoted_chars.append("\\")
    148         quoted_chars.append(char)
    149     return "\"%s\"" % ("".join(quoted_chars),)
     140    return "'" + s.replace("'", "'\\''") + "'"
    150141
    151142def xpra_runner_shell_script(xpra_file, starting_dir, socket_dir):
     
    169160        # going:
    170161        if var in ("PATH", "LD_LIBRARY_PATH", "PYTHONPATH"):
     162            #prevent those paths from accumulating the same values multiple times,
     163            #only keep the first one:
     164            pval = value.split(os.pathsep)      #ie: ["/usr/bin", "/usr/local/bin", "/usr/bin"]
     165            seen = set()
     166            value = os.pathsep.join(x for x in pval if not (x in seen or seen.add(x)))
    171167            script.append("%s=%s:\"$%s\"; export %s\n"
    172168                          % (var, sh_quotemeta(value), var, var))
     
    427423
    428424def setup_local_sockets(bind, socket_dir, socket_dirs, display_name, clobber, mmap_group, socket_permissions):
     425    if not bind:
     426        return []
     427    if not socket_dir and (not socket_dirs or (len(socket_dirs)==1 and not socket_dirs[0])):
     428        raise InitException("at least one socket directory must be set to use unix domain sockets")
    429429    dotxpra = DotXpra(socket_dir or socket_dirs[0])
    430430    try:
  • tags/v0.17.x/src/xpra/server/auth/multifile_auth.py

    r12925 r27514  
    9999        return entry[0]
    100100
    101     def authenticate(self, challenge_response, client_salt):
     101    def authenticate_hmac(self, challenge_response, client_salt):
    102102        self.sessions = None
    103103        if not self.salt:
  • tags/v0.17.x/src/xpra/server/auth/sys_auth_base.py

    r12925 r27514  
    6363    def authenticate(self, challenge_response, client_salt):
    6464        #this will call check(password)
    65         self.authenticate_check(challenge_response, client_salt)
     65        return self.authenticate_check(challenge_response, client_salt)
    6666
    6767    def authenticate_check(self, challenge_response, client_salt):
     
    120120            sockdir = DotXpra(socket_dir, socket_dirs, actual_username=self.username)
    121121            results = sockdir.sockets(check_uid=uid)
    122             displays = [display for state, display in results if state==DotXpra.LIVE]
     122            displays = []
     123            for state, display in results:
     124                if state==DotXpra.LIVE and display not in displays:
     125                    displays.append(display)
    123126        except Exception as e:
    124127            log.error("Error: cannot get socket directory for '%s':", self.username)
  • tags/v0.17.x/src/xpra/server/auth/win32_auth.py

    r12925 r27514  
    44# later version. See the file COPYING for details.
    55
    6 import os
    76
    87from xpra.server.auth.sys_auth_base import SysAuthenticator, init
     
    1413
    1514    def get_uid(self):
    16         #uid is left unchanged:
    17         return os.getuid()
     15        return 0
    1816
    1917    def get_gid(self):
    20         #gid is left unchanged:
    21         return os.getgid()
     18        return 0
    2219
    2320    def check(self, password):
    2421        win32security.LogonUser(self.username, '', password, win32security.LOGON32_LOGON_NETWORK, win32security.LOGON32_PROVIDER_DEFAULT)
     22        return True
    2523
    2624    def __repr__(self):
  • tags/v0.17.x/src/xpra/server/dbus/dbus_server.py

    r12925 r27514  
    167167    @dbus.service.method(INTERFACE, in_signature='ib')
    168168    def SetVideoRegionDetection(self, wid, detection):
    169         self.server.control_command_video_region_detection(detection)
     169        self.server.control_command_video_region_detection(wid, detection)
    170170
    171171
  • tags/v0.17.x/src/xpra/server/proxy/proxy_instance_process.py

    r12925 r27514  
    9292        self.lost_windows = None
    9393        #for handling the local unix domain socket:
     94        self.control_socket_cleanup = None
    9495        self.control_socket = None
    9596        self.control_socket_thread = None
     
    260261            return False
    261262        try:
    262             sock = create_unix_domain_socket(sockpath, None, 0o600)
     263            sock, self.control_socket_cleanup = create_unix_domain_socket(sockpath, None, 0o600)
    263264            sock.listen(5)
    264265        except Exception as e:
     
    414415        pcaps.update(flatten_dict(get_network_caps()))
    415416        #then add the proxy info:
    416         updict(pcaps, "proxy", get_server_info())
     417        updict(pcaps, "proxy", get_server_info(), flatten_dicts=True)
    417418        pcaps["proxy"] = True
    418419        pcaps["proxy.hostname"] = socket.gethostname()
     
    453454        log.info("stop(%s, %s)", reason, skip_proto)
    454455        self.exit = True
    455         if self.control_socket_path:
    456             try:
    457                 os.unlink(self.control_socket_path)
    458             except:
    459                 pass
    460             self.control_socket_path = None
    461456        try:
    462457            self.control_socket.close()
    463458        except:
    464459            pass
     460        if self.control_socket_cleanup:
     461            self.control_socket_cleanup()
    465462        self.main_queue.put(None)
    466463        #empty the main queue:
     
    528525            data = packet[index]
    529526            if len(data)<512:
    530                 packet[8] = str(data)
     527                packet[index] = str(data)
    531528                return
    532529            #FIXME: this is ugly and not generic!
     
    594591            #packet = ["cursor", x, y, width, height, xhot, yhot, serial, pixels, name]
    595592            #or:
     593            #packet = ["cursor", "png", x, y, width, height, xhot, yhot, serial, pixels, name]
     594            #or:
    596595            #packet = ["cursor", ""]
    597             self._packet_recompress(packet, 8, "cursor")
     596            if len(packet)>=8:
     597                #hard to distinguish png cursors from normal cursors...
     598                try:
     599                    int(packet[1])
     600                    self._packet_recompress(packet, 8, "cursor")
     601                except:
     602                    self._packet_recompress(packet, 9, "cursor")
    598603        elif packet_type=="window-icon":
    599604            self._packet_recompress(packet, 5, "icon")
  • tags/v0.17.x/src/xpra/server/proxy/proxy_server.py

    r12925 r27514  
    66
    77import os
    8 import signal
    9 from xpra.gtk_common.gobject_compat import import_glib
     8from xpra.gtk_common.gobject_compat import import_glib, import_gobject
    109glib = import_glib()
    1110try:
    1211    glib.threads_init()
    1312except AttributeError:
    14     pass
     13    import_gobject().threads_init()
    1514from multiprocessing import Queue as MQueue, freeze_support
    1615freeze_support()
     
    2120
    2221from xpra.scripts.config import InitException
    23 from xpra.util import LOGIN_TIMEOUT, AUTHENTICATION_ERROR, SESSION_NOT_FOUND, repr_ellipsized
     22from xpra.util import LOGIN_TIMEOUT, AUTHENTICATION_ERROR, SESSION_NOT_FOUND, DONE, repr_ellipsized
    2423from xpra.server.proxy.proxy_instance_process import ProxyInstanceProcess
    2524from xpra.server.server_core import ServerCore
    2625from xpra.server.control_command import ArgsControlCommand, ControlError
     26from xpra.child_reaper import getChildReaper
    2727from xpra.scripts.config import make_defaults_struct
    2828from xpra.scripts.main import parse_display_name, connect_to
     
    6060        self.control_commands["stop"] = ArgsControlCommand("stop", "stops the proxy instance on the given display", self.handle_stop_command, min_args=1, max_args=1)
    6161
    62         #ensure we cache the platform info before intercepting SIGCHLD
    63         #as this will cause a fork and SIGCHLD to be emitted:
    64         from xpra.version_util import get_platform_info
    65         get_platform_info()
    66         signal.signal(signal.SIGCHLD, self.sigchld)
    67 
    6862    def init(self, opts):
    6963        log("ProxyServer.init(%s)", opts)
     
    7367        self.csc_modules = opts.csc_modules
    7468        ServerCore.init(self, opts)
     69        #ensure we cache the platform info before intercepting SIGCHLD
     70        #as this will cause a fork and SIGCHLD to be emitted:
     71        from xpra.version_util import get_platform_info
     72        get_platform_info()
     73        self.child_reaper = getChildReaper()
    7574
    7675    def init_components(self, opts):
     
    134133    def hello_oked(self, proto, packet, c, auth_caps):
    135134        if c.boolget("stop_request"):
     135            self.disconnect_client(proto, DONE, "proxy server shutting down")
    136136            self.clean_quit()
    137137            return
     
    214214            message_queue = MQueue()
    215215            try:
    216                 ioe = client_proto.wait_for_io_threads_exit(0.5+self._socket_timeout)
     216                ioe = client_proto.wait_for_io_threads_exit(5+self._socket_timeout)
    217217                if not ioe:
    218218                    log.error("some network IO threads have failed to terminate!")
     
    227227                process.start()
    228228                log("process started")
     229                popen = process._popen
     230                assert popen
     231                #when this process dies, run reap to update our list of proxy processes:
     232                self.child_reaper.add_process(popen, "xpra-proxy-%s" % display, "xpra-proxy-instance", True, True, self.reap)
    229233            finally:
    230234                #now we can close our handle on the connection:
     
    236240
    237241
    238     def reap(self):
     242    def reap(self, *args):
     243        log("reap%s", args)
    239244        dead = []
    240245        for p in self.processes.keys():
     
    242247            if not live:
    243248                dead.append(p)
     249        log("reap%s dead processes: %s", args, dead or None)
    244250        for p in dead:
    245251            del self.processes[p]
    246252
    247     def sigchld(self, *args):
    248         log("sigchld(%s)", args)
    249         self.idle_add(self.reap)
    250         log("processes: %s", self.processes)
    251253
    252254    def get_info(self, proto, *args):
    253         info = {"server.type" : "Python/GLib/proxy"}
     255        info = ServerCore.get_info(self, proto)
     256        info.setdefault("server", {})["type"] = "Python/GLib/proxy"
    254257        #only show more info if we have authenticated
    255258        #as the user running the proxy server process:
    256         sessions = proto.authenticator.get_sessions()
    257         if sessions:
    258             uid, gid = sessions[:2]
    259             if uid==os.getuid() and gid==os.getgid():
    260                 info.update(ServerCore.get_info(self, proto))
    261                 self.reap()
    262                 i = 0
    263                 for p,v in self.processes.items():
    264                     d,_ = v
    265                     info[i] = {"display"    : d,
    266                                "live"       : p.is_alive(),
    267                                "pid"        : p.pid}
    268                     i += 1
    269                 info["proxies"] = len(self.processes)
     259        pa = proto.authenticator
     260        if pa:
     261            sessions = pa.get_sessions()
     262            if sessions:
     263                uid, gid = sessions[:2]
     264                if uid==os.getuid() and gid==os.getgid():
     265                    info.update(ServerCore.get_info(self, proto))
     266                    self.reap()
     267                    i = 0
     268                    for p,v in self.processes.items():
     269                        d,_ = v
     270                        info[i] = {
     271                                   "display"    : d,
     272                                   "live"       : p.is_alive(),
     273                                   "pid"        : p.pid,
     274                                   }
     275                        i += 1
     276                    info["proxies"] = len(self.processes)
    270277        return info
  • tags/v0.17.x/src/xpra/server/server_base.py

    r12925 r27514  
    14521452        data = load_binary_file(actual_filename)
    14531453        file_size_MB = len(data)//1024//1024
    1454         if file_size_MB>self.file_size_limit:
    1455             raise ControlError("file '%s' is too large: %iMB (limit is %iMB)" % (filename, file_size_MB, self.file_size_limit))
     1454        if file_size_MB>self.file_transfer.file_size_limit:
     1455            raise ControlError("file '%s' is too large: %iMB (limit is %iMB)" % (filename, file_size_MB, self.file_transfer.file_size_limit))
    14561456        for ss in sources:
    14571457            if ss.printing:
     
    25462546            ss.update_batch(wid, window, batch_props)
    25472547
    2548     def refresh_windows(self, proto, wid_windows, opts=None):
     2548    def refresh_windows(self, proto, wid_windows, opts={}):
    25492549        ss = self._server_sources.get(proto)
    25502550        if ss is None:
     
    25582558            ss.refresh(wid, window, opts)
    25592559
     2560    def _idle_refresh_all_windows(self, proto):
     2561        self.idle_add(self.refresh_windows, proto, self._id_to_window)
     2562
    25602563    def _process_quality(self, proto, packet):
    25612564        quality = packet[1]
    2562         log("Setting quality to ", quality)
     2565        log("Setting quality to %s", quality)
    25632566        ss = self._server_sources.get(proto)
    25642567        if ss:
    25652568            ss.set_quality(quality)
    2566             self.refresh_windows(proto, self._id_to_window)
     2569            self._idle_refresh_all_windows(proto)
    25672570
    25682571    def _process_min_quality(self, proto, packet):
    25692572        min_quality = packet[1]
    2570         log("Setting min quality to ", min_quality)
     2573        log("Setting min quality to %s", min_quality)
    25712574        ss = self._server_sources.get(proto)
    25722575        if ss:
    25732576            ss.set_min_quality(min_quality)
    2574             self.refresh_windows(proto, self._id_to_window)
     2577            self._idle_refresh_all_windows(proto)
    25752578
    25762579    def _process_speed(self, proto, packet):
     
    25802583        if ss:
    25812584            ss.set_speed(speed)
    2582             self.refresh_windows(proto, self._id_to_window)
     2585            self._idle_refresh_all_windows(proto)
    25832586
    25842587    def _process_min_speed(self, proto, packet):
     
    25882591        if ss:
    25892592            ss.set_min_speed(min_speed)
    2590             self.refresh_windows(proto, self._id_to_window)
     2593            self._idle_refresh_all_windows(proto)
    25912594
    25922595
  • tags/v0.17.x/src/xpra/server/server_core.py

    r12925 r27514  
    3535from xpra.version_util import version_compat_check, get_version_info_full, get_platform_info, get_host_info, local_version
    3636from xpra.net.protocol import Protocol, get_network_caps, sanity_checks
    37 from xpra.net.crypto import crypto_backend_init, new_cipher_caps, \
     37from xpra.net.crypto import crypto_backend_init, new_cipher_caps, get_salt, \
    3838        ENCRYPTION_CIPHERS, ENCRYPT_FIRST_PACKET, DEFAULT_IV, DEFAULT_SALT, DEFAULT_ITERATIONS, INITIAL_PADDING, DEFAULT_PADDING, ALL_PADDING_OPTIONS
    3939from xpra.server.background_worker import stop_worker, get_worker
     
    159159
    160160        #Features:
    161         self.digest_modes = ("hmac", )
    162161        self.encryption = None
    163162        self.encryption_keyfile = None
     
    725724                auth_failed("authentication failed")
    726725                return False
    727         self.digest_modes = c.get("digest", ("hmac", ))
    728 
     726
     727        digest_modes = c.get("digest", ("hmac", ))
    729728        #client may have requested encryption:
    730729        cipher = c.strget("cipher")
     
    778777                    authlog.info("Authentication required by %s authenticator module", proto.authenticator)
    779778                    authlog.info(" sending challenge for '%s' using %s digest", username, digest)
    780                     if digest not in self.digest_modes:
     779                    if digest not in digest_modes:
    781780                        auth_failed("cannot proceed without %s digest support" % digest)
    782781                        return False
     
    784783                    authlog.warn("Warning: client expects a challenge but this connection is unauthenticated")
    785784                    #fake challenge so the client will send the real hello:
    786                     from xpra.os_util import get_hex_uuid
    787                     salt = get_hex_uuid()+get_hex_uuid()
     785                    salt = get_salt()
    788786                    digest = "hmac"
    789787                proto.challenge_sent = True
  • tags/v0.17.x/src/xpra/server/source.py

    r12925 r27514  
    740740            proxy_version = c.strget("proxy.version")
    741741            proxy_version = c.strget("proxy.build.version", proxy_version)
    742             msg = "via %s proxy version %s" % (platform_name(proxy_platform, proxy_release), std(proxy_version))
     742            msg = "via %s proxy version %s" % (platform_name(proxy_platform, proxy_release), std(proxy_version or "unknown"))
    743743            if proxy_hostname:
    744744                msg += " on '%s'" % std(proxy_hostname)
     
    872872                for spec_prop in spec_props:
    873873                    #make a new spec based on spec_props:
    874                     spec = video_spec(Encoder)
     874                    spec = video_spec(codec_class=Encoder, codec_type="proxy", encoding=encoding)
    875875                    for k,v in spec_prop.items():
    876876                        setattr(spec, k, v)
     
    11301130            if ss:
    11311131                try:
    1132                     encoder_latency = ss.last_info.get("queue", {}).get("cur", 0)
     1132                    encoder_latency = ss.info.get("queue", {}).get("cur", 0)
    11331133                    avsynclog("server side queue level: %s", encoder_latency)
    11341134                    from xpra.sound.gstreamer_util import ENCODER_LATENCY
     
    15581558        def do_send_cursor():
    15591559            self.send_cursor_pending = False
    1560             cursor_data, cursor_sizes = self.get_cursor_data_cb()
    1561             if cursor_data:
     1560            cd = self.get_cursor_data_cb()
     1561            if cd and cd[0]:
     1562                cursor_data, cursor_sizes = cd
    15621563                if self.last_cursor_sent and self.last_cursor_sent==cursor_data[:8]:
    15631564                    cursorlog("do_send_cursor(..) cursor identical to the last one we sent, nothing to do")
  • tags/v0.17.x/src/xpra/server/window/video_subregion.py

    r12925 r27514  
    183183                #could have been disabled since we started this method!
    184184                self.novideoregion("disabled")
     185                return
    185186            if not self.detection:
    186187                return
     
    189190        if damage_events_count < self.set_at:
    190191            #stats got reset
    191             self.video_subregion_set_at = 0
     192            self.set_at = 0
    192193        #validate against window dimensions:
    193194        rect = self.rectangle
  • tags/v0.17.x/src/xpra/server/window/window_source.py

    r12925 r27514  
    126126        self.full_frames_only = self.is_tray or encoding_options.boolget("full_frames_only")
    127127        self.supports_flush = encoding_options.get("flush")
    128         ropts = set(("png", "webp", "rgb24", "rgb32", "jpeg", "webp"))     #default encodings for auto-refresh
     128        ropts = set(("png", "webp", "rgb24", "rgb32", "webp"))     #default encodings for auto-refresh
    129129        ropts = ropts.intersection(set(self.server_core_encodings)) #ensure the server has support for it
    130130        ropts = ropts.intersection(set(self.core_encodings))        #ensure the client has support for it
  • tags/v0.17.x/src/xpra/server/window/window_video_source.py

    r12925 r27514  
    633633                WindowSource.process_damage_region(self, damage_time, window, x+w-dw, y, dw, h, self.edge_encoding, options, flush=1)
    634634            if dh>0:
    635                 WindowSource.process_damage_region(self, damage_time, window, x, y+h-dh, x+w, dh, self.edge_encoding, options, flush=1)
     635                WindowSource.process_damage_region(self, damage_time, window, x, y+h-dh, w-dw, dh, self.edge_encoding, options, flush=1)
    636636        WindowSource.process_damage_region(self, damage_time, window, x, y, w-dw, h-dh, coding, options, flush=flush)
    637637
     
    744744                scorelog("check_pipeline_score(%s) change of csc input dimensions from %ix%i to %ix%i", force_reload, csce.get_src_width(), csce.get_src_height(), csc_width, csc_height)
    745745                self.csc_encoder_clean()
     746            elif csce.get_dst_width()!=enc_width or csce.get_dst_height()!=enc_height:
     747                scorelog("check_pipeline_score(%s) change of csc ouput dimensions from %ix%i to %ix%i", force_reload, csce.get_dst_width(), csce.get_dst_height(), enc_width, enc_height)
     748                self.csc_encoder_clean()
    746749        if ve is None:
    747750            pass    #nothing to check or clean
     
    907910            and a required encoding step (encoder_spec and width/height),
    908911            we calculate a score of how well this matches our requirements:
    909             * our quality target (as per get_currend_quality)
    910             * our speed target (as per _current_speed)
     912            * our quality target "self._currend_quality"
     913            * our speed target "self._current_speed"
    911914            * how expensive it would be to switch to this pipeline option
    912915            Note: we know the current pipeline settings, so the "switching
     
    934937            csc_width = width & width_mask
    935938            csc_height = height & height_mask
     939            csce = self._csc_encoder
    936940            if enc_in_format=="RGB":
    937941                #converting to "RGB" is often a waste of CPU
     
    939943                # but even then, the YUV subsampling are better options)
    940944                ecsc_score = 1
    941             elif self._csc_encoder is None or self._csc_encoder.get_dst_format()!=enc_in_format or \
    942                type(self._csc_encoder)!=csc_spec.codec_class or \
    943                self._csc_encoder.get_src_width()!=csc_width or self._csc_encoder.get_src_height()!=csc_height:
     945            elif csce is None or csce.get_dst_format()!=enc_in_format or \
     946               type(csce)!=csc_spec.codec_class or \
     947               csce.get_src_width()!=csc_width or csce.get_src_height()!=csc_height:
    944948                #if we have to change csc, account for new csc setup cost:
    945949                ecsc_score = max(0, 80 - csc_spec.setup_cost*80.0/100.0)
  • tags/v0.17.x/src/xpra/sound/gstreamer_util.py

    r12925 r27514  
    200200       }
    201201
    202 CODEC_ORDER = [OPUS_GDP, OPUS, VORBIS, VORBIS_MKA, FLAC_GDP, FLAC, MP3, WAV, WAVPACK, SPEEX_GDP, SPEEX]
     202CODEC_ORDER = [OPUS, VORBIS_MKA, FLAC, MP3, WAV, WAVPACK, SPEEX, OPUS_GDP, VORBIS, FLAC_GDP, SPEEX_GDP]
    203203
    204204
  • tags/v0.17.x/src/xpra/sound/sink.py

    r12925 r27514  
    125125            v = get_options_cb()
    126126            log("%s()=%s", get_options_cb, v)
    127             sink_attributes.update(v)
     127            sink_attributes.update(v or {})
    128128        sink_attributes.update(sink_options)
    129129        sink_str = plugin_str(sink_type, sink_attributes)
  • tags/v0.17.x/src/xpra/sound/sound_pipeline.py

    r12925 r27514  
    351351        if not found:
    352352            #these, we know about, so we just log them:
    353             for x in ("minimum-bitrate", "maximum-bitrate", "channel-mode"):
     353            for x in ("minimum-bitrate", "maximum-bitrate", "channel-mode", "percent"):
    354354                if structure.has_field(x):
    355355                    v = structure[x]
  • tags/v0.17.x/src/xpra/sound/wrapper.py

    r12925 r27514  
    8989    def cleanup(self):
    9090        wo = self.wrapped_object
    91         log("stop() wrapped object=%s", wo)
     91        log("cleanup() wrapped object=%s", wo)
    9292        if wo:
    9393            #this will stop the sound pipeline:
    9494            self.wrapped_object = None
    9595            wo.cleanup()
     96        self.timeout_add(1000, self.do_stop)
    9697
    9798    def export_info(self):
  • tags/v0.17.x/src/xpra/util.py

    r12925 r27514  
    562562#used for merging dicts with a prefix and suffix
    563563#non-None values get added to <todict> with a prefix and optional suffix
    564 def updict(todict, prefix, d, suffix=""):
     564def updict(todict, prefix, d, suffix="", flatten_dicts=False):
    565565    if not d:
    566566        return
     
    573573            if suffix:
    574574                k = k+"."+suffix
    575             todict[k] = v
     575            if flatten_dicts and isinstance(v, dict):
     576                updict(todict, k, v)
     577            else:
     578                todict[k] = v
    576579
    577580def pver(v, numsep=".", strsep=", "):
  • tags/v0.17.x/src/xpra/x11/bindings/keyboard_bindings.pyx

    r12925 r27514  
    271271        log("setxkbmap: using locale=%s", locale)
    272272
    273         rdefs.model = model
     273        #we have to use a temporary value for older versions of Cython:
     274        v = model or b""
     275        rdefs.model = v
    274276        rdefs.layout = layout
    275277        if variant:
  • tags/v0.17.x/src/xpra/x11/fakeXinerama.py

    r12925 r27514  
    9797        try:
    9898            if os.path.exists(f):
    99                 log=("cleanup_fakexinerama() deleting fake xinerama file '%s'", f)
     99                log("cleanup_fakexinerama() deleting fake xinerama file '%s'", f)
    100100                os.unlink(f)
    101101        except Exception as e:
  • tags/v0.17.x/src/xpra/x11/server.py

    r12925 r27514  
    887887            pointer = packet[11]
    888888            modifiers = packet[12]
    889             self._update_modifiers(proto, wid, modifiers)
     889            #only update modifiers if the window is in focus:
     890            if self._has_focus==wid:
     891                self._update_modifiers(proto, wid, modifiers)
    890892            self._process_mouse_common(proto, pwid, pointer)
    891893        #some "configure-window" packets are only meant for metadata updates:
  • tags/v0.17.x/src/xpra/x11/x11_server_base.py

    r12925 r27514  
    323323
    324324    def get_max_screen_size(self):
    325         from xpra.x11.gtk2.window import MAX_WINDOW_SIZE
     325        from xpra.x11.gtk2.models import MAX_WINDOW_SIZE
    326326        max_w, max_h = self.root_window.get_size()
    327327        sizes = RandR.get_screen_sizes()
  • tags/v0.17.x/src/xpra/x11/xkbhelper.py

    r12925 r27514  
    7777        variant = settings.get("variant")
    7878        options = settings.get("options")
    79         log.info("setting keymap: %s", ", ".join(["%s=%s" % (std(k), std(v)) for k,v in settings.items() if k in ["rules", "model", "layout"] and v]))
    80         try:
    81             X11Keyboard.setxkbmap(rules, model, layout, variant, options)
    82         except:
    83             log.warn("failed to set exact keymap using %s", settings)
    84             #try again with no options:
     79        if layout:
     80            log.info("setting keymap: %s", ", ".join(["%s=%s" % (std(k), std(v)) for k,v in settings.items() if k in ["rules", "model", "layout"] and v]))
    8581            try:
    86                 X11Keyboard.setxkbmap(rules, model, layout, variant, "")
     82                X11Keyboard.setxkbmap(rules, model, layout, variant, options)
     83                return
    8784            except:
    88                 log.error("failed to set exact keymap even without applying options")
    89     elif xkbmap_print:
     85                log.warn("failed to set exact keymap using %s", settings)
     86            if options:
     87                #try again with no options:
     88                try:
     89                    X11Keyboard.setxkbmap(rules, model, layout, variant, "")
     90                except:
     91                    log.error("failed to set exact keymap even without applying options")
     92    if xkbmap_print:
    9093        log("do_set_keymap using xkbmap_print")
    9194        #try to guess the layout by parsing "setxkbmap -print"
     
    98101                    log.info("guessing keyboard layout='%s'" % layout)
    99102                    X11Keyboard.setxkbmap("", "pc104", layout, "", "")
     103                    return
    100104        except Exception as e:
    101105            log.info("error setting keymap: %s" % e)
    102     else:
    103         layout = xkbmap_layout or "us"
    104         log.info("setting keyboard layout to '%s'", std(layout))
    105         X11Keyboard.setxkbmap("", "", layout, xkbmap_variant, "")
     106    #fallback:
     107    layout = xkbmap_layout or "us"
     108    log.info("setting keyboard layout to '%s'", std(layout))
     109    X11Keyboard.setxkbmap("", "", layout, xkbmap_variant, "")
    106110
    107111
Note: See TracChangeset for help on using the changeset viewer.