Opened 4 years ago

Closed 4 years ago

#13717 closed defect (fixed)

Make "sh start-tor-browser" give a useful error message

Reported by: arma Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Keywords: TorBrowserTeam201502R, GeorgKoppen201502R
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

The blog comments have some Ubuntu users who try to start their Tor Browser with
sh start-tor-browser (I guess because they can't click-click on it and this is how they think you run scripts) and their result is a confusing start-tor-browser: 221: start-tor-browser: Syntax error: "(" unexpected.

Perhaps we can stick some shell ninja code in earlier to recognize that it's not bash we're running under, and tell the user how to run it correctly?

Child Tickets

Change History (7)

comment:1 Changed 4 years ago by dcf

#7196 and #7476 are earlier reports of this problem.

comment:2 Changed 4 years ago by dcf

#13375 is about shipping a clickable .desktop file that would also mitigate this issue, by making users less likely to resort to the terminal.

comment:3 Changed 4 years ago by cypherpunks

This certainly isn't shell ninja code, but just adding something like

# Make sure this script wasn't started as 'sh start-tor-browser' or similar.
if [ "x$BASH" = "x" ]; then

echo "The $complain_dialog_title should be started as './start-tor-browser'"
echo "Exiting." >&2
exit 1;

fi

would alredy prevent people from trying to run start-tor-browser using a shell other than bash.
But this would be enough, as starting the browser using 'bash start-tor-browser' isn't a problem.

comment:4 Changed 4 years ago by arma

Status: newneeds_review

comment:5 Changed 4 years ago by gk

Keywords: TorBrowserTeam201502R added

comment:6 Changed 4 years ago by gk

Keywords: GeorgKoppen201502R added

comment:7 Changed 4 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Looks good to me. Commit d02cbafea85464044e2117913310ddd77c81efc7 has the fix and some minor clean-up.

Note: See TracTickets for help on using tickets.