host-based access instead of Xauthority fails

Bug #427273 reported by frozzy on 2009-09-10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
disper
Wishlist
wvengen

Bug Description

Hi,

when I invoke disper from X terminal such as:
frozzy@t61 ~ $ echo $DISPLAY
:0.0
frozzy@t61 ~ $ disper -l
display DFP-0: LEN
 resolutions: 512x384, 1024x768, 1440x900
display DFP-1: DELL 2208WFP
 resolutions: 320x240, 400x300, 416x312, 512x384, 576x432, 640x480, 640x512, 700x525, 800x600, 832x624, 896x672, 1024x768, 1152x864, 1280x960, 1280x1024, 1400x1050, 1680x1050

it says everything and it's true, but when I try to do the same thing from root account (also X terminal):
t61 ~ # sudo -u frozzy DISPLAY=:0.0 disper -l
display default: default
 resolutions: 1440x900, 3120x1050

I wonder why this happens. Bug? Something wrong ?

The issue come out when I were trying to run disper through UDEV.
I think that udev is opening normal TTY by root. That's why we need to login as user and export DISPLAY.

any ideas ?

Disper -- version is 0.2.3 (nvidia-bug-report, dmesg, and X.org.0.log in attachment)

BR,
Gregory

frozzy (g-orciuch) wrote :
wvengen (wvengen) wrote :

Thanks for your bug report. The output you have as root seems odd, I'll have a look if I can reproduce that. Meanwhile, you might want to consult bug #330258, which discusses invoking disper as root from a script.

frozzy (g-orciuch) wrote :

when I add XAUTHORITY variable is seems to work. Check this out:

t61 ~ # sudo -u frozzy DISPLAY=:0.0 XAUTHORITY=/home/frozzy/.Xauthority disper -l
display DFP-0: LEN
 resolutions: 512x384, 1024x768, 1440x900
display DFP-1: DELL 2208WFP
 resolutions: 320x240, 400x300, 416x312, 512x384, 576x432, 640x480, 640x512, 700x525, 800x600, 832x624, 896x672, 1024x768, 1152x864, 1280x960, 1280x1024, 1400x1050, 1680x1050
--------------------
without xauthority variable:

t61 ~ # sudo -u frozzy DISPLAY=:0.0 disper -l
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

No suitable backend found
----------------
without xauthority variable and with "xhost +" on user side:

t61 ~ # sudo -u frozzy DISPLAY=:0.0 disper -l
display default: default
 resolutions: 1440x900, 3120x1050
---------------

BR,
Gregort

wvengen (wvengen) wrote :

Glad to hear it works with XAUTHORITY. It is strange behaviour though, with "xhost +".

Changed in disper:
assignee: nobody → wvengen (wvengen)
importance: Undecided → Low
wvengen (wvengen) wrote :

It seems that the X library that disper uses fails when no ~/.Xauthority is present; with connections allowed (xhost +) this is precisely what happens, although no ~/.Xauthority is needed in this particular case. Because of this failure, disper falls back to the xrandr backend, which appears not to trigger this problem somehow.

Setting importance to wishlist since there won't be many users relying on host-based access.

Changed in disper:
importance: Low → Wishlist
status: New → Triaged
wvengen (wvengen) wrote :

Just to clarify: the different disper output comes from XRandR in this case, which only lists the current nVidia metamodes that are defined; this is not the EDID information (unless overridden in xorg.conf).

wvengen (wvengen) on 2009-11-10
summary: - two different informations and udev
+ host-based access instead of Xauthority fails
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers