QT4 apps slooooow in ssh

Cameron Simpson cs at zip.com.au
Wed May 9 21:50:23 UTC 2012


On 09May2012 01:45, T.C. Hollingsworth <tchollingsworth at gmail.com> wrote:
| 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 "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.
| 
| 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.

It could inspect $DISPLAY. If it begins with ":" then it is local and
otherwise, probably remote. One could tune default choice on that basis.

| 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.)

It isn't ssh you want to care about, it is remoteness. And of course
QT_GRAPHICSSYSTEM should never be mangled if it is already initialised;
that way lies "magic" behaviour. (Of course, this is RedHat we're
talking about, who still believe that having $PS1 set is a meaningful
indicator of stuff; had to mangle my nice clean login procedures, many
years old, when I finally bothered tracking down that misdecision.)

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Uh, this is only temporary...unless it works.   - Red Green


More information about the users mailing list