Skip to content

Commit

Permalink
shebang 'bash -i +H' to make script interactive. #166 #176
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Aug 7, 2019
1 parent 9cbd3de commit 2621741
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x11docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env bash
#! /usr/bin/env -S bash -i +H

# x11docker
# Run GUI applications and desktop environments in docker
Expand Down Expand Up @@ -2331,10 +2331,9 @@ check_vt() { # option --xorg: find free vt / tty
local Line= Ttyinuse=

# if started from console, use current tty
[ "$Hosttty" = "yes" ] && {
tty -s && [ "$Hosttty" = "yes" ] && {
Newxvt="$(tty | rev | cut -d/ -f1 | rev)"
Newxvt="${Newxvt#tty}"
isnum "$Newxvt" || Newxvt=""
}

# check ttys currently in use
Expand Down Expand Up @@ -5518,9 +5517,10 @@ check_host() { # check host environment
}

# Check whether x11docker runs on X or on tty
tty | grep -q tty && Hosttty="yes" || Hosttty="no"
tty >/dev/null || Hosttty="unkown"
[ "$Winsubsystem" ] && Hosttty="no"
tty | grep -q tty && Hosttty="yes" || Hosttty="no"
tty -s || Hosttty="unkown"
[ -n "${DISPLAY:-}${WAYLAND_DISPLAY:-}" ] && Hosttty="no"
[ "$Winsubsystem" ] && Hosttty="no"
XDG_VTNR=${XDG_VTNR:-}

# Check whether x11docker runs in an interactive terminal
Expand Down

0 comments on commit 2621741

Please sign in to comment.