DISPLAY environment variable is unreliable
by selfprogrammed from LinuxQuestions.org on (#6DH2V)
I have been having a problem with the DISPLAY environment variable.
It started when I first installed Slackware 15 (months ago).
Some of the programs could not detect that X-windows was running, and would immediately shutdown.
Now, I am getting the opposite problem.
Trying to startx, the xfcestart script is detecting that X-windows is ALREADY running (it is not)
and exiting. This is right after booting the system, and my initial login.
Today, I had to run it three times before XFCE4 and x-windows would come up.
After the first failure, I printed out $DISPLAY,
>> echo x"$DISPLAY"x
and got back "xx"
Tried startx again, and it failed a second time.
I cannot see the messages now due to this new screen setup where it uses the same system console for X.
Thus, I cannot see any of the error messages from startx.
Tried startx a third time (NO CHANGES TO ANYTHING), and this time it started.
What has happened to BASH that now environment variables are so unreliable, or are they statistically based now. I have tried to diagnose this several times already.
The only thing I can come up with is that BASH is failing in its test, maybe due to its environment variable database pointers being mis-handled.
I have tried putting a line in the profile script to set
DISPLAY=
just to initialize the thing.
It could be 2 or 3 weeks before it fails like this again.
Random experiments are not going to explain anything.
This is machine where I often switch back to the Linux 4.4 to get some work done reliably, and I am not seeing any such problems there. The Linux 4.4 is rock solid reliable.
It started when I first installed Slackware 15 (months ago).
Some of the programs could not detect that X-windows was running, and would immediately shutdown.
Now, I am getting the opposite problem.
Trying to startx, the xfcestart script is detecting that X-windows is ALREADY running (it is not)
and exiting. This is right after booting the system, and my initial login.
Today, I had to run it three times before XFCE4 and x-windows would come up.
After the first failure, I printed out $DISPLAY,
>> echo x"$DISPLAY"x
and got back "xx"
Tried startx again, and it failed a second time.
I cannot see the messages now due to this new screen setup where it uses the same system console for X.
Thus, I cannot see any of the error messages from startx.
Tried startx a third time (NO CHANGES TO ANYTHING), and this time it started.
What has happened to BASH that now environment variables are so unreliable, or are they statistically based now. I have tried to diagnose this several times already.
The only thing I can come up with is that BASH is failing in its test, maybe due to its environment variable database pointers being mis-handled.
I have tried putting a line in the profile script to set
DISPLAY=
just to initialize the thing.
It could be 2 or 3 weeks before it fails like this again.
Random experiments are not going to explain anything.
This is machine where I often switch back to the Linux 4.4 to get some work done reliably, and I am not seeing any such problems there. The Linux 4.4 is rock solid reliable.