X server issues - focus loss.
So at the beginning of this year I setup a MAME system on Linux at the company I work for using Attract Mode. It's very popular and I've had some request for changes, I built a new parallel system to replace the old one. The old one works perfectly, the new one isn't quite doing right despite basically duplicating the setup.
The long story short - it works, but after I launch a game using the configuration I used before Attract Mode is "out of focus" and even clicking with the mouse / hitting ALT+TAB won't bring it back in, I have to kill X and re-login. It's almost as though it's running in a parallel dimension. If I don't interact with it it still plays the videos and eventually starts the in Attract Mode screen saver. If I use a full blown LXDE Window manager I don't have that particular issue BUT simply playing a game causes weird issues like program/virtual desktop switching. Holding the control stick and pushing buttons sends those signals. The way I set it up that worked on the OLD system - I compiled Attract Mode myself, on the old system I used the Ubuntu MAME. Linux LIND067 4.2.0-28-generic #33-Ubuntu SMP Mon Feb 1 23:09:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux M.A.M.E. v0.160 (Mar 31 2015) - Multiple Arcade Machine Emulator Attract-Mode 1.6.2 (Linux, SFML 2.3 +SWF +7z) I used TinyWM as the Window manager with these files setup: /usr/bin/tinywm-session #!/bin/sh xsetroot -solid "#000000" xrdb -load /root/.Xdefaults attract exec /usr/bin/tinywm /usr/share/xsessions/tinywm-session.desktop [Desktop Entry] Encoding=UTF-8 Name=Tinywm session Comment=Ridiculously tiny window manager Exec=tinywm-session Terminal=False TryExec=tinywm Type=Application [Window Manager] SessionManaged=true The system that DOES NOT work properly: Linux LIND005 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux MAME v0.191 (unknown) Attract-Mode v2.2.1 (Linux, SFML 2.4 +FontConfig +Xinerama +SWF +7z) The two config files on this machine are the same, except that I had to put the full path to launch Attract Mode for some reason. I had a theory that TinyWM is hosed up, at least in relation to this distro version so I experimented with another minimal manager, lwm, with exactly the same results. I've ALSO ditched running Attract Mode from the X-Launch and tried adding it to the .profile file and I've tried using the .xsession and .xsessionrc files. Same results. It just doesn't want to go back to go back to the ONLY program running in the X environment. |
Fixed it myself.
There is something wrong - or at least different - with the newer X release or something. I don't know enough to fix the code and recompile it myself, but the more I looked at it the more it looked to me like attract mode was running not in the window manager, but beside it and fighting it for the X session. I don't know if that's a proper explanation or not, but that's what it looked like in my mind. This doesn't make any sense to me, considering way back when UT 2003 was still new and I had a system just below the recommended specs (CPU wise, but way more than recommended RAM) I slipped by in performance wise by making the program my window manager when I typed startx - of course X is WAY different today in config than it used to be. I switched to Open Box, made sure there wasn't an rc.xml and followed the instructions at http://openbox.org/wiki/Help:Autostart to start Attract mode. It seemed important to me that the window manager itself launch the program instead of having the program launch aside the manager. That seemed to be right. In addition I can exit Attract Mode and still do work if I need to unlike the other method I used on the previous machine. |
Scratch that - a little
The above is mostly accurate, but I found that I still had the desktop switching issue. I had to copy /etc/xdg/openbox/rc.xml to ~/.config/openbox THEN I had to edit the file and replace the key="whatever key" with key="" to eliminate the switching. |
All times are GMT -5. The time now is 12:46 AM. |