From e2430bcb8327682340d985f89ad5137efa2f0d4f Mon Sep 17 00:00:00 2001 From: Rickie Schroeder <1187-Gregg16@users.noreply.gitlab.freedesktop.org> Date: Fri, 28 Aug 2020 13:34:05 +0000 Subject: startx: use uname -n instead of hostname startx calls hostname to obtain the hostname, but this is not defined by POSIX, so not guaranteed to work. The script already does some checks to deal with different hostname implementations on Linux. Using uname -n instead fixes this in a portable way. --- startx.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'startx.cpp') diff --git a/startx.cpp b/startx.cpp index a390f03..33b9eb7 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) -- cgit v1.2.3