Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit e687414

Browse files
committed
Fix Error: GDK_BACKEND does not match available displays
1 parent 125bf32 commit e687414

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

bin/firefox-for-sel-2_version

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ set -e
55
# firefox -version 2>&1
66
#=> Mozilla Firefox 47.0.1
77

8+
# Fix the DISPLAY env var if we saved it
9+
[ -f DISPLAY ] && export DISPLAY=$(cat DISPLAY)
10+
811
# Example:
912
#=> 47.0.1
10-
FFBIN="/home/seluser/firefox-for-sel-2/firefox"
11-
if ${FFBIN} >/dev/null 2>&1; then
12-
${FFBIN} -version 2>&1 | grep -Po '(?<=Firefox )([a-z0-9\.]+)'
13+
FF_CMD="/home/seluser/firefox-for-sel-2/firefox -version"
14+
if ${FF_CMD} >/dev/null 2>&1; then
15+
${FF_CMD} 2>&1 | grep -Po '(?<=Firefox )([a-z0-9\.]+)'
1316
else
14-
${FFBIN} #fail and show error
17+
${FF_CMD} #fail and show error
1518
fi

bin/firefox-for-sel-3_version

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ set -e
55
# firefox -version 2>&1
66
#=> Mozilla Firefox 49.0.1
77

8+
# Fix the DISPLAY env var if we saved it
9+
[ -f DISPLAY ] && export DISPLAY=$(cat DISPLAY)
10+
811
# Example:
912
#=> 49.0.1
10-
FFBIN="/home/seluser/firefox-for-sel-3/firefox"
11-
if ${FFBIN} >/dev/null 2>&1; then
12-
${FFBIN} -version 2>&1 | grep -Po '(?<=Firefox )([a-z0-9\.]+)'
13+
FF_CMD="/home/seluser/firefox-for-sel-3/firefox -version"
14+
if ${FF_CMD} >/dev/null 2>&1; then
15+
${FF_CMD} 2>&1 | grep -Po '(?<=Firefox )([a-z0-9\.]+)'
1316
else
14-
${FFBIN} #fail and show error
17+
${FF_CMD} #fail and show error
1518
fi

bin/firefox_version

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ set -e
55
# firefox -version 2>&1
66
#=> Mozilla Firefox 45.0.2
77

8+
# Fix the DISPLAY env var if we saved it
9+
[ -f DISPLAY ] && export DISPLAY=$(cat DISPLAY)
10+
811
# Example:
912
#=> 45.0.2
1013
if firefox -version >/dev/null 2>&1; then

0 commit comments

Comments
 (0)