Author Topic: Not total NEWB need help X-Windows  (Read 2350 times)

pecosdave

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Not total NEWB need help X-Windows
« on: November 22, 2017, 10:24:15 AM »
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.

If I use a full blown Window manager I don't have that particular issue BUT simply playing a game causes weird issues like program/virtual desktop switching.

The way I set it up that worked on the OLD system -  I compiled Attract Mode myself, I can't recall if I compiled MAME myself or not.

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 reaon.

I have a theory that TinyWM is hosed up, at least in relation to this distro version so I'm going to start experimenting with other minimal window managers, but if anyone has an easy fix please share.

Also, this is my first post - I'm the oldest pecosdave on the web, so if you start looking you'll probably find me all over the place.  I used to be the ONLY pecosdave on the web, but first a gambler then a porn-king started calling themselves by my name, so those two results and a couple of weird Sony things aren't me.

pecosdave

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Not total NEWB need help X-Windows
« Reply #1 on: November 27, 2017, 08:27:52 AM »
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.

pecosdave

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: Not total NEWB need help X-Windows
« Reply #2 on: November 29, 2017, 07:33:48 AM »
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.