Situation
A linux server is running an xdm supporting XDMCP, it is connected to from various different Linux and OS X boxes using XDMCP via an X -query <server> command.
Once the user is logged in the window manager is started, which is mostly controlled from the keyboard using an assigned meta key.
Problem
The assigned meta key needs to depend on the platform of the box that connects to the linux server. How do I figure out what the platform is behind the connected X server?
Thoughts
I cannot use the DISPLAY environment variable to switch on, the IPs of the connecting boxes are assigned by DHCP and give no clue what the platform of the box is.
I know the -class option to X can be used to set the display class, which then could be used to set defaults for the various display classes in Xresources. However I don't know how to get the class of the connected Xserver from the command line (or a little custom C program) and furthermore, I don't know how to get the value of an Xresource that would be configured with that class.
Ideally the used meta key could be configured on the box running the X server, so that the linux server running the xdm does not need any reconfiguration when a new type of platform is introduced in the setup.
What is the best way to go about this? Is it possible to determine the platform the X server is running on? Can some configuration option be passed from the Xserver to the window manager scripts? Is there a better way to resolve this?