LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Input problems when running startx/xterm/xinit without a window manager (https://www.linuxquestions.org/questions/linux-newbie-8/input-problems-when-running-startx-xterm-xinit-without-a-window-manager-874529/)

RaisedByWolves 04-12-2011 04:05 AM

Input problems when running startx/xterm/xinit without a window manager
 
Hi, I'm looking to run an OpenGL application right from the console without having to boot into any sort of graphical desktop environment.

I've had some success using xinit and startx. I pass them the OpenGL application (either with xinit /dir/app or by editing the $home/.xinitrc), and the program will run (I can see it) however it will not accept input from the keyboard.

The only way I've gotten input to work is if I use startx or xinit to start an xterminal. The terminal will pop up (taking about 1/4 the screen) and if my mouse is hovering over it, it will accept keyboard input. Then I can launch the OpenGL application, and as long as my mouse if over the xterm window (but not the opengl window), it will also accept input.

Anyone done anything similar? I'd like to be able to just xinit the app and have it receive keyboard input without incident.

Deets:
Very light Debian install on a Compaq laptop V2030US

markush 04-12-2011 04:13 AM

Hello RaisedByWolfes, welcome to LQ,

your question doesn't make sense to me. Could you please provide more information: what do you want do do (which OpenGL application do you mean) and why don't you want a Windowmanager to start?

And please post your .xinitrc file.

Markus

EDDY1 04-12-2011 04:15 AM

I think you're refering to mouse-capture

RaisedByWolves 04-12-2011 11:32 AM

I'm constructing an arcade cabinet, and for the cleanest implementation, I want the system to boot directly into the OpenGL game I have set up. Having it boot into a Linux desktop and then auto start the game is less preferable. Also since the hardware is old and the project specialized, I don't want any extraneous packages on the system I don't need.

Using xinit and startx gives me what I need, with the exception that there is no input.

My .xinitrc right now is simply:

exec (game executable)

markush 04-12-2011 11:37 AM

mh, I suspected that the windowmanager twm is started. Normally, if no windowmanager is explicitly started in .xinitrc twm will start. It is the default WM and always installed with the X-server.
twm shows three terminal, the one with the mousecurser over it becomes active.

Markus

RaisedByWolves 04-12-2011 01:08 PM

Well, the mouse cursor issue you mentioned is occurring, but I don't see a terminal unless I change my xinitrc to:

Code:

exec xterm
When I do this, I can move my mouse cursor over the xterm and fire off the openGL app. Then, as long as my cursor is over the xterm, it still works.

When I use this xinitrc:

Code:

exec (openGL app)
I can *see* the openGL app running but it accepts no input.

markush 04-12-2011 01:09 PM

Do you have an /etc/X11/xorg.conf file?

if yes, do you have an input-device-section in this file?

Markus

RaisedByWolves 04-12-2011 02:29 PM

I do not have an xorg.conf file in that location, the only one on the system is in a xserver-org/examples directory.

Is there a configuration step I didn't perform?

Thanks for taking the time to help me through this, btw.

markush 04-12-2011 02:36 PM

nowadays the xorg.conf file normally is not necessary since the X-server recognizes the devices via hal/udev but if you have an xorg.conf file it will be read and the settings within this file will overwrite the other settings. I'd recommend to google for "xorg.conf", you will find much documentation.

Markus

RaisedByWolves 04-12-2011 05:04 PM

Research on xorg.conf turned up that it wasn't really necessary to have this file unless you had unique hardware you needed to explicitly configure. I think my xorg setup may be ok.

I edited the configuration of the openGL application instead, making it boot up in Full-Screen mode. This turned out to solve my input problem - I'm guessing whatever mechanism OpenGL uses to assume fullscreen also grabs all focus and input as well. Since it was running in windowed mode before without a window manager, perhaps there was some disconnect and it was never getting ownership of the keyboard/mouse.

Well, my input problem is solved. I still have an issue in that the application takes up only 1/4th the screen. But I think I can solve that with parameters passed to xinit.

Thanks,
~D


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