Where/how is $DISPLAY set when connecting with XDMCP?

My "problem" is that it's set correctly and I want to break it, but can't figure out where it's getting set in the first place.

I can see several places where $DISPLAY is referenced but at the point that the dollar sign is in front it's already an environment variable(I think).

I thought this command might help "

find /etc -type -f | xargs grep -l "export DISPLAY"

but it just hangs when run as root.

I tried renaming /usr/openwin/bin/xauth to a completely different name, deleted my .Xauthority file and I still get a new .Xauthority file created upon XDMCP login. So I don't understand what's happening.

Not sure it matters but I'm using CDE as my desktop.

Thanks,
Gary

I'm surprised that find -type -f ... isn't giving you an error. (It should be find -type f ... with no - before the f.) If a file is being sourced in /etc that is exporting DISPLAY, your search may be too specific. (There could be a tab instead of a space, there could be multiple spaces, or the export statement could be exporting multiple variables and DISPLAY might not be the first one in the list.) You might have more luck with the command:

find /etc -type f -exec grep -l DISPLAY {} +

but it is more likely that DISPLAY is being set in the tool that is starting up your terminal window or window manager.

1 Like