diff options
Diffstat (limited to 'startx.cpp')
-rw-r--r-- | startx.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -243,7 +243,11 @@ if [ x"$enable_xauth" = x1 ] ; then #if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE) mcookie=`MK_COOKIE` #else - mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + if [ -r /dev/urandom ]; then + mcookie=`dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + else + mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + fi if test x"$mcookie" = x; then echo "Couldn't create cookie" exit 1 |