Page 1 of 1
How to install TOR browser in EasyOS 4.5.1?
Posted: Wed Nov 23, 2022 3:01 am
by RyPuppy
I am trying to install TOR browser on my EasyOS platform.
What I have done so far
o Download tor from https://dist.torproject.org/torbrowser/ ... -US.tar.xz
- Download would keep failing when tried from FireFox browser
- Succeeded by using running wget in a Terminal
Code: Select all
EasyOS: /root/Downloads # wget https://dist.torproject.org/torbrowser/11.5.8/tor-browser-linux64-11.5.8_en-US.tar.xz
o Extract tor file & move it into /root folder
Code: Select all
EasyOS: /root # ls -ald /root/tor*
d-wx--x--x 3 root root 4096 Jan 1 2000 /root/tor-browser_en-US
EasyOS: /root #
EasyOS: /root # ls -al /root/tor-browser_en-US/
total 16
d-wx--x--x 3 root root 4096 Jan 1 2000 .
drwxr-xr-x 51 root root 4096 Nov 22 20:13 ..
drwx--x--x 8 root root 4096 Jan 1 2000 Browser
-rwx--x--x 1 root root 1684 Jan 1 2000 start-tor-browser.desktop
o Launching TOR from command line ./start-tor-browser.desktop
fails with ERROR message : Tor Browser bundle should not be run as Root. Exiting...
o Created ICON on the desktop by dragging & dropping file "start-tor-browser.desktop
" onto Desktop using rox-gui-file-manager.
o Clicking TOR icon on the desktop fails with ERROR message "Unsupported escape char in sh...start-tor-browser.desktop"
o Decided to run TOR as non-root user.
o Launched Menu --> System --> Login & Security Manager
o Clicked on MORE under section Client ... Tick apps to run as client ...
- Screenshot.png (17.52 KiB) Viewed 1643 times
o Following Instructions as per the Red Box...
- added link from start-tor-browser.desktop
to TOR
in the same folder
- added 'TOR=false" entry to file /root/.clients-status
- launched 'loginmanager' and selected 'TOR' which now showed up
o still getting same ERROR messages as described above whether I click the ICON or run command from Terminal.
Please help...
Re: EasyOS 4.5.1 - Install TOR Browser
Posted: Wed Nov 23, 2022 1:22 pm
by BarryK
setup-client might be getting confused with the name of the executable.
The name TOR.desktop would usually mean the executable is /usr/bin/TOR
What is the exact name of the executable in /usr/bin?
Is it "TOR"?
if so, setup-client will have created a script /usr/bin/TOR and renamed the original to TOR.bin
Re: EasyOS 4.5.1 - Install TOR Browser
Posted: Wed Nov 23, 2022 3:59 pm
by RyPuppy
BarryK wrote: ↑Wed Nov 23, 2022 1:22 pm
setup-client might be getting confused with the name of the executable.
The name TOR.desktop would usually mean the executable is /usr/bin/TOR
What is the exact name of the executable in /usr/bin?
Is it "TOR"?
if so, setup-client will have created a script /usr/bin/TOR and renamed the original to TOR.bin
After downloading "tor...gz" and extracting the file, as per the instructions, we need to run the self-modifying script "start-tor-browser.desktop" from command line. "tor" does not exist in /bin , /usr/bin at this point.
Here is the Launcher Script if that might help
Code: Select all
# cat start-tor-browser.desktop
#!/usr/bin/env ./Browser/execdesktop
#
# This file is a self-modifying .desktop file that can be run from the shell.
# It preserves arguments and environment for the start-tor-browser script.
#
# Run './start-tor-browser.desktop --help' to display the full set of options.
#
# When invoked from the shell, this file must always be in a Tor Browser root
# directory. When run from the file manager or desktop GUI, it is relocatable.
#
# After first invocation, it will update itself with the absolute path to the
# current TBB location, to support relocation of this .desktop file for GUI
# invocation. You can also add Tor Browser to your desktop's application menu
# by running './start-tor-browser.desktop --register-app'
#
# If you use --register-app, and then relocate your TBB directory, Tor Browser
# will no longer launch from your desktop's app launcher/dock. However, if you
# re-run --register-app from inside that new directory, the script
# will correct the absolute paths and re-register itself.
#
# This file will also still function if the path changes when TBB is used as a
# portable app, so long as it is run directly from that new directory, either
# via the shell or via the file manager.
[Desktop Entry]
Type=Application
Name=Tor Browser Setup
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and −1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=sh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/start-tor-browser --detach)' dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=web-browser
StartupWMClass=Tor Browser
I also tried adding symbolic link ln -sf /root/tor-browser_en-US/start-tor-browser.desktop /bin/tor
and then tried adding tor to "/root/.client_status"...
It would keep failing with the message "cannot be run as root".
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 12:54 am
by BarryK
That's complicated!
You will need to know what it does after the first run.
Does it create a script or link at /usr/bin?
Does it modify the .desktop file?
What you need is consistency of naming.
Like the example for sylpheed, there is sylpheed.desktop,
which contains an entry "Exec=sylpheed" and there exists /usr/bin/sylpheed
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 3:17 am
by RyPuppy
I have tried the following resulting in ERRORs...
- create Symbolic links from start-tor-browser.desktop to /bin/tor and also /usr/bin/tor
- placed entire tor's Browser folder and its start-tor-browser.desktop script in /usr/bin/ folder itself.
- created /usr/share/applications/tor.desktop by copying ycalc.desktop and making relevant changes for tor
Also I could not locate 'sylpheed' executable or 'sylpheed.desktop' anywhere in the system " find / -print | grep sylpheed "
How can I go about installing sylpheed ?
I will then be able to manually mimic the setup done for sylpheed .
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 8:07 am
by BarryK
There is no sylpheed, or rather, there was in the past. It is just given as an example.
You could try some other, such as inkscape.
I just now tested with inkscape, works great.
It created /home/inkscape and /usr/bin/inkscape, renamed the original to inkscape.bin
I noticed the popup message needs fixing. You can open|save in /home/inkscape, but also in /files
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 8:59 am
by OscarTalks
The script start-tor-browser in the main directory has lines 85 - 88 inclusive:-
Code: Select all
if [ "`id -u`" -eq 0 ]; then
complain "The Tor Browser Bundle should not be run as root. Exiting."
exit 1
fi
If you comment those out, tor-browser should run as root
I used to upload packages for Puppy with this and a few other tweaks (apulse for example, but EasyOS has pulse), but I stopped doing this some time ago so my memory has faded and things may have changed in the packages. Don't remember if I ever got it running in EasyOS. They issue updates fairly frequently but the auto update mechanism did work in Puppy if enabled in Preferences.
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 12:07 pm
by BarryK
Feodor sent me an email:
Good afternoon Barry,
there is a Tor browser topic on the forum
viewtopic.php?p=8168#p8168
mikeslr has written a wrapper to kill the "running as root" problem
#!/bin/sh
#LAUNCHDIR="$(cd "$(dirname "$0")"; pwd)"
LAUNCHDIR="$(dirname "$(readlink -f "$0")")"
mkdir "$LAUNCHDIR/profile" 2> /dev/null
LD_LIBRARY_PATH=$LAUNCHDIR/:$LAUNCHDIR/extralibs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "$LAUNCHDIR/firefox" "$@" -profile "$LAUNCHDIR/profile"
this might solve the problem.
Regards,
Feodor
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 5:11 pm
by RyPuppy
I have tried all of the suggestions made so far.
'tor' still fails to launch.
- Tried disabling 'root' user check. Error: Fails to launch
File: /files/tor-browser_en-US/Browser/start-tor-browser
Code: Select all
#if [ "`id -u`" -eq 0 ]; then
# complain "The Tor Browser Bundle should not be run as root. Exiting."
# exit 1
#fi
- use script tor-wrapper. Error: XPCOMGlueLoad error
Code: Select all
/files/tor-browser_en-US/Browser # ./tor-wrapper
+++ readlink -f ./tor-wrapper
++ dirname /files/tor-browser_en-US/Browser/tor-wrapper
+ LAUNCHDIR=/files/tor-browser_en-US/Browser
+ mkdir /files/tor-browser_en-US/Browser/profile
+ LD_LIBRARY_PATH=/files/tor-browser_en-US/Browser/:/files/tor-browser_en-US/Browser/extralibs
+ /files/tor-browser_en-US/Browser/firefox -profile /files/tor-browser_en-US/Browser/profile
XPCOMGlueLoad error for file /files/tor-browser_en-US/Browser/libxul.so:
/files/tor-browser_en-US/Browser/libxul.so: undefined symbol: gdk_wayland_display_get_wl_compositor
Couldn't load XPCOM.
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Thu Nov 24, 2022 6:33 pm
by OscarTalks
Doing the usual small modifications including the one mentioned above I can easily assemble a package which starts and runs fine in VanillaDpup 64bit, but the same package refuses to run in EasyOS. I seem to remember observing this in the past.
If I run the (modified) start-tor-browser script in EasyOS it just returns to prompt with no error message and fails to start.
This script calls another wrapper script named "firefox" and if I run this it suggests that the problem is a library mismatch:-
Code: Select all
# ./firefox
XPCOMGlueLoad error for file /opt/tor-browser/Browser/libxul.so:
/opt/tor-browser/Browser/libxul.so: undefined symbol: gdk_wayland_display_get_wl_compositor
Couldn't load XPCOM.
#
So not really sure what can be done about that
It is the same as you (RyPuppy) are now seeing and I think it means a different version of a library is needed
Maybe it is because gdk is compiled without wayland support or something along those lines??
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Fri Nov 25, 2022 1:39 am
by BarryK
I got it working in EasyOS. Here are my notes:
Code: Select all
# pwd
/opt
# sync
# tar -xf tor-browser-linux64-11.5.8_en-US.tar.xz
# mv tor-browser_en-US tor-browser
# rm -f tor-browser-linux64-11.5.8_en-US.tar.xz
# cd tor-browser/
# ./start-tor-browser.desktop
Launching './Browser/start-tor-browser --detach'...
./Browser/start-tor-browser: line 28: [: : integer expression expected
#
line 28 is wrong:
if [ "$show_output" -eq 1 ]; then
edited it:
if [ "$show_output" == "1" ]; then
...hmmm, that is not a good start!
commented-out lines 85-88:
#if [ "`id -u`" -eq 0 ]; then
# complain "The Tor Browser Bundle should not be run as root. Exiting."
# exit 1
#fi
# ./start-tor-browser.desktop
Launching './Browser/start-tor-browser --detach'...
#
# /opt/tor-browser/Browser/start-tor-browser --verbose
XPCOMGlueLoad error for file /opt/tor-browser/Browser/libxul.so:
/opt/tor-browser/Browser/libxul.so: undefined symbol: gdk_wayland_display_get_wl_compositor
Couldn't load XPCOM.
yep, ref:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/40693
# cc -shared -o shim.so shim.c
copied shim.so to /opt/tor-browser
edited "Exec=" line in /opt/tor-browser/start-tor-browser.desktop:
Exec=sh -c 'LD_PRELOAD=/opt/tor-browser/shim.so "/opt/tor-browser/Browser/start-tor-browser" --detach || ([ ! -x "/opt/tor-browser/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
# ./start-tor-browser.desktop
#
hmmm, try this:
# LD_PRELOAD=/opt/tor-browser/shim.so /opt/tor-browser/Browser/start-tor-browser --verbose
...works
OK, will probably create an SFS, later today.
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Fri Nov 25, 2022 1:50 pm
by RyPuppy
BarryK wrote: ↑Fri Nov 25, 2022 1:39 am
I got it working in EasyOS. Here are my notes:
...
# cc -shared -o shim.so shim.c
copied shim.so to /opt/tor-browser
...
OK, will probably create an SFS, later today.
@BarryK Thanks for finding the solution.
What source package should I download to compile and rebuild 'shim.so'
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Fri Nov 25, 2022 2:30 pm
by BarryK
Tor browser 11.5.8 SFS created:
https://bkhome.org/news/202211/tor-brow ... eated.html
...also has link to shim.c
It wasn't easy, some manual hacking required. Runs as user "spot", both in the main filesystem and in a container.
Note that the tor_11.5.8-en_amd64.sfs is for EasyOS only, it won't work in the pups or dogs.
Re: How to install TOR browser in EasyOS 4.5.1?
Posted: Fri Nov 25, 2022 4:57 pm
by RyPuppy
Torrrrrrrrr is working...
- Hip-Hip-Hoorah...png (298.47 KiB) Viewed 1684 times
@BarryK A big Thank-You to you and every-one who made this happen.