Skip to content

Commit 02b9485

Browse files
author
Eliot Eshelman
committed
Bug fix: unsure user's HOME dir set
1 parent 7b230a3 commit 02b9485

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

usr/libexec/microway/interactive_connection_script

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
#
1818
# Modified scripts (with bugfixes and additional feature support):
19-
# Copyright (C) 2015-2016 Microway, Inc. All rights reserved.
19+
# Copyright (C) 2015-2018 Microway, Inc. All rights reserved.
2020
# http://www.microway.com
2121
#
2222
#
@@ -72,6 +72,14 @@ for (( i=0; i<100; i++ )); do
7272
done
7373

7474

75+
# In some environments, the HOME environment variable may not be set. Ensure
76+
# that something sensible is in place before the user's shells start up.
77+
if [[ -n "$HOME" ]]; then
78+
export HOME="$(cd ~ && pwd)"
79+
fi
80+
screen -S "$SCREENSESSION" -X setenv HOME "$HOME"
81+
82+
7583
# If DISPLAY is set then send it to the screen session (for X11 forwarding)
7684
if [[ -n "$DISPLAY" ]]; then
7785
screen -S "$SCREENSESSION" -X unsetenv DISPLAY

0 commit comments

Comments
 (0)