diff --git a/startx.cpp b/startx.cpp
index a390f0341a126c87de91634139de1f0329d0c06d..33b9eb7bfc35117df97ef6c54f2620bbcd90b9a6 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -251,18 +251,7 @@ if [ x"$enable_xauth" = x1 ] ; then
     removelist=
 
     XCOMM set up default Xauth info for this machine
-    case `uname` in
-    Linux*)
-        if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then
-            hostname=`hostname -f`
-        else
-            hostname=`hostname`
-        fi
-        ;;
-    *)
-        hostname=`hostname`
-        ;;
-    esac
+    hostname=`uname -n`
 
     authdisplay=${display:-:0}
 #if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE)
