[LightDM] {Disarmed} Re: Lightdm host in XDMCP chooser menu

Wolfgang Baudler wbaudler at gb.nrao.edu
Thu May 5 00:20:13 UTC 2016


> Hi Wolfgang,
>
>>From the XDMCP documentation:
>
>     *Hostname*: ARRAY8
>       Is a human readable string describing the host from which the packet
> was sent. The protocol specifies no interpretation of the data in this
> field.
>     *Status*: ARRAY8
>       Is a human readable string describing the status of the host. This
> could include load average/number of users connected or other information.
> The protocol specifies no interpretation of the data in this field.
> Looking at the LightDM code we don't set anything in these fields. It
> seems
> we should probably set hostname to the system hostname (and make
> configurable in lightdm.conf). Not sure what is appropriate to set status
> to (if anything).
>

Regarding status, the original xdm comes with a shell script called
"Xwilling" which produces the status field string by default. Example:

3 users, load: 0.00, 0.07, 0.14

The script looks like that:

#!/bin/sh
#

# The output of this script is displayed in the chooser window.
# (instead of "Willing to manage")

load="`uptime|sed -e 's/^.*load[^0-9]*//'`"
nrusers="`who|cut -c 1-8|sort -u|wc -l|sed 's/^[ 	]*//'`"
s=""; [ "$nrusers" != 1 ] && s=s

echo "${nrusers} user${s}, load: ${load}"



Wolfgang




More information about the LightDM mailing list