You are not logged in.
Pages: 1


I recently installed Xfce on an RPi 4. Used a minimal RPi o/s install and put Xfce on top of that.
One reason that I wanted Xfce is so that I could have work spaces, which the RPi desktop does not have. I like to run Python programs in the different workspaces. These Python programs use Matplotlib to graphically present database info (mostly temperature measurements for numerous buildings). In the Matplotlib programs I use the animation module to update graphs regularly.
The current problem is that my RPi installation has no "interactive backend" which the animation module needs. I have tried EVERYTHING that I can find on line and no success.
I am wondering now if I would have used a full install of RPi o/s at the beginning and then installed Xfce would I have an interactive backend available? My Python - Matplotlib - animation programs work on the RPi Pixel desktop. What do you all think?
Any other ideas?
Thanks,
JP.
Last edited by jogl (2026-05-20 09:28:27)
Offline


Hi Jogl ,
I did not have any idea about "interactive backend" and had to look it up. I believe that would be normal for people who do not use matlab not to have an answer.
Perhaps you could, on the basis of the article I found in this link (that describes the fact that matlab uses a background process that needs access to the gui through libraries like qt6 or tkinter to interact with the gui and a few suggestions for possible solutions):
https://dev-solve.com/posts/49eabfc
describe what you tried to get this working (for example, did you install the python Qt6 module?, do you have python tkinter installed? ("python -m tkinter" to test) are you using wayland or x11/gtk (echo $XDG_SESSION_TYPE).
This would give others the option to give an answer for other technologies that may be more common.
Offline


I tried Qt6 and Qt5 and Tkinter and all of the other ones that the Matplotlib documentation mentions, no go.
That link is definitely one of the numerous ones that I read.
Still using X11. I will hold out on X till the end. Most of the legacy hardware and software on my LAN requires X for the VNC servers and clients. I made a feeble attempt at using RealVNC (Waylan) but there were too many issues, the most glaring was the need to be connected to the internet. My data collection LAN is usually not connected to the internet. Porting everything over to Waylan is not going to happen. After the SysV systemd thing I have become sceptical of the new latest and greatest thing.
Now that XFCE is moving to Waylan I will probably be running Xfce 4.20 in isolation for a long time.
Added later 17 h 50 min 10 s:
Well, I made some progress. I discovered that tkinter needs to be installed in the base python3, outside of the venv. I had been trying to keep it confined to the venv.
Apparently, when you do a minimal RPi o/s install tkinter is not included in the python, where in a full install it is.
P.S.: Working as expected now.
Last edited by jogl (2026-05-08 11:36:38)
Offline


Hi Jogl,
I see you have persisted and resolved the issue, and with an interesting solution.
The fact that the program was relying on Tktinker (to access the screen) to be installed in the main python installation, rather than a local venv environment is interesting.
I didn't see this in any of the other solutions I had given a look at in other forums!....they just mentioned to install Tkinker or Qt6.
I also like to have venv environments, especially for new/testing out stuff ...and, relying these other solutions out there, I would have installed it in the venv as well
, so I learnt something today 
Perhaps you could change the title to include the tag [Solved] and add something descriptive like "background-process screen access issue in python venv on RPi"(as you did solve it) for the other forum users? I'm certain someone will have a similar issue sooner or later. ...
Hopefully not me though, thanks for the last update
I tried Qt6 and Qt5 and Tkinter and all of the other ones that the Matplotlib documentation mentions, no go.
That link is definitely one of the numerous ones that I read.
Still using X11. I will hold out on X till the end. Most of the legacy hardware and software on my LAN requires X for the VNC servers and clients. I made a feeble attempt at using RealVNC (Waylan) but there were too many issues, the most glaring was the need to be connected to the internet. My data collection LAN is usually not connected to the internet. Porting everything over to Waylan is not going to happen. After the SysV systemd thing I have become sceptical of the new latest and greatest thing.
Now that XFCE is moving to Waylan I will probably be running Xfce 4.20 in isolation for a long time.
Added later 17 h 50 min 10 s:
Well, I made some progress. I discovered that tkinter needs to be installed in the base python3, outside of the venv. I had been trying to keep it confined to the venv.Apparently, when you do a minimal RPi o/s install tkinter is not included in the python, where in a full install it is.
P.S.: Working as expected now.
Offline


bggf:
Good that you found it interesting. Hopefully it will help others too.
Future me might be one of them. I have been on many forums for decades. Quite a few times I have searched for some info and found a post that I made many years ago and had entirely forgotten about.
Good Day,
JP.
Last edited by jogl (2026-05-20 14:35:30)
Offline
Pages: 1
[ Generated in 0.018 seconds, 9 queries executed - Memory usage: 538.9 KiB (Peak: 539.88 KiB) ]