Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (108)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Using 3DConnexions SpaceNavigator  (Read 6233 times)
0 Members and 1 Guest are viewing this topic.
Offline john.preston

Junior Member




Java games rock!


« Posted 2007-06-13 18:34:44 »

I'm new to Jinput and want to know if it would be possible to read the 3DConnexions SpaceNavigator 6DOF USB input device in my jogl application.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #1 - Posted 2007-06-13 20:38:03 »

Hi

The information I've managed to read suggests that the answer is no (it doesn't seem to expose anything to directx). We don't currently have a JInput plugin for it at the moment, but this could be solved  Grin

I'm going to speak to them to see if that is correct. I'll let you know.

HTH

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #2 - Posted 2007-06-14 21:33:51 »

I'm going to speak to them to see if that is correct. I'll let you know.
Thanks. I'll wait for your reply.  Smiley

John
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #3 - Posted 2007-06-14 23:09:46 »

Hi

I contacted them about 24 hours ago, and I've heard nothing back. Unless they get back to me, the best I can do is offer you advice if you decide to implement a JInput plugin yourself.

Sorry Sad

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #4 - Posted 2007-06-15 15:30:49 »

Advice is good. I can work with that. What do I do.

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #5 - Posted 2007-06-15 19:45:46 »

Hi

It depends on the importance of supporting the controller, the time requirements, and the financial status of the project that needs it. The quickest, but most expensive way is to make an offer to the community to purchase a controller for an experienced JInput dev to write a plugin to support it. It worked for the wintab plugin Smiley. The slowest, but cheapest option, is for you to go it alone and try looking at the existing plugins to work out how to implement one for the device.

If you chose to do the implementation yourself, you can always ask questions here, and providing someone knows the answer, you should get a response within a few hours to a day (depending on time zone, unfortunately I am not allowed to post to forums from work, so it has to be when I am home).

HTH

Endolf

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #6 - Posted 2007-06-15 20:03:54 »

Looking at their developers guide it looks like it might show up under Mac and Linux and "just work" already. They do have a JNI wrapper to their SDK, which might you if you decide to do the plugin yourself.

HTH

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #7 - Posted 2007-06-18 17:01:44 »

OK. I'l try it and see what happens. The project that needs it dosen't have too much money but time is more precious.

I'll be in touch.

John
Offline john.preston

Junior Member




Java games rock!


« Reply #8 - Posted 2007-06-19 03:16:30 »

OK. I downloaded the latest binaries http://www.newdawnsoftware.com/resources/jinput/jinput_combined_dist_latest.zip and http://www.newdawnsoftware.com/resources/jinput/jinput-tests-20060514.jar.

I unpacked them and ran:
java -Djava.library.path=. -cp jinput.jar:jinput-test.jar net.java.games.input.test.ControllerTextTest

It didn't appear to pick up the SpaceNavigator. Just :
Quote
Controller Env = net.java.games.input.DefaultControllerEnvironment@ab95e6
Linux plugin claims to have found 5 controllers
Power Button (FF)
Type: Keyboard
Component Count: 1
Component 0: Unknown
    Identifier: Unknown
    ComponentType: Absolute Digital
---------------------------------
Sleep Button (CM)
Type: Keyboard
Component Count: 1
Component 0: Sleep
    Identifier: Sleep
    ComponentType: Absolute Digital
---------------------------------
AT Translated Set 2 keyboard
Type: Keyboard
Component Count: 144
Component 0: Escape
    Identifier: Escape
    ComponentType: Absolute Digital
Component 1: 1
    Identifier: 1
    ComponentType: Absolute Digital
.........................
.........................
.........................
---------------------------------
HID 1241:1177
Type: Mouse
Component Count: 6
Component 0: Left
    Identifier: Left
    ComponentType: Absolute Digital
Component 1: Right
    Identifier: Right
    ComponentType: Absolute Digital
Component 2: Middle
    Identifier: Middle
    ComponentType: Absolute Digital
Component 3: x
    Identifier: x
    ComponentType: Relative Analog
Component 4: y
    Identifier: y
    ComponentType: Relative Analog
Component 5: z
    Identifier: z
    ComponentType: Relative Analog
---------------------------------
Macintosh mouse button emulation
Type: Mouse
Component Count: 5
Component 0: Left
    Identifier: Left
    ComponentType: Absolute Digital
Component 1: Right
    Identifier: Right
    ComponentType: Absolute Digital
Component 2: Middle
    Identifier: Middle
    ComponentType: Absolute Digital
Component 3: x
    Identifier: x
    ComponentType: Relative Analog
Component 4: y
    Identifier: y
    ComponentType: Relative Analog
---------------------------------

When I tried the java -Djava.library.path=. -cp jinput.jar:jinput-test.jar net.java.games.input.test.ControllerReadTest
it gave me a number of windows but none of them showed any reaction to my moving the SpaceNavigator.

Does that mean the device was not recognised by the available drivers.

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #9 - Posted 2007-06-19 08:27:37 »

Quote
Does that mean the device was not recognised by the available drivers.

Looks that way. The jinput-test.jar should be in the combined distribution zip. That looks like my fault, I'll sort that Smiley.

I was just going off the fact that it's a standard HID device. is there an event device node in /dev/input/ for the device?, can you read it with evtest?, is it readable by the user running the jinput tests?, is is writable?

Cheers

Endolf

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline john.preston

Junior Member




Java games rock!


« Reply #10 - Posted 2007-06-19 13:15:12 »

is there an event device node in /dev/input/ for the device?
After plugging in the device I get the following output from dmesg
Quote
usb 1-2: new low speed USB device using uhci_hcd and address 3
usb 1-2: configuration #1 chosen from 1 choice
input: 3Dconnexion SpaceNavigator as /class/input/input7
input: USB HID v1.10 Multi-Axis Controller [3Dconnexion SpaceNavigator] on usb-0000:00:1d.0-2
Looking at /dev/input I get
Quote
event0  event1  event2  event3  event4  event5  event6  mice  mouse0  mouse1
event6 wasn't there before.
Quote
can you read it with evtest?
How do I check this?

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #11 - Posted 2007-06-19 18:31:19 »

event6 wasn't there before.
Thats a good sign Smiley, what are the file permissions on that dev node?

Quote
How do I check this?

Depends on your distribution, under ubuntu, it's part of dvb-utils (apt-get install dvb-utils), mandriva and opensuse seems to have an input-utils package

HTH

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #12 - Posted 2007-06-20 00:10:08 »

Thats a good sign Smiley, what are the file permissions on that dev node?
crw------- 1 root root 13, 70 Jun 19 17:07 event6

I am running Fedora Core 6 and I don't see any input-utils package in the yum repository

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #13 - Posted 2007-06-20 08:41:40 »

Are you running JInput as root?

if not, you won't be able to read that node, and thats why JInput can't do anything with that device, not even get the name. Best bet is to change the ownership. /etc/udev/rules.d/40-permissions.rules contains the udev rules for event[0-9] on ubuntu, and setting the group to plugdev, and adding my normal user to plugdev group means that I get the right permissions on reboot and whenever I plug in new devices.

Proof again that Linux is still a pain to work with. When it does work, it's great, but it's still beyond joe average. Maybe thats safer for the rest of us though ;p

HTH

Endolf

P.S. I got evtest from dvb-utils, maybe FC has that package.

Offline john.preston

Junior Member




Java games rock!


« Reply #14 - Posted 2007-06-21 00:37:44 »

Are you running JInput as root?
Yes. I'm rnning it as root. I saw the problem with not having permission.

I'll see if I can install the dvb-utils package and try evtest.

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #15 - Posted 2007-06-21 08:31:52 »

What kernel are you running, it appears that there might have been a regression bug in 2.6.16 that stopped the device working properly, but it's fixed again in 2.6.20, apparently.

Not having one myself, I can't test it though.

Endolf

Edit, just found this test application. If that works, jinput should, if it doesn't, and evtest also doesn't like the device, then it's a system level thing, not JInput. Let us know how you go.

Offline john.preston

Junior Member




Java games rock!


« Reply #16 - Posted 2007-06-26 14:42:44 »

What kernel are you running, it appears that there might have been a regression bug in 2.6.16 that stopped the device working properly, but it's fixed again in 2.6.20, apparently.
2.6.20-1.2952.fc6

Edit, just found this test application. If that works, jinput should, if it doesn't, and evtest also doesn't like the device, then it's a system level thing, not JInput.

Wicked!!.
spacenavi /dev/input/event6
found "3Dconnexion SpaceNavigator" on /dev/input/event6
Supported event types:
  Event type 0x00  (Sync?)
  Event type 0x01  (Keys or Buttons)
  Event type 0x02  (Relative Axes)
  Event type 0x11  (LEDs)
detected leds:
  8,
State:    0    0    0   38  -47    1 - off off

and moving the control shows up in the six variables. OK. So now that we know that the OS recognises it, how do we get jinput to see it. I'm taking it that jinput is the best bet to access it across Linux, Mac and Windows?

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #17 - Posted 2007-06-26 19:18:40 »

Hmm

Well, it should at this point 'just work'. It obviously isn't though Smiley.

Looks like I'm going to have to put together a zip with shed loads of debug in it so that we can diagnose the issue. I'm *guessing* that it might fail identifying the class of device or something, but with out one here, all I can do is dump every decision jinput makes and lets see how it goes. I'll work on it tonight (it's 6:16pm here now). I'll post back when I've got something to try.

Reporting broken cases like this are invaluable to getting JInput working as it should. So thank you Smiley.

And yes, although I might be bias, I think JInput is your best bet, although with that device, I think directx will be a limitation under windows (the drivers seem to provide their own API rather than using directx).

Endolf

Edit: Try this package.

Offline john.preston

Junior Member




Java games rock!


« Reply #18 - Posted 2007-06-27 15:58:09 »

Reporting broken cases like this are invaluable to getting JInput working as it should. So thank you Smiley.
Thank you. Smiley

OK, here goes.

java -Djava.library.path=dist -cp dist/jinput.jar:dist/jinput-test.jar net.java.games.input.test.RumbleTest
Trying to open /dev/input/event6
Type guess from components: Mouse
Opened /dev/input/event6, found 3Dconnexion SpaceNavigator
Trying to open /dev/input/event4
Type guess from components: Keyboard
Opened /dev/input/event4, found Power Button (FF)
Trying to open /dev/input/event5
Type guess from components: Keyboard
Opened /dev/input/event5, found Sleep Button (CM)
Trying to open /dev/input/event3
Type guess from components: Unknown
Opened /dev/input/event3, found PC Speaker
============================================
No clue what type PC Speaker is, we guessed at Unknown
============================================
Trying to open /dev/input/event1
Type guess from components: Keyboard
Opened /dev/input/event1, found AT Translated Set 2 keyboard
Trying to open /dev/input/event2
Type guess from components: Mouse
Opened /dev/input/event2, found HID 1241:1177
Trying to open /dev/input/event0
Type guess from components: Mouse
Opened /dev/input/event0, found Macintosh mouse button emulation
Linux plugin claims to have found 5 controllers
Scanning Power Button (FF)
Found 0 rumblers
Scanning Sleep Button (CM)
Found 0 rumblers
Scanning AT Translated Set 2 keyboard
Found 0 rumblers
Scanning HID 1241:1177
Found 0 rumblers
Scanning Macintosh mouse button emulation
Found 0 rumblers


java -Djava.library.path=dist -cp dist/jinput.jar:dist/jinput-test.jar net.java.games.input.test.ControllerTextTest
Controller Env = net.java.games.input.DefaultControllerEnvironment@ab95e6
Trying to open /dev/input/event6
Type guess from components: Mouse
Opened /dev/input/event6, found 3Dconnexion SpaceNavigator
Trying to open /dev/input/event4
Type guess from components: Keyboard
Opened /dev/input/event4, found Power Button (FF)
Trying to open /dev/input/event5
Type guess from components: Keyboard
Opened /dev/input/event5, found Sleep Button (CM)
Trying to open /dev/input/event3
Type guess from components: Unknown
Opened /dev/input/event3, found PC Speaker
============================================
No clue what type PC Speaker is, we guessed at Unknown
============================================
Trying to open /dev/input/event1
Type guess from components: Keyboard
Opened /dev/input/event1, found AT Translated Set 2 keyboard
Trying to open /dev/input/event2
Type guess from components: Mouse
Opened /dev/input/event2, found HID 1241:1177
Trying to open /dev/input/event0
Type guess from components: Mouse
Opened /dev/input/event0, found Macintosh mouse button emulation
Linux plugin claims to have found 5 controllers
Power Button (FF)
Type: Keyboard
Component Count: 1
Component 0: Unknown
    Identifier: Unknown
    ComponentType: Absolute Digital
---------------------------------
Sleep Button (CM)
Type: Keyboard
Component Count: 1
Component 0: Sleep
    Identifier: Sleep
    ComponentType: Absolute Digital
---------------------------------
AT Translated Set 2 keyboard
Type: Keyboard
Component Count: 144
Component 0: Escape
    Identifier: Escape
    ComponentType: Absolute Digital
Component 1: 1
    Identifier: 1
    ComponentType: Absolute Digital
Component 2: 2
    Identifier: 2
    ComponentType: Absolute Digital
Component 3: 3
    Identifier: 3
    ComponentType: Absolute Digital
Component 4: 4
    Identifier: 4
    ComponentType: Absolute Digital
Component 5: 5
    Identifier: 5
    ComponentType: Absolute Digital
Component 6: 6
    Identifier: 6
    ComponentType: Absolute Digital
Component 7: 7
    Identifier: 7
    ComponentType: Absolute Digital
Component 8: 8
    Identifier: 8
    ComponentType: Absolute Digital
Component 9: 9
    Identifier: 9
    ComponentType: Absolute Digital
....................................
....................................
....................................
....................................
Component 142: Unknown
    Identifier: Unknown
    ComponentType: Absolute Digital
Component 143: Unknown
    Identifier: Unknown
    ComponentType: Absolute Digital
---------------------------------
HID 1241:1177
Type: Mouse
Component Count: 6
Component 0: Left
    Identifier: Left
    ComponentType: Absolute Digital
Component 1: Right
    Identifier: Right
    ComponentType: Absolute Digital
Component 2: Middle
    Identifier: Middle
    ComponentType: Absolute Digital
Component 3: x
    Identifier: x
    ComponentType: Relative Analog
Component 4: y
    Identifier: y
    ComponentType: Relative Analog
Component 5: z
    Identifier: z
    ComponentType: Relative Analog
---------------------------------
Macintosh mouse button emulation
Type: Mouse
Component Count: 5
Component 0: Left
    Identifier: Left
    ComponentType: Absolute Digital
Component 1: Right
    Identifier: Right
    ComponentType: Absolute Digital
Component 2: Middle
    Identifier: Middle
    ComponentType: Absolute Digital
Component 3: x
    Identifier: x
    ComponentType: Relative Analog
Component 4: y
    Identifier: y
    ComponentType: Relative Analog
---------------------------------


java -Djava.library.path=dist -cp dist/jinput.jar:dist/jinput-test.jar net.java.games.input.test.ControllerReadTest
Trying to open /dev/input/event6
Type guess from components: Mouse
Opened /dev/input/event6, found 3Dconnexion SpaceNavigator
Trying to open /dev/input/event4
Type guess from components: Keyboard
Opened /dev/input/event4, found Power Button (FF)
Trying to open /dev/input/event5
Type guess from components: Keyboard
Opened /dev/input/event5, found Sleep Button (CM)
Trying to open /dev/input/event3
Type guess from components: Unknown
Opened /dev/input/event3, found PC Speaker
============================================
No clue what type PC Speaker is, we guessed at Unknown
============================================
Trying to open /dev/input/event1
Type guess from components: Keyboard
Opened /dev/input/event1, found AT Translated Set 2 keyboard
Trying to open /dev/input/event2
Type guess from components: Mouse
Opened /dev/input/event2, found HID 1241:1177
Trying to open /dev/input/event0
Type guess from components: Mouse
Opened /dev/input/event0, found Macintosh mouse button emulation
Linux plugin claims to have found 5 controllers
Component count = 1
Component count = 1
Component count = 144
Component count = 6
Component count = 5
Failed to poll device: Failed to get device key states (9)

Power Button (FF) disabled
Failed to poll device: Failed to get device key states (9)

Sleep Button (CM) disabled
Failed to poll device: Failed to get device key states (9)

AT Translated Set 2 keyboard disabled
Failed to poll device: Failed to get device key states (9)

HID 1241:1177 disabled
Failed to poll device: Failed to get device key states (9)

Macintosh mouse button emulation disabled


The ControllerReadTest opens 6 windows: ControllerReadTest, Power Button (FF), HID 1241:1177, AT Translated Set 2 keyboard, Macintosh mouse button emulation, Sleep Button (CM). None for the Space Navigator

See anything?

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #19 - Posted 2007-06-27 22:56:31 »

Ok, try this one. You can run controller event test instead of text test, I'm only interested in my extra debug as hopefully that will tell us why JInput ignores the device. Although I do think I know why now, after seeing your earlier post. JInput is thinking it's a mouse. I'm betting that there are either no buttons on the device, or they are numbered buttons, and right now, JInput expects the left mouse button to exist as left under Linux.

Lets see if that works Smiley

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #20 - Posted 2007-06-28 06:40:14 »

OK. Success. The ControllerEventTest opens the window (screen dump attached).
java -Djava.library.path=dist -cp dist/jinput.jar:dist/jinput-test.jar net.java.games.input.test.ControllerEventTest
Trying to open /dev/input/event6
Got key of id 0
Got key of id 1
Got rel of id x
Got rel of id y
Got rel of id z
Got rel of id slider-velocity
Got rel of id slider-velocity
Got rel of id slider-velocity
Type guess from components: Mouse
Opened /dev/input/event6, found 3Dconnexion SpaceNavigator
============================
Endolf, you can't even get something as simple as mouse buttons sorted. The code clearly *guesses* at whats a mouse, so don't assume that if JInput guesses it's a mouse, that it is indeed a real mouse, with a real left mouse button. Spanner
Go back to playing games Endolf, you obviously can't code for them Wink
============================
Trying to open /dev/input/event4
Got key of id Unknown
Type guess from components: Keyboard
Opened /dev/input/event4, found Power Button (FF)
Trying to open /dev/input/event5
Got key of id Sleep
Type guess from components: Keyboard
Opened /dev/input/event5, found Sleep Button (CM)
Trying to open /dev/input/event3
Type guess from components: Unknown
Opened /dev/input/event3, found PC Speaker
============================================
No clue what type PC Speaker is, we guessed at Unknown
============================================
Trying to open /dev/input/event1
Got key of id Escape
Got key of id 1
Got key of id 2
Got key of id 3
Got key of id 4
Got key of id 5
Got key of id 6
Got key of id 7
Got key of id 8
Got key of id 9
Got key of id 0
Got key of id -
Got key of id =
Got key of id Back
Got key of id Tab
Got key of id Q
Got key of id W
Got key of id E
Got key of id R
Got key of id T
Got key of id Y
Got key of id U
Got key of id I
Got key of id O
Got key of id P
Got key of id [
Got key of id ]
Got key of id Return
Got key of id Left Control
Got key of id A
Got key of id S
Got key of id D
Got key of id F
Got key of id G
Got key of id H
Got key of id J
Got key of id K
Got key of id L
Got key of id ;
Got key of id '
Got key of id ~
Got key of id Left Shift
Got key of id \
Got key of id Z
Got key of id X
Got key of id C
Got key of id V
Got key of id B
Got key of id N
Got key of id M
Got key of id ,
Got key of id .
Got key of id /
Got key of id Right Shift
Got key of id Multiply
Got key of id Left Alt
Got key of id 
Got key of id Caps Lock
Got key of id F1
Got key of id F2
Got key of id F3
Got key of id F4
Got key of id F5
Got key of id F6
Got key of id F7
Got key of id F8
Got key of id F9
Got key of id F10
Got key of id Num Lock
Got key of id Scroll Lock
Got key of id Num 7
Got key of id Num 8
Got key of id Num 9
Got key of id Num -
Got key of id Num 4
Got key of id Num 5
Got key of id Num 6
Got key of id Num +
Got key of id Num 1
Got key of id Num 2
Got key of id Num 3
Got key of id Num 0
Got key of id Num .
Got key of id Unknown
Got key of id Unknown
Got key of id F11
Got key of id F12
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Num Enter
Got key of id Right Control
Got key of id Num /
Got key of id SysRq
Got key of id Right Alt
Got key of id Home
Got key of id Up
Got key of id Pg Up
Got key of id Left
Got key of id Right
Got key of id End
Got key of id Down
Got key of id Pg Down
Got key of id Insert
Got key of id Delete
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Num =
Got key of id Unknown
Got key of id Pause
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Sleep
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id Unknown
Got key of id F13
Got key of id F14
Got key of id F15
Got key of id Unknown
Got key of id Unknown
Type guess from components: Keyboard
Opened /dev/input/event1, found AT Translated Set 2 keyboard
Trying to open /dev/input/event2
Got key of id Left
Got key of id Right
Got key of id Middle
Got rel of id x
Got rel of id y
Got rel of id z
Type guess from components: Mouse
Opened /dev/input/event2, found HID 1241:1177
Trying to open /dev/input/event0
Got key of id Left
Got key of id Right
Got key of id Middle
Got rel of id x
Got rel of id y
Type guess from components: Mouse
Opened /dev/input/event0, found Macintosh mouse button emulation
Linux plugin claims to have found 6 controllers
Component count = 8
Component count = 1
Component count = 1
Component count = 144
Component count = 6
Component count = 5

JInput is thinking it's a mouse. I'm betting that there are either no buttons on the device, or they are numbered buttons, and right now, JInput expects the left mouse button to exist as left under Linux.
There are two buttons on the device.

John
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #21 - Posted 2007-06-28 08:14:17 »

Excellent.

I'll sort out a fix tonight and do a proper build.

Cheers

Endolf

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #22 - Posted 2007-06-28 23:11:25 »

Ok

Try this. If that works, perfect.

The combined dist of that can be found here

HTH

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #23 - Posted 2007-06-29 23:36:22 »

Perfecto!!

One quick question. I remember seeing a set of instructions somewhere, on how to change the permissions on the devices to allow non root users to read the events. Can you tell me how to do it or point me to where this information is stored. I use webstart for my application (http://www.ejamaica.org/jroam/jroam.jnlp)  and I will need to insert some code that on the linux platform calls some native script to change the permissions if they are not properly set.

John

Thanks again for your help.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #24 - Posted 2007-06-30 00:32:37 »

If the user running the code does not already have permissions to the device, what makes you thing the will be able to change them?

Ubuntu for example. As root I had to change the udev config so that it gave group permissions to the /dev/input/event nodes for the user I run as.

Endolf

Offline john.preston

Junior Member




Java games rock!


« Reply #25 - Posted 2007-06-30 13:17:59 »

If the user running the code does not already have permissions to the device, what makes you thing the will be able to change them?

Ubuntu for example. As root I had to change the udev config so that it gave group permissions to the /dev/input/event nodes for the user I run as.
I was planning to check if the user had permission to read the /dev/input/event nodes, and if not then to popup a box for the user to enter the root password and then run a script that would change the permissions as root. This would only be done once.

John
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (17 views)
2014-07-30 21:08:39

Riven (23 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!