diff options
author | Rickie Schroeder <1187-Gregg16@users.noreply.gitlab.freedesktop.org> | 2020-08-28 13:34:05 +0000 |
---|---|---|
committer | Rickie Schroeder <1187-Gregg16@users.noreply.gitlab.freedesktop.org> | 2020-08-28 13:34:05 +0000 |
commit | e2430bcb8327682340d985f89ad5137efa2f0d4f (patch) | |
tree | f8b81cdbfa6e2091267fb4fb1707de34ebe1c311 | |
parent | 91d2aba6364ec6685411595ccafea69fe9d20d6c (diff) |
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.
-rw-r--r-- | startx.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -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) |