You are not logged in.
I've recently done a full upgrade on my box over the weekend and have now noticed that when I try launching commands in fluxbox the DISPLAY environment variable no longer appears to be being set correctly. My setup is as follows, I have a single XServer with 3 XScreens. If I try launching a program on display #1 or #2 and echo out the variable to the shell I can see it being set as :1 and :2 rather than :0.1 or :0.2.
I'm not sure where this issue came from but for now I've worked around it by having a small script reset the variable for me and then call the program I want. It's doing the job for now until I can look into that a bit more. This is just calling the first argument, you could tack on $2, $3 etc for more. It won't do much harm.
#!/bin/bash
DISPLAY=:0.${DISPLAY:1} $1
I just did a replace on my ~/.fluxbox/menu file to prepend all entries with it.
*Edit* Just digging around the source code, a very recent (Jan 6th) commit mentions this which is sounding like it might have introduced it's own bug or conflict, sounds like it's probably a minor "out of sync" bit to do with whatever version of fluxbox + xlib I have so i suspect it will sort itself within the next few days as one of the packages updates (I got the issue after a pacman -Su command).
bugfix: do not assume ':number.screen' as the result of 'DisplayString()'
a newer xlib recently changed the result of 'DisplayString()' a little bit:
instead of returning ':0.0' or ':1.0' it yields ':0' or ':1'. our code to
transform this string into something that includes the currently used
Screen worked only on something like ':0.0'.we now find the '.' after the ':' and strip that part away.
Last edited by jaymzcampbell (2011-01-11 13:36:45)
Offline
There's been a couple of posts about this. Moving back a couple of X versions gets things working ok again. It does seem to be limited to fluxbox - they do have a very slow release cycle... I changed window managers because of that.
You're just jealous because the voices only talk to me.
Offline
Setting that display var in each command sorts it for me but it's hardly a graceful fix That commit that seems to be causing it is very recent, so maybe something keeps ping-ponging. I did a checkout of the current source and it compiled rather straightfoward so i might play around a bit with it myself over the weekend, it seems a fairly easy fix (for now!).
I haven't noticed this problem before the past weekend but I've only just done a full upgrade since several months when I first installed bar a few applications I manually upgraded.
Offline
I can confirm that if you checkout the current source code and compile it it handles setting the $DISPLAY var correctly. Some traces and echos as I clicked around, the "set display" bit is fluxbox setting it as the mouse changes and the run command is invoked.
current app instance is :2
Shell env $DISPLAY is set to :2
Set display to :2.2
Shell env $DISPLAY is set to :2.2
Display is :2.2
current app instance is :2
Shell env $DISPLAY is set to :2
Set display to :2.1
Shell env $DISPLAY is set to :2.1
Display is :2.1
current app instance is :2
Shell env $DISPLAY is set to :2
Set display to :2.2
Shell env $DISPLAY is set to :2.2
Offline