QT4 apps slooooow in ssh

T.C. Hollingsworth tchollingsworth at gmail.com
Wed May 9 08:45:51 UTC 2012


On Wed, May 9, 2012 at 12:53 AM, Roberto Ragusa <mail at robertoragusa.it> wrote:
> On 05/08/2012 10:18 PM, T.C. Hollingsworth wrote:
>
>> The default is the "raster" graphics engine, which works somewhat like
>> you described in your original e-mail:
>> http://labs.qt.nokia.com/2009/12/18/qt-graphics-and-performance-the-raster-engine/
>>
>> The "native" graphics engine uses regular X11, which will probably
>> always be best over SSH.
>>
>> Qt also respects the QT_GRAPHICSSYSTEM environment variable to
>> configure this, so you can add `export QT_GRAPHICSSYSTEM=native` to
>> your ~/.profile or wherever to make it your "default".
>
> Ok, so I have a work-around, but the default behavior is unacceptable,
> there should be some kind of fallback to native when on a remote display,
> maybe by automatically measuring the speed of bitmap transfers.
>
> This _should_ be fixed upstream.
> Is there an open bug on this already?

I doubt Qt can safely switch graphics systems midway through
application execution.  The only way it could do anything about it is
if it could detect whether it's being run remotely at startup, which I
don't think is possible either.

Fedora's Qt/KDE guys might be convinced to stick `[[ -n
"${SSH_CONNECTION}" ]] && export QT_GRAPHICSSYSTEM=native` in
/etc/profile.d, though.  (Unless there's a nicer way to change the
environment of only SSH logins.)

-T.C.


More information about the users mailing list