LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2011, 05:05 AM   #1
RaisedByWolves
LQ Newbie
 
Registered: Apr 2011
Posts: 17

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

Last edited by RaisedByWolves; 04-12-2011 at 05:07 AM.
 
Old 04-12-2011, 05:13 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
 
Old 04-12-2011, 05:15 AM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I think you're refering to mouse-capture
 
Old 04-12-2011, 12:32 PM   #4
RaisedByWolves
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
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)
 
Old 04-12-2011, 12:37 PM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
 
Old 04-12-2011, 02:08 PM   #6
RaisedByWolves
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 04-12-2011, 02:09 PM   #7
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Do you have an /etc/X11/xorg.conf file?

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

Markus
 
Old 04-12-2011, 03:29 PM   #8
RaisedByWolves
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 04-12-2011, 03:36 PM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
 
Old 04-12-2011, 06:04 PM   #10
RaisedByWolves
LQ Newbie
 
Registered: Apr 2011
Posts: 17

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


Reply


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
Changing Window manager through /etc/X11/xinit/xinitrc issacnewton Debian 1 12-15-2010 06:17 AM
Moving xterm/rxvt on window manager is not as smooth cola Slackware 4 12-25-2009 12:32 PM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 09:06 AM
Installed XFree86 4.3 - now only have xterm. Where's the window manager? BrianK Linux - General 5 12-12-2003 02:38 PM
startx with window manager ... supermatt Linux - Newbie 4 11-24-2003 10:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 PM.

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