Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 11-23-2017, 12:55 PM   #1
LQ Newbie
Registered: Jan 2005
Location: Houston, TX, USA
Distribution: Maui
Posts: 14

Rep: Reputation: 0
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:


xsetroot -solid "#000000"
xrdb -load /root/.Xdefaults
exec /usr/bin/tinywm


[Desktop Entry]
Name=Tinywm session
Comment=Ridiculously tiny window manager

[Window Manager]

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.
Old 11-27-2017, 10:30 AM   #2
LQ Newbie
Registered: Jan 2005
Location: Houston, TX, USA
Distribution: Maui
Posts: 14

Original Poster
Rep: Reputation: 0
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 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.
Old 11-29-2017, 09:35 AM   #3
LQ Newbie
Registered: Jan 2005
Location: Houston, TX, USA
Distribution: Maui
Posts: 14

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: First FSFE Summit Will Focus on Social Issues and Strategies LXer Syndicated Linux News 0 08-26-2016 01:30 PM
Linux supported game is having FPS loss issues PACMANchasingme Linux - Games 2 04-02-2015 02:51 AM
Multiseat with MPX: Keyboard focus issues zagzagel Linux - Desktop 0 05-10-2013 06:45 PM
X11 window focus issues ArchonOne Linux - Software 5 12-10-2012 04:40 PM
Mouse Logitech MX518 loss focus and don't click on the active window. JohnV2 Linux - Hardware 4 12-16-2011 01:26 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration