We can see than fvwm-crystal is launched only one time with Xephyr, but with lightdm (and also with startx), lightdm start fvwm-crystal (the 'fvwm -f <config file>' command), which in turn start again fvwm-crystal.
This is a very strange behaviour, because if the fvwm-crystal start script was faulty, the second fvwm invocation should start a third one, which should start a forth one, and so on; and fvwm-crystal should also behave the same with Xephyr; and last but not least, this also should have been the case before my last world update.
I experimented a lot with .bash_profile and .xinitrc and nothing helped. Even with "startx /usr/bin/fvwm-crystal", crystal start a second fvwm instance. Which is very silly because it work as expected with Xephyr.
Very strange issue, and I don't have a clue. I can only say that it doesn't happen here. Latest tree, fvwm-crystal live ebuild. Tried wdm, and startx with ~/.xinitrc. I don't have a ~/.xsession file.
Maybe you have saved some session with a running Xephyr instance, and fvwm-crystal tries in the beginning to restore the state of that saved session?
Also, if, in the FvwmConsole, I run "Restart", fvwm restart only 1 time. But if I run the complete command as in /usr/bin/fvwm-crystal: "Restart fvwm -f /usr/bin/../share/fvwm-crystal/fvwm/config", it start 2 times. At least, it is a convenient way to reproduce that issue.
I don't think so. I try several other things, among them to start fvwm-crystal as another user, a new one, and that issue is the same.
How can you have 2 Xephyr instances on the same DISPLAY :1 (in the picture)? I get a fatal error if I try that.
BTW what program do you use in the picture, to produce the process tree? Does the `ps axjf` command give the same information?
It is only one Xephyr session. The supplemented fvwm-crystal instance is not launched by Xephyr but by fvwm.
Very very odd. It feels like some race condition showing up in fvwm. Maybe it's worth an upstream bug report?
On the other hand, there is a new version of fvwm in bugzilla waiting to be added to portage.
I try with fvwm from the git, and get the same issue. But I found the real problem. Even when starting fvwm without config file, it started 2 times.
fvwm start 2 times when xrandr tell me the second screen is not connected.
The fix was to comment out the second Screen instance of the ServerLayout section in the xorg.conf file.
Now it work fine without external monitor and xrandr find a third output, a HDMI one.