Plots Output Goes to Wrong User

Observed Behavior: The GKS QtTerm output window from the Plots package is displaying on a different user’s desktop. It appears the first person to start plotting subsequently gets all the plots from the other users.

Expected Behavior: The graphics windows for each user appear on the users desktop rather than for someone else.

Context: Multiple users log in to a single x86 system through remote desktop that is running xorgxrdp remote desktop services. The same problem has been observed in two differently configured x86 systems for Julia 1.6.7 as well as the latest long-term support 1.10.6. Systems are running Void Linux with glibc userland, recent kernels and fairly recent installations of xorgxrdp. The problem happens with login sessions running the MATE desktop as well as FVWM.

Note: This is not one user logged in twice, but two separate users with distinct user IDs, home directories and passwords. Note also that the behavior of the two tested x86 systems is slightly different: With FVWM the plot output that appears in the wrong user’s desktop is blank whereas with MATE they include all data.

Conjectures About the Problem:

Could this be a xrdpxorg configuration problem? No other windows except GKS QtTerm output from Julia appear affected. Moreover, the usual xauth restrictions in place that prevent one user from intentionally opening windows on another user’s X11 session.

Maybe the gksqt driver for user A has decided to talk with the Plots package run under a different login and ID by user B. In particular a second copy of gksqt never starts up in the second user’s Julia context.

Though it seems unlikely to me, is it possible the Julia plots library was never meant for multiple users to run on the same system? I’ll test a desktop system using multiple virtual consoles (without xrdpxorg) and report the results here.

This is likely my fault, but I need some ideas how to find the problem. Thanks for any help provided.

This is a follow up that seems to rule out xorgxrdp as the culprit.

Steps to reproduce without xorgxrdp:

Switch to an virtual console login screen. Log in as user A and type “startx – :3” to start a window session. Open a terminal. Start Julia.

Switch to a second virtual console using ctrl-alt-F3 or whatever is available. Log in as user B and type “startx – :4” to start a separate window session. Open a terminal. Start Julia.

At this point whoever loads Plots and makes the first plot receives the plotting windows from the other user on their desktop.

I would emphasize that the above was reproduced on a system without xorgxrdp even installed, so this seems to rule out a faulty xorgxrdp configuration.

@jheinen , that sounds weird

I agree, it’s very weird.

After reading the thread

I’m starting to think the graphics output window appearing on the wrong user’s desktop is related to the design of using network sockets.

Is it possible some sort of gksqt security token is disabled in my setup? As these are multi-user systems I’m trying to figure out what to do next.

Thank you for pointing this out. Yes, unfortunately that is correct. Since Qt applications require an independent event loop in the master thread, we decided at the time to use socket communication, since this is relatively easy to implement on all platforms. We will consider how to avoid cases like the one described here.

Are there any updates on fixing this or a suggested work around?

The problem is technically fixed here. But you will have to manually specify a unique host port for the socket communication, e.g. export GKS_DISPLAY=:8411, to specify a second socket stream (8410 is the default port).

I will merge it into the master branch an tag a new release this week.