More XWilling than meets the eye…

I was configuring XDMCP for some of my linux boxes today, when I noticed that gdm only returns the kernel version, and not some useful info like the amount of users & machine load that Solaris does.

Thats when I realised scouring around The Linux XDMCP HOWTO would be a good idea. GDM provides a method of displaying additional text info as part of the replies. This is done by place a shell script that outputs certain info depending on what you script.

The howto contained a link to a script that gave exactly what I needed.

 #!/bin/sh

#

# $XFree86$
# 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}"
  1. Just copy the script to /etc/X11/gdm/XWilling
  2. chmod 755 it
  3. Walla!! Users & Load Averages

In this picture here, you can see the difference between the hosts with the XWilling script and those without.

Note the Kernel version and the Load Averages

P.S. Don’t let your inner BOFH script something ‘funny’ for your users ;)

2 Responses to “More XWilling than meets the eye…”

Author comments are in a darker gray color for you to easily identify the posts author in the comments

  1. Bob22 says:

    This is an important point, for many leftists who rally to the cause of non-violent, pro-democracy, movement building, are professedly motivated by pro-democratic sentiments. ,

Leave a Reply

© 2008-2009 The Danesh Project
Powered by Wordpress and made by Guerrilla. Best viewed in Mozilla Firefox