More XWilling than meets the eye…

15 Nov, 2007  |  Posted by Danesh  |  in Linux

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 ;)

  • Digg
  • del.icio.us
  • BlinkList
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Furl
  • Google
  • Live
  • Facebook
  • Pownce
  • TwitThis
  • E-mail this story to a friend!
Tags: ,

One Response so far | Have Your Say!

  1. Linux Code and More » Blog Archive » More XWilling than meets the eye…  |  November 15th, 2007 at 11:14 pm #

    [...] Karim Vaes wrote an interesting post today onHere’s a quick excerpt I was configuring XDMCP for some of my linux boxes today, when I noticed that gdm only returns the … | Linux (1) Installing nVidia driver on openSUSE 10.2 | Linux (0) [...]

    Linux Code and More » Blog Archive » More XWilling than meets the eye… - Gravatar

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>