I'm getting "failed to get user" (with and without sudo)
$ sudo /etc/3DxWare/daemon/3dxsrv -d usb -v
3DxWareUNIX = V1.2.7, ID 2994
$ sudo /etc/3DxWare/daemon/3dxsrv -d usb -debug
[2007-05-20 18:32:13] 3dxsrv.c,647: displayname = :0
[2007-05-20 18:32:13]
[2007-05-20 18:32:13] 3dxsrv.c :: startupCommandLine(), authGetUser(), failed to get user
[2007-05-20 18:32:13] Error: 3dxsrv.c :: startupCommandLine(), authGetUser(), failed to get user
$ sudo /etc/3DxWare/daemon/3dxsrv -debug -firmware USB
[2007-05-20 18:32:34] UdDev: Opening USB device on USB port /proc/bus/usb/002/016
[2007-05-20 18:32:34] UdDev: SpaceNavigator opened
[2007-05-20 18:32:34] UdDev: Opening SpaceNavigator device on USB port /proc/bus/usb/002/016
[2007-05-20 18:32:34] snav_usb.c :: UdDevRezero(): Rezeroing the device
Device = SpaceNavigator
Firmware = V3.18
I did an ltrace and I see a sequence where the /var/run/utmp file is being scanned with setutxent/getutxent.../endutxent, some of the netutxent calls are followed by calls to strstr() with ":0" as the second argument. It looks like it's trying to find the login record for the user on the first X display. When it scans what looks like the correct utmp record, I see this (my login is jbm):
20380 strstr(":%\001Kjbm", ":0") = NULL
It looks like something is not understanding the format of the 384 byte per entry (on my system) utmp file properly or possibly the struct the getutxent function is returning. Maybe the output of who should be parsed instead of, or as a fall-back to scanning the utmp file.
My system is Debian unstable, kernel is 2.6.18.2, glibc is 2.5

