Opened 8 years ago

Closed 7 years ago

#4762 closed defect (invalid)

I'm using Linux Puppy which runs as ROOT always. Your install script cant be run in root.

Reported by: ChevyVan Owned by: erinn
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: installation error
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Runa A. Sandvik via RT to chevyvan (8 hours ago) show details
On Thu Dec 22 07:53:48 2011, chevyvan@… wrote:

I am running Puppy Linux. Which is always run as user Root.

When I try to upgrade my current tor install to the latest version, I get error "The Tor Browser Bundle should not be run as root. Exiting."

So I commented out that part of the script (that tested for Root user and exited w. error) and re-ran the script.

Now I get error "Videlia exited abnormally with error code 128"

Please stop being so MicroSoft like, and trying to protect myself from myself.
Been running as Root for a year now, and havent shot my self in the foot yet.
I back up my data regularly, and run several diff OS's so even if U hose this install of Puppy OS, I can quickly recover.

To my knowledge Puppy cant run as anything else but ROOT.

Can you email me a script that will run your progs in my extract tar file of yours. as ROOT.

Which script? Are you trying to use the Tor Browser Bundle or something else? I suggest that you open a ticket on our bug tracker about this;

YES, it's the Tor Browser Bundle. When I first launch Tor, I get a pop up that says there is a newer version. I click on the link and select Linux 64 bit download. I get a tar file, extract it and there is a script called "/tor-browser_en-US/start-tor-browser"

inserted below are it's contents.

# GNU/Linux does not really require something like RelativeLink.c
# However, we do want to have the same look and feel with similar features.
# To run in debug mode simply pass --debug
# Copyright 2011 The Tor Project. See LICENSE for licensing information.

complain_dialog_title="Tor Browser Bundle"

# First, make sure DISPLAY is set. If it isn't, we're hosed; scream
# at stderr and die.
if [ "x$DISPLAY" = "x" ]; then

echo "$complain_dialog_title must be run within the X Window System." >&2
echo "Exiting." >&2
exit 1


# Determine whether we are running in a terminal. If we are, we
# should send our error messages to stderr...
if [ -t 1 -o -t 2 ]; then



# ...unless we're running in the same terminal as startx or xinit. In
# that case, the user is probably running us from a GUI file manager
# in an X session started by typing startx at the console.
# Hopefully, the local ps command supports BSD-style options. (The ps
# commands usually used on Linux and FreeBSD do; do any other OSes
# support running Linux binaries?)
ps T 2>/dev/null |grep startx 2>/dev/null |grep -v grep 2>&1 >/dev/null
ps T 2>/dev/null |grep xinit 2>/dev/null |grep -v grep 2>&1 >/dev/null

# not_running_in_same_terminal_as_foo has the value 1 if we are *not*
# running in the same terminal as foo.
if [ "$not_running_in_same_terminal_as_startx" -eq 0 -o \

"$not_running_in_same_terminal_as_xinit" -eq 0 ]; then



# Complain about an error, by any means necessary.
# Usage: complain message
# message must not begin with a dash.
complain () {

# Trim leading newlines, to avoid breaking formatting in some dialogs.
complain_message="echo "$1" | sed '/./,$!d'"

# If we're being run in a terminal, complain there.
if [ "$ARE_WE_RUNNING_IN_A_TERMINAL" -ne 0 ]; then

echo "$complain_message" >&2


# Otherwise, we're being run by a GUI program of some sort;
# try to pop up a message in the GUI in the nicest way
# possible.
# In mksh, non-existent commands return 127; I'll assume all
# other shells set the same exit code if they can't run a
# command. (xmessage returns 1 if the user clicks the WM
# close button, so we do need to look at the exact exit code,
# not just assume the command failed to display a message if
# it returns non-zero.)

# First, try zenity.
zenity --error \

--title="$complain_dialog_title" \

if [ "$?" -ne 127 ]; then



# Try kdialog.
kdialog --title "$complain_dialog_title" \

--error "$complain_message"

if [ "$?" -ne 127 ]; then



# Try xmessage.
xmessage -title "$complain_dialog_title" \

-center \
-buttons OK \
-default OK \
-xrm '*message.scrollVertical: Never' \

if [ "$?" -ne 127 ]; then



# Try gxmessage. This one isn't installed by default on
# Debian with the default GNOME installation, so it seems to
# be the least likely program to have available, but it might
# be used by one of the 'lightweight' Gtk-based desktop
# environments.
gxmessage -title "$complain_dialog_title" \

-center \
-buttons GTK_STOCK_OK \
-default OK \

if [ "$?" -ne 127 ]; then




# if [ "id -u" -eq 0 ]; then
# complain "The Tor Browser Bundle should not be run as root. Exiting."
# exit 1
# fi

usage_message="usage: $0 [--debug]"
if [ "$#" -eq 1 -a \( "x$1" = "x--debug" -o "x$1" = "x-debug" \) ]; then

printf "\nDebug enabled.\n\n"

elif [ "$#" -eq 1 -a \( "x$1" = "x--help" -o "x$1" = "x-help" \) ]; then

echo "$usage_message"
exit 0


# If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority
# before we change HOME below. (See xauth(1) and #1945.) XDM and KDM rely
# on applications using this default value.
if [ -z "$XAUTHORITY" ]; then



# If this script is being run through a symlink, we need to know where
# in the filesystem the script itself is, not where the symlink is.
if [ -L "$myname" ]; then

# XXX readlink is not POSIX, but is present in GNU coreutils
# and on FreeBSD. Unfortunately, the -f option (which follows
# a whole chain of symlinks until it reaches a non-symlink
# path name) is a GNUism, so we have to have a fallback for
# FreeBSD. Fortunately, FreeBSD has realpath instead;
# unfortunately, that's also non-POSIX and is not present in
# GNU coreutils.
# If this launcher were a C program, we could just use the
# realpath function, which *is* POSIX. Too bad POSIX didn't
# make that function accessible to shell scripts.

# If realpath is available, use it; it Does The Right Thing.
possibly_my_real_name="realpath "$myname" 2>/dev/null"
if [ "$?" -eq 0 ]; then



# realpath is not available; hopefully readlink -f works.
myname="readlink -f "$myname" 2>/dev/null"
if [ "$?" -ne 0 ]; then

# Ugh.
complain "start-tor-browser cannot be run using a symlink on this operating system."




# Try to be agnostic to where we're being started from, chdir to where
# the script is.
mydir="dirname "$myname""
test -d "$mydir" && cd "$mydir"

# If ${PWD} results in a zero length HOME, we can try something else...
if [ ! "${PWD}" ]; then

# "hacking around some braindamage"
export HOME
surveysays="This system has a messed up shell.\n"


export HOME


if ldd ./App/Firefox/firefox-bin | grep -q "libz\.so\.1.*not found"; then





export LDPATH

if [ "${debug}" ]; then

printf "\nStarting Vidalia now\n"
cd "${HOME}"
printf "\nLaunching Vidalia from: pwd\n"
# XXX Someday we should pass whatever command-line arguments we got
# (probably filenames or URLs) to Firefox.
./App/vidalia --loglevel debug --logfile vidalia-debug-log \
--datadir Data/Vidalia/
printf "\nVidalia exited with the following return code: $?\n"


# not in debug mode, run proceed normally
printf "\nLaunching Tor Browser Bundle for Linux in ${HOME}\n"
cd "${HOME}"
# XXX Someday we should pass whatever command-line arguments we got
# (probably filenames or URLs) to Firefox.
./App/vidalia --datadir Data/Vidalia/
if [ "$exitcode" -ne 0 ]; then

complain "Vidalia exited abnormally. Exit code: $exitcode"
exit "$exitcode"


printf '\nVidalia exited cleanly.\n'


Child Tickets

Change History (3)

comment:1 in reply to:  description Changed 8 years ago by arma

Replying to ChevyVan:

So I commented out that part of the script (that tested for Root user and exited w. error) and re-ran the script.

Now I get error "Videlia exited abnormally with error code 128"

Sounds like there are two issues here.

First is that the TBB script has no config option to override our "don't be root" line. I bet if you provide a diff we'll add it.

Second is that it would appear Puppy can't run TBB successfully. Perhaps the static Vidalia build doesn't have enough components? Might be that running TBB with the debug flag will provide more useful details about why it fails.

comment:2 Changed 8 years ago by arma

Component: Tor BridgeTor bundles/installation
Owner: set to erinn
Version: Tor: unspecified

comment:3 Changed 7 years ago by rransom

Resolution: invalid
Status: newclosed

Running Tor Browser Bundle as root is unsafe and unsupported. If editing that check out of the start-tor-browser script is enough to make TBB run as root, fine. If editing the startup script isn't enough to make it work, we are not interested in trying to debug an unsafe and unsupported configuration for them.

Note: See TracTickets for help on using tickets.