Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: vitex on September 05, 2011, 02:15:49 PM
-
https://www.torproject.org/projects/torbrowser.html.en (https://www.torproject.org/projects/torbrowser.html.en):
The Tor software protects you by bouncing your communications
around a distributed network of relays run by volunteers all
around the world: it prevents somebody watching your Internet
connection from learning what sites you visit, it prevents the
sites you visit from learning your physical location, and it lets
you access sites which are blocked.
The Tor Browser Bundle lets you use Tor on Windows, Mac OS X, or
Linux without needing to install any software. It can run off a
USB flash drive, comes with a pre-configured web browser, and is
self-contained.
The advantage of installing the Tor Browser Bundle instead of its
individual components (Tor, Vidalia, Firefox, and Torbutton) is that
the components of the Bundle have been configured jointly by security
experts at the Tor Project and are less likely to compromise your
privacy. (If your need for privacy is critical, consider Tails
(http://tails.boum.org/about/index.en.html) (http://(http://tails.boum.org/about/index.en.html)), a Debian-based live CD /
USB system that provides even more protection by routing all network
connections through the Tor network.)
This script installs the Tor Browser Bundle in a subdirectory of the
current working directory.
Usage: installTorBrowser.sh [LANG [VERSION]]
LANG Language of the browser. The default is en-US; see
https://www.torproject.org/projects/torbrowser.html.en (https://www.torproject.org/projects/torbrowser.html.en)
for other languages that are available.
VERSION Version of the Bundle. The default is the current release;
see https://www.torproject.org/dist/torbrowser/linux/ (https://www.torproject.org/dist/torbrowser/linux/)
for earlier versions that are available for download.
The Bundle is about 30 MB, so download and installation will take
several minutes. The name of the installation directory is based on
the language and version; that directory is erased at the start of the
installation process.
Here is sample output from the script:
tc@box:~$ ./installTorBrowser
===
=== The Tor Browser Bundle is installed in
===
=== /home/tc/tor-browser_en-US_2.2.32-3/
===
=== The only data that might need to be backed up are in
===
=== /home/tc/tor-browser_en-US_2.2.32-3/Data
===
=== To start the browser manually, execute
===
=== /home/tc/tor-browser_en-US_2.2.32-3/tor-browser
===
=== To activate the wbar and menu items, execute
===
=== desktop.sh tor-browser_en-US_2.2.32-3
===
=== The file /tmp/TorBrowser.qremaster contains the dependencies needed
=== to remaster using qremaster. For example, the following command
=== will remaster the current release of Tiny Core with the Tor Browser
=== Bundle and Wi-Fi support:
===
=== qremaster -d -t 30 /path/to/tinycore_current.iso /tmp/tbb.iso \
=== $(cat /tmp/TorBrowser.qremaster) wifi.tcz
===
If you execute the Tor Browser before you remaster and if you install a
browser add-on (e.g. AdBlock Plus), that add-on will be included by
qremaster. Be cautious since an add-on may leak information about
your identify.
-
Hi vitex!
Nice script!!! Have used it and it works just fine. Would it be hard to edit the script to make an extension? That would be really great!
Have fun with TC,
meo
-
Nice script!!! Have used it and it works just fine. Would it be hard to edit the script to make an extension? That would be really great!
I am reluctant to build an formal extension for the repository due to possible licensing issues (e.g., GPL and LGPL compliance) related to the binary components in the Tor Browser Bundle.
What I think that I can do is prepare a script (cf. getFlash10.tcz) that when executed builds a personal Tor Browser Bundle extension. (There is some uncertainty due to the way the Bundle mixes read-only and read-write files in the same directory structure, but I think that those issues can be resolved using linking and copying.)
Would a script to build a personal extension be more useful than the current script?
-
Hi again vitex!
Yes, it would most certainly do. That would be just awesome!
Have fun helping the TC community,
meo
-
As requested by meo, here is a script that builds a personal extension from the Tor Browser Bundle as well as a sample of that script's output:
===
=== This script has created the following files:
===
=== /tmp/tce/optional/tor-browser_en-US_2.2.32-4.tcz
=== /tmp/tce/optional/tor-browser_en-US_2.2.32-4.tcz.dep
=== /tmp/tce/optional/tor-browser_en-US_2.2.32-4.tcz.md5.txt
===
=== To install the Tor Browser Bundle immediately, execute
===
=== tce-load -wi $(cat /tmp/tce/optional/tor-browser_en-US_2.2.32-4.tcz.dep)
=== tce-load -i tor-browser_en-US_2.2.32-4.tcz
===
=== To activate the browser after installation, use its wbar or menu item
=== or execute the command
===
=== tor-browser_en-US_2.2.32-4
===
=== The first activation of the browser constructs the directory
===
=== $HOME/.tor-browser_en-US_2.2.32-4/
===
=== The only data that might need to be backed up are in
===
=== $HOME/.tor-browser_en-US_2.2.32-4/Data/
===
=== The the following command will remaster the current release
=== of Tiny Core with the Tor Browser Bundle and Wi-Fi support:
===
=== qremaster -d -t 30 /path/to/tinycore_current.iso /tmp/tbb.iso \
=== tor-browser_en-US_2.2.32-4.tcz wifi.tcz
===
Revised on 2011-09-11 to use a personal working directory that is hidden.
Revised on 2011-12-27 to add the -t option and support for the 4.2 release.
-
Hi again vitex!
Just ran the script and it works perfect. In posting this from the Tor Browser. Thanks a lot for making this script! I really appreciate it. Thanks again!
Have fun moving the boundaries of TC forward,
meo
-
hi vitex or hi to all fans of secure networking,
nice piece of work, thank you vitex.
would you be so kind and see there a chance that you package "tsocks"!?
http://forum.tinycorelinux.net/index.php/topic,11315.0.html (http://forum.tinycorelinux.net/index.php/topic,11315.0.html)
your coding experience is far ahead, i read in your script...
this package could complete the tool-set or the swiss-army-knife of secure browsing...
please have a look at it, perhaps you could do us this favour, too.
-
Hi once again vitex!
The extension works just fine but there is a small request I have. Don't get me wrong on this I'm very happy with this extension as is but it has a little snag. It creates when started a "visible" directory in /home/tc with a very long name. To conform to other extensions it would be nice if the directory was hidden and with a short name like TorBrowser and the versionnumber (or just TorBrowser). I don't want you to feel that this is some sort of critic as I wrote before I'm happy with the extension as is. It would just be nice with conformity when it comes to extensions, that's all.
Have fun and thanks for your effort,
meo
-
hi meo,
i fully agree for other config-files or config-dirs, i like hidden config-dirs that are standard compliant.
but in that special topic i like this full-visible dir with the exact version in the name.
i want to see that dir that i can't oversee it:
that's for the reason that i want to delete it.
if you don't want to delete it than it's perhaps good that for a new version you have to use a new dir.
that could be more secure...
sometimes when i experience problems with the tor-bundle
i delete the dir and afterwards the restarted program works fine.
-
It creates when started a "visible" directory in /home/tc with a very long name. To conform to other extensions it would be nice if the directory was hidden and with a short name like TorBrowser and the versionnumber (or just TorBrowser).
I have revised the script getTorBrowser.sh to use a personal working directory that is hidden.
I have not changed the long form of the extension and directory name because I would like to leave open the possibility of installing several versions simultaneously.
If you edit the lines
EXTENSION=tor-browser_${LANG}_$VERSION
Name=Tor_Browser_${LANG}_$VERSION
in your personal copy of the script, you can change the form of the name however you wish.
-
Hi vitex!
This was just what I was thinking of. A way to personalize the script and the result of it. But I didn't know how to get it right. Thanks for your help! Will try to get it like I want now and run it.
Have fun making TC more versatile,
meo
-
would you be so kind and see there a chance that you package "tsocks"!?
http://forum.tinycorelinux.net/index.php/topic,11315.0.html (http://forum.tinycorelinux.net/index.php/topic,11315.0.html)
your coding experience is far ahead, i read in your script...
this package could complete the tool-set or the swiss-army-knife of secure browsing...
please have a look at it, perhaps you could do us this favour, too.
See my response to the other topic.
-
Hi vitex!
I have a problem when using the Tor Browser. When Vidalia is connecting, the time of my system changes. In TC 4.0 rc1 it moves two hours back and in TC 3.8.4 it moves three hours backwards. How can that be? I've tested this with the original getTorBrowser script that you so kindly have provided. The same thing happens when renaming the extension according to your suggestion. I've compared the two scripts installTorBrowser and getTorBrowser and I can't find an explanation. I hope that you can come up with a solution. I live currently in Sweden so it's almost 10 pm here right now.
Have fun helping out in the TC community,
meo
-
Hi again vitex!
Another problem occurs whan starting the Tor Browser a second time. Just the top name bar of Vidalia is shown unless you maximize it (in which case everything is visible) but then it seems that you have to correct the time for the Tor Browser to work. I'm leaving this info since I'm very interested in a flawlessly working Tor Browser. It would be a very nice extension to have using TC. I hope I have shed some light over the matter. Thanks for your work!!!
Have fun extending the possibilities of TC,
meo
PS I'm posting this from the Tor Browser so it works DS
-
I have a problem when using the Tor Browser. When Vidalia is connecting, the time of my system changes. In TC 4.0 rc1 it moves two hours back and in TC 3.8.4 it moves three hours backwards. How can that be? I've tested this with the original getTorBrowser script that you so kindly have provided. The same thing happens when renaming the extension according to your suggestion. I've compared the two scripts installTorBrowser and getTorBrowser and I can't find an explanation. I hope that you can come up with a solution. I live currently in Sweden so it's almost 10 pm here right now.
Try booting your system and executing
tc@box:~$ hwclock ; date ; getTime.sh -p
Mon Sep 12 21:33:43 2011 0.000000 seconds
Mon Sep 12 21:33:44 UTC 2011
2011-09-12 21:33:45 UTC(NIST)
Mon Sep 12 21:33:44 UTC 2011
These results were obtained with the hardware clock in UTC mode and Tiny Core with the default UTC time zone and without the noutc boot code.
Are you using the noutc boot code? Have you specified a time zone?
I have seen the kind of behavior that you describe when the hardware clock has been configured to use local time but Tiny Core has not been configured with the noutc boot code and a time zone.
In my case, I really wanted to use UTC, and I corrected a similar problem on my test system by executing commands equivalent to:
getTime.sh ; hwclock --utc --systohc
to fetch the correct time and transfer that time from the system clock to the hardware clock, which is marked as being in UTC.
-
Another problem occurs whan starting the Tor Browser a second time. Just the top name bar of Vidalia is shown unless you maximize it (in which case everything is visible) but then it seems that you have to correct the time for the Tor Browser to work.
I cannot reproduce your problem. I built a Tor Browser extension and installed it after booting both the 3.8.4 and the 4.0rc1 ISOs. In both cases the Vidalia control panel was normal after two or more invocations of the Tor Browser.
I suggest that you try your version of the extension on the 3.8.4 ISO.
-
Hi vitex!
Thanks for your suggestions! I don't change the time to a local time since I get the right time just starting the system. I get the same problem with Vidalia using TC 3.8.4. I forgot to mention that I use fluxbox in my 3.8.4 system. Maybe that's the problem with tha latest stable version of TC. Will keep on trying to get it right. Thanks for your suggestions!!!
Have fun with TC,
meo
-
hi vitex,
i can confirm some observations of meo.
i use the tor-bundle on 3.8.4 in fluxbox and when i start it a second time at the beginning only the name bar of the vitalia window is displayed and there is no way to maximize it in that phase.
but i think that problem occurs during that time when tor is preparing and establishing the tor-connection
(during that time the onion is yellow).
later, after establishing the tor-connection the vitalia window maximizes to the normal size,
(after the the onion changed from yellow to green).
when i had more problems, i just deleted the tor-directory and the next start succeeded without problems.
and then the tor-bundle-script just works fine!!!
-
i use the tor-bundle on 3.8.4 in fluxbox and when i start it a second time at the beginning only the name bar of the vitalia window is displayed and there is no way to maximize it in that phase.
I tried the Tor Browser Bundle with fluxbox, icewm, flwm, wmaker, and jwm. Only fluxbox had the quirky behavior that you and meo have observed.
-
Hi vitex!
I'm using a brand new installation of TC 3.8.4 on a SD memory card (4 GB). When Vidalia starts it turns the time back two hours (to UTC time I believe). If i correct the time the Torbrowser still works it seems. I tried the: getTime.sh ; hwclock --utc --systohc command but got an error message: hwclock: can't open '/dev/misc/rtc': No such file or directory. After what I can see TC uses the hwclock time on this computer which is UTC+2 with daylight savings time (otherwise UTC + 1). Is there some way to change the script to use local time instead of UTC? As I mentioned before, torbrowser works OK after correcting the time so it's no big deal but it would be nice not having to correct the time when I use the torbrowser. Thanks for your good work!
Have fun working with TC,
meo
-
Hi again vitex!
I've been thinking about a solution of the "time problem". Is there a way to change the script to use hwtime instead of UTC? If there is it would solve the problem for anyone that uses the script (anywhere in the world). Since I'm not so familiar with scripting, I'd be very grateful if you could instruct me how to make this change. Then I could test it on my system right away. Thanks beforehand!!!
Have fun giving us more options how to use TC,
meo
-
Hi!
By the way it seems that it was fluxbox causing Vidala to show only the titlebar starting torbrowser a second time. Not using fluxbox solved that problem.
Have fun making useful scripts available vitex,
meo
-
I tried the: getTime.sh ; hwclock --utc --systohc command but got an error message: hwclock: can't open '/dev/misc/rtc': No such file or directory. After what I can see TC uses the hwclock time on this computer which is UTC+2 with daylight savings time (otherwise UTC + 1).
The hwclock command failed because I forgot to tell you to use sudo. Do not execute that until you have tried a few more tests.
Boot your system and execute
tce-load -wi ntpclient.tcz ; ntpclient -c 1 -h pool.ntp.org | awk '{print $5/(60*60*1000000)}'
which will report the number hours that your system clock is offset. My guess is that the offset will be about 2 hours, which corresponds to the difference between your local time and UTC.
Boot your system again with the noutc bootcode (tinycore noutc ...) and execute the same commands. My guess is that the offset will be very small.
What I believe is happening is that the Tor Browser script is having to make a large adjustment to the system time because you did not include the noutc bootcode to tell tinycore that the hardware clock is using local time instead of UTC. If I am wrong about that, please report what the showbootcodes command prints.
If you decide that you would like to change your hardware clock from local time to UTC, execute
getTime.sh ; sudo hwclock --utc --systohc
-
Hi!
Right off the bat I can tell you that I got the same result using sudo <command>. I'll see what I can come up with following your suggestions.
Have fun helping TC users,
meo
-
Hi again vitex!
Following your suggestion giving the command to get the time offset gives almost the same results in both cases. Is there something else needed except noutc to get the local time? I can see during bootup that UTC time is set. Don't know what to do to prevent that.
Have fun using TC vitex,
meo
-
Hi again vitex!
I'm getting the feeling that I should "get out of your hair". It makes me frustrated too but even using a cd I get the same result using the noutc boot code (well -1.98074 versus -1.98076). I guess I'm stuck with changing the time when using the torbrowser. Thanks for all your help!!!
Have fun even if I'm bugging you,
meo
-
Hi vitex!
Have tried to make the script work with TC 4.2 but I can't make it work. I think it needs an update?
Have fun,
meo
-
Try the new version of the getTorBrowser.sh script that is attached to the original announcement (http://forum.tinycorelinux.net/index.php/topic,11352.msg59958.html#msg59958). It should work with 4.2 as well as earlier releases.
By default the Tor Browser Bundle uses a random port number so its version of Tor will not interfere with the stand-alone version. The new version of the script has a -t option that configures the extension so the Bundle's version of Tor listens on port 9050 and can thus be used in place of the stand-alone version of Tor.
-
Hi again vitex!
Works perfect! Thanks a lot!
Have fun helping out on the TC board,
meo
P.S. Posting this from the newly created TorBrowser D.S.
-
Beautiful job on the script and instructions - downloaded the GZ - followed step by step - and within an hour had it all automated nicely - can flip back and forth from minimal Aurora (Firefox - ala TOR) and regular full flash Firefox - automated the PREFS.JS file ...very sweet - nice job - thank you.
HOWEVER - I gotta feeling my ISP is blocking - not sure - tried the BRIDGES METHOD (TOR solution) - but I get a "Vidalia goes half way" bar - then stalls...nothing cures it - tried a different wifi hit - they may have it blocked as well.
So...perhaps its the PROXY SETTINGS? I saw something where you set them all to localhost 8118 - and the last one to 9050 - tried that - same problems - halfway - stalls - hangs - no TOR.
I also don't see a "TOR BUTTON" or any other indicator that the Aurora browser is using TOR....
Any help is appreciated - will be scanning torproject for clues as well.
Thank you again.
-
HOWEVER - I gotta feeling my ISP is blocking - not sure - tried the BRIDGES METHOD (TOR solution) - but I get a "Vidalia goes half way" bar - then stalls...nothing cures it - tried a different wifi hit - they may have it blocked as well.
To better understand what is happening, activate a copy of the Bundle that you have not attempted to reconfigure. Then select Vidalia's "Message Log" and "Advanced" options to see the steps that Vidalia takes to initialize the Bundle. The last step should be "Bootstrapped 100%: Done". At that point Vidalia will activate Aurora, which should eventually display a tab that verifies that you are connected to the Tor network. It can take several minutes to get the Bundle working.
So...perhaps its the PROXY SETTINGS? I saw something where you set them all to localhost 8118 - and the last one to 9050 - tried that - same problems - halfway - stalls - hangs - no TOR.
Those settings were for using a stand-alone Tor with an existing browser. The Tor Browser Bundle is self-contained and preconfigured. See Aurora / Edit / Preferences / Advanced / Connection Settings to see how the Bundle configures Aurora's proxy.
If you used the new -t option to build the Bundle with Tor listening on port 9050 instead of a random port and if you also have the regular Tor extension installed, the two versions of Tor may be interfering with one another. Either remove the regular Tor extension or rebuild the Bundle without the -t option.
I also don't see a "TOR BUTTON" or any other indicator that the Aurora browser is using TOR....
See Aurora / Tools / Add-ons / Extensions. You should always visit https://check.torproject.org/ (https://check.torproject.org/) to determine whether or not your browser is using the Tor network.
-
Hi vitex!
Unfortunately I can't make the result of the script (the TorBrowser) work on the latest cut of TC (4.5.4). It seems to be a permission problem (but I'm not sure). Thankful for any indication of how to fix it. By the way when I download the Torbrowser bundle from the Tor site and extract it to a dir it works so it can't be impossible to run the Tor Browser from the current TC.
Have fun helping out in the TC community,
meo
-
Unfortunately I can't make the result of the script (the TorBrowser) work on the latest cut of TC (4.5.4). It seems to be a permission problem (but I'm not sure).
I have attached a revised script that seems to fix the problem, which appears to be some program in the App directory that is dereferencing a symbolic link in such a way that the program is attempting to write to the read-only area where packages are loaded. Since I no longer use Core, I decided to not take the time to isolate the exact cause of the problem; instead, I modified the script to copy the entire App directory to RAM at a cost of about 30 MB.
-
Hi again vitex!
Thanks for a swift update! Will test it now. Thanks again!
Have fun helping others,
meo
-
hi vitex,
after a flawless installation process of the tor-bundle,
i get a error message, when i start the programm:
connection error:
vidalia can't find out how to talk to tor because it can't access this file:
/opt/tor-browser_en-US_2.2.37-1/Data/Tor/port.conf
-
Hi again vitex!
I think I'm stuck with the same problem. Vidalia won't even appear on the screen.
Have fun with computers and perhaps with TC,
meo
-
i am interested in trying TBB on my TCL... is it possible to use this script with the latest version 4.5.6?
-
Just mentioning for the record that you can easily use the extensions tor.tcz and privoxy.tcz as a simple tor setup with any browser you like. Just install both and follow the guide in the privoxy.tcz info file (from Apps tool e.g.). Install your favorite browser and point it to use the proxy. Browser proxy settings are normally somewhere at "settings => network => advanced" or similar.
-
relevant link - https://www.torproject.org/docs/tor-doc-web.html.en
you can also use torsocks in this manner.
however the tor project does *strongly* recommend you use tor button or the tor browser bundle.
see reasoning and reference links in this post -
http://forum.tinycorelinux.net/index.php/topic,11315.msg73934.html#msg73934
-
Hi guys!
Just wonder if someone is up to fix the script to make an extension of the tor browser bundle. I would appreciate that very much.
Have fun with TC,
meo