Friday, February 20, 2009

xdm hold the debian, please

I switched from GDM to XDM. You have no idea how infuriating that extra second of waiting can be for someone who works on computers all day long. Anyway, the Ubuntu package of XDM appears to be directly from Debian. They replaced the standard X.org logo with a Debian swirl. To change this back to how it was, edit /etc/X11/xdm/Xresources.

Change:
xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/debian.xpm


To:
xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/xorg.xpm


This also points to you being able to change that pixmap to whatever suits your fancy. May I recommend a sweet photo of Max Headroom or HAL 9000?

God is love,
Rev Beav

Wednesday, February 18, 2009

xmessage and the simple things in life

I have a slow computer. I bought it before I could grow a beard or even any back hair. Full on GNOME is usually a little too heavy, so I run everything from FVWM to Fluxbox to whatever.

I thought it would be nice to shutdown with a menu command.

The program xmessage will allow you to setup multiple buttons, each with a different number. That number will be the return code for the program. Bash (bless its little heart) will allow you to query the return code in the variable "$!". They seem like a natural fit!

I did a little visudo so that my group could call shutdown without entering a password.

%admin ALL=NOPASSWD: /sbin/shutdown


Here's the contents of my shutdown script:

#!/bin/bash

xmessage -buttons "Yeah boy!":0,"Quit rushin' me...":1 "Shut this bitch down?"

if [ $? == 0 ]; then
sudo shutdown -h now
fi