Permission Problem

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
Qvistarn
Posts: 4
Joined: Tue Mar 06, 2007 3:27 am

Permission Problem

Post by Qvistarn »

Hello there!

I have a problem with your product, The SpacePilot. I get an error while using it, seems like a permission problem. When the install from the CDrom is finnished and I added the line to inittab and finally start the X-application (as normal user) 3DxWare 1.0.0 and try to map my keys it says:"Could not open user's driver configuration file for writing"


To me it's a clear permission problem-case.
But I would appreciate feedback on this matter!

Question 1: Where is the map settings located?
Question 2: Is it stored on the device itself?

Note: I'm using AIX 5.3 and when I'm using the app with root it works great!

Thank you!
All regards,
Qvistarn
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

Hi Qvistarn,

the driver tries to write a files .3dxrc in the $HOME directory of the logged in user. And fails. And: yes, it looks like a permission problem. I can not believe that the logged in user has no write permission to his own $HOME directory???

Please try our latest driver version (version 1.2.0) from our website and let us know if you still have the problem.

Uta Ludwig
3Dconnexion
Qvistarn
Posts: 4
Joined: Tue Mar 06, 2007 3:27 am

Post by Qvistarn »

Thank you uludwig. It sounds odd that I wouldnt have any access to my own $HOME but I will do as you say and check it up and try the new driver. Thank you! I will keep you updated.



/Qvistarn
Qvistarn
Posts: 4
Joined: Tue Mar 06, 2007 3:27 am

Post by Qvistarn »

Hi again.
Very odd indeed... I've checked my permissions and it's no problem at all. I used the installer with the new driver 1.2* and checked that all the files got copied correctly. There's a small change in inittab from old version to new version:

Old:
3dx:234:respawn:/etc/3DxWare/daemon/3dxsrv -d /dev/usb0 >/dev/null 2>&1

New:
3d:234:respawn:/etc/3DxWare/daemon/3dxsrv -d /dev/usb0 </dev>/dev/null 2>&1

The error I get from running it in command line:
Error: 3dxsrv.c :: startupCommandLine(), authGetUser(), failed to get user

No change what so ever if I run as root or as a normal user, same error.

Thank you.
/Qvistarn

EDIT:
Checked dependencies too, I got all the AIX filesets that's required.
devices.pci.22106474
devices.pci.33103500
devices.pci.99172704
devices.pci.c1110358
devices.common.IBM.usb
devices.usbif.03000008

Is there any way to extend logging? I would like to see what he tries to do.
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

Hi Qvistarn,
There's a small change in inittab from old version to new version:

Old:
3dx:234:respawn:/etc/3DxWare/daemon/3dxsrv -d /dev/usb0 >/dev/null 2>&1

New:
3d:234:respawn:/etc/3DxWare/daemon/3dxsrv -d /dev/usb0 </dev>/dev/null 2>&1
I hope this is a typo from you :? , because the line in the /etc/inittab should be:

Code: Select all

3d:234:respawn:/etc/3DxWare/daemon/3dxsrv -d usb < /dev/null >/dev/null 2>&1
And the error you get is a serious one. :( We already have one case like this; but for now there is only an unconfirmed solution. Unfortunately we can not reproduce the problem inhouse. It would be great if you could test a beta version for us. If you are willing to do so, please send me your email address in a private message and I will send the beta driver to you.

Cheers,
Uta
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

Is there any way to extend logging? I would like to see what he tries to do.
You can enable the logging if you extend the launch of the driver with the following options:

Code: Select all

/etc/3DxWare/daemon/3dxsrv -d usb -debug -E
This writes a logfile /tmp/3DxWare.log. It is not really extended, but shows a little bit what the driver tries to do.
Qvistarn
Posts: 4
Joined: Tue Mar 06, 2007 3:27 am

Post by Qvistarn »

My day is soon over... But I need to fill in before I leave.

The extended logging is not giving me anything I'm afraid. Anyway,
with the 1.0 driver everything works great when starting from the command line (and with a normal user). My guess is that when I try to start it from inittab it doesnt know where my $HOME is and therefor the writing permissions. I don't know where inittab reads ENV variables or the export rules. If you have any clue it would be great.

Thanks! And yes I can try your beta drivers and see if I can be of any help.
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

My guess is that when I try to start it from inittab it doesnt know where my $HOME is and therefor the writing permissions. I don't know where inittab reads ENV variables or the export rules. If you have any clue it would be great.
The driver does not read an ENV variable, but requests this info from the system with getpwnam(), which returns a struct passwd *.

Which filesystem are you using? JFS? NFS? ...
Is the user defined per NIS?
sara
Posts: 1
Joined: Mon Mar 19, 2007 3:52 am

Post by sara »

Hello Qvistarn and Uta,

I ran into the very same problem on a Suse 10.1 machine. So far I have not found a solution, but the following workaround:

1. log in as a normal user, starting the X server
2. issue "xhost +localhost"
3. log in as root on a virtual console [Ctrl+Alt+F1] (no commands for root, just log in)
4. switch back to X and the normal user
5. start the driver from the command line
( /etc/3DxWare/daemon/3dxsrv -d /dev/ttyS0 -debug )

My debug output looks like this:

UdDev: Opening Magellan device on serial port /dev/ttyS0
UdDev: Failed to get 3Dconnexion device firmware version - no device detected
rs232Devices.c :: trySB4000(), Opening Spaceball 4000 device on serial port /dev/ttyS0
UdDev: Spaceball 4000 opened
UdDev: Opening Spaceball 4000 RS232 device on serial port /dev/ttyS0
3dxsrv.c,628: displayname = :0.0
3dxsrv.c :: startupCommandLine(), authGetUser(), user=root
3dxsrv.c :: startupCommandLine(), XOpenDisplay called with display name=:0.0, display = 8095318
3dxsrv.c :: startupCommandLine(), SUCCESS!

3DxWareUNIX = V1.1.1
Device = Spaceball 4000
Firmware = V0.24
Home directory: /root
UiSb: Directory "/etc/3DxWare" opened for configs.
UiSb: Directory "/root/.3dxcfg" opened for configs.
....


- If I do not set "xhost +localhost" the driver will fail as it cannot open the display.
- If I do not log in as root, the driver fails with the "failed to get user" line you saw too.
- My configuration files are in roots homedirectory, as the driver is run by root.
- Running the driver from inittab did not work, as it would fail to find a valid display when I log in as a regular user. Issuing "xhost +" did not help, since the driver had already failed to start.
- I suspected that there was an issue with getpwnam() and my login name, which is longer than 8 characters (must be), but that is apparently not the case. Root needs to be logged in. It did not make a difference whether the normal user was a local account or a network (LDAP) account.

I would be happy to help solving the problem if I can.

Cheers,
Steven
ermy
Posts: 9
Joined: Mon Mar 26, 2007 6:14 am

Post by ermy »

I get the same error mess:
Error: 3dxsrv.c :: startupCommandLine(), authGetUser(), failed to get user

3DxWareUNIX = V1.2.0, ID 2770

I'm running HP-SUX 11.11

we have a couple of hundreds SpaceMouse XT (plus)
and we will get some new SpacePilot soon

the older ones work with the old xdriver, but not the new ones

really need to have this solved soon
Post Reply