Unpack the XFree86 source. (tar -xzf XFree86-3.3.tar.gz '*/programs/xdm/*') Change into the xdm source directory. Apply the patch with patch -p1