diff options
author | Jan Grulich <jgrulich@redhat.com> | 2020-07-03 13:56:35 +0200 |
---|---|---|
committer | Jan Grulich <jgrulich@redhat.com> | 2020-07-03 14:01:56 +0200 |
commit | 989491eb4b325f980e94d27e0ad1a7bee63b6ebd (patch) | |
tree | 8a3e3685ce7053d52ef547a29036179f51cc84b9 /unix | |
parent | 38726ce083db1a9227325bf87989513499bfa698 (diff) | |
download | tigervnc-989491eb4b325f980e94d27e0ad1a7bee63b6ebd.tar.gz tigervnc-989491eb4b325f980e94d27e0ad1a7bee63b6ebd.zip |
Remove trailing spaces in user name
It's quite easy to make a mistake and add an additional space when configuring
users in the vncserver.users config file. You will then get an error that the
user doesn't exist and it's hard to spot the mistake. Same applies for a space
before the display number.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/vncserver/vncsession-start.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/vncserver/vncsession-start.in b/unix/vncserver/vncsession-start.in index b20fcdd9..65ee0a81 100644 --- a/unix/vncserver/vncsession-start.in +++ b/unix/vncserver/vncsession-start.in @@ -33,7 +33,7 @@ fi DISPLAY="$1" -USER=`grep "^${DISPLAY}=" "${USERSFILE}" 2>/dev/null | head -1 | cut -d = -f 2-` +USER=`grep "^ *${DISPLAY}=" "${USERSFILE}" 2>/dev/null | head -1 | cut -d = -f 2- | sed 's/ *$//g'` if [ -z "${USER}" ]; then echo "No user configured for display ${DISPLAY}" >&2 |