[tor-bugs] #2525 [Tor bundles/installation]: start-tor-browser script doesn't work when symlinked
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Thu Feb 10 00:29:42 UTC 2011
#2525: start-tor-browser script doesn't work when symlinked
---------------------------------------+------------------------------------
Reporter: StFS | Owner: erinn
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor bundles/installation | Version: Tor: unspecified
Keywords: | Parent:
Points: | Actualpointsdone:
Pointsdone: | Actualpoints:
---------------------------------------+------------------------------------
The start-tor-browser script that comes with the Linux Tor Browser Bundle
package fails if a symlink is created that points to it and the symlink
then executed instead of the actual script.
For example, I installed the bundle in ~/apps/ but I have ~/bin/ in my
$PATH so I symlinked the startup script in ~/bin/:
tor-browser -> ../apps/tor-browser_en-US/start-tor-browser
However, this messes up the startup since the script assumes now that it's
located in ~/bin instead of ~/apps/tor-browser_en-US/
Below is a patch for the start-tor-browser script that fixes this issue:
{{{
19c19,25
< mydir="$(dirname $0)"
---
> if [ -L $0 ]; then
> appname=$(readlink -f $0)
> else
> appname=$0
> fi
>
> mydir="$(dirname $appname)"
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2525>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list