Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by courtage »

That's it, that's the problem.

Tor browser always segfaults like this in 64-bit Puppies

Code: Select all

./start-tor-browser: line 371:  8516 Segmentation fault      TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/null

I've tried Bionic64 (vanilla kernel), Bionic64 (realtime kernel), Xenial64 (vanilla) with the same result.

(I didn't test Tahr64 as Tor demands GTK3 & I couldn't be arsed to install it).

I have tried a 32-bit version of Tor on Tahr32 & it works fine, no problems at all.

nb The Tor script `start-tor-browser` has to be edited for Puppy because it otherwise it tests for running as root and exits immediately.

Anyone come across this before and found a fix, or is this some weird peculiarity of my system(s) ?

thanks

Last edited by courtage on Mon Feb 22, 2021 2:43 pm, edited 1 time in total.
User avatar
mikeslr
Posts: 2955
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 910 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by mikeslr »

How to create a portable which works:

Download tor browser, the Linux version, from here: https://www.torproject.org/download/
Use UExtract to extract it.
Within the extracted folder --two layers deep is a folder named "Browser"
Rename it "Tor" --or if you want to keep track of the version, "Tor-10.10.10", todays current version, but change the name to reflect the actual version you downloaded.
Download the following tor-pup script into that folder. Remove the false ".gz" ending.

tor-pup.gz
(280 Bytes) Downloaded 48 times

Under Bioncpup64, at least, left-clicking the tor-pup script starts that browser without any problem.

Thank fredx181 & Mike Walsh whose recipe I stole in writing the tor-pup script.

P.S. Sorry, I rarely listen to anything. In order for Tor to generate sound on your system you'll also have to steal another of fredx181's devices. If you have a functioning firefox-portable copy the "extralibs" folder from its folder into the tor folder. If not, download and UExtract the attached extralibs.tar.gz and move the extracted folder into the tor folder

extralibs.tar.gz
(51.66 KiB) Downloaded 38 times

P.P.S The post here explains how to create a menu for an external application. http://www.murga-linux.com/puppy/viewto ... d82#507532 Once an external application has a listing on the Start Menu, JWMDesk Manager and similar applications can place a launch on a panel; or you can drag the /usr/share/applications/...desktop to your desktop.
But if you only use Tor occasionally, you can just book mark its folder in Rox. If, like I, you have an external folder which holds many external applications and AppImages, you can have your Tor folder display an icon making it easy to locate. Download a Tor icon into the folder. Then open two rox windows: one so that you can see the Tor folder as a Folder; the second so that you can see the icon. Right-click the folder and from the pop-up menu select Set Icon. Drag the tor icon into the GUI which appears and select "Only for the file..."

Last edited by mikeslr on Mon Feb 22, 2021 1:08 am, edited 2 times in total.
User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by mikewalsh »

@courtage :-

Actually, here IS a TorBrowser-portable.....ready-to-go. Mikeslr must have replied while I was building & uploading it......sorry, Mike! :oops: :D

This is 64-bit. You can find it at the Drive, here:-

https://drive.google.com/drive/folders/ ... sp=sharing

Download it; unzip it; place it anywhere you like, but preferably outside the 'save'....../mnt/home is a good location. Click to enter, click 'Launch' to, well; launch..! It'll create its own, internal profile. You could even run this from a flash drive if you wanted, for the ultimate in security/privacy...

You can drag the 'LAUNCH' script to the desktop as a launcher. Re-name it if you want, and use the attached icon to tart it up with if you like. (I know it looks huge, but ROX auto-resizes icons to fit the pinboard. It'll look normal when you use it. Right-click on the image->Save image as...)

I've just tried this out under Fossapup64 & Quirky64 'April' 7.0.1. Sweet as a nut, mate.

(The 'fix' is, quite simply, DON'T use the supplied 'start-tor-browser' script. "Check for this, check for that, check for this, check for that, allow this, don't allow that...." Jeez. We don't need all that mainstream crap in Puppy. All I've done is to modify the standard launch script I've used in several portables.....and that's all credit to Fred, originally.)

-------------------------------------------------------

(EDIT:- T'other Mike & I keep adding bits to our posts! That 'directory icon' can be done another way, too; drag your icon across to the Tor folder, and drop it in. Now, rename it to just ".DirIcon" (note the spelling - you don't want the .png/.jpg,etc, left on the end - and the dot (.) especially). This hides it.....and this icon will remain locked to that directory, regardless of where you may move it to.....)

Mike. ;)

Attachments
PNG Tor-browser icon...
PNG Tor-browser icon...
tor_browser.png (40.62 KiB) Viewed 847 times
Last edited by mikewalsh on Mon Feb 22, 2021 1:39 am, edited 4 times in total.
User avatar
mikeslr
Posts: 2955
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 910 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by mikeslr »

@ Mike Walsh:

Give a man a fish and you've fed him for a day. Teach a man to fish and he'll smell bad more often. :lol:

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by courtage »

Nope, this still segfaults

to be more precise, the TorBrowser-portable64 one still segfaults if I run the "LAUNCH" script.

Code: Select all

/initrd/mnt/dev_save/data/downloads/TorBrowser-portable64/Browser/tor-wrapper: line 6: 13647 Segmentation fault      LD_LIBRARY_PATH=$LAUNCHDIR/:$LAUNCHDIR/extralibs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "$LAUNCHDIR/firefox" "$@" -profile "$LAUNCHDIR/profile"
User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by OscarTalks »

For some time I have uploaded Tor Browser Bundle packages which are tweaked for Puppy. I try to update them when new versions come out (which is quite often) but I think they do update automatically. They are not "portable" in that they install (or sfs-load) into system directories. Since the data is stored internally, I put the main directory under /root/my-applications to maintain the convention of having that data go into your $HOME directory (even though when running as root you don't have to do this). I usually test the 64bit packages in Xenial64 and they do work. For older Tahr64 you can add libgtk-3 via PPM quite easily. Your system clock must be set correctly otherwise it refuses to run.
viewtopic.php?f=90&t=213
https://yadi.sk/d/7AkxbX4NqJUah

User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by mikewalsh »

@mikeslr :-

Very true, Michael, very true. Makes more sense to empower others to fix their own issues, definitely.

@courtage :-

Ah. Okay. I confess, I didn't actually test this one.....just got it "up-and-running". Like you, I also have a 32-bit version, and that works fine, so.....I kind of 'assumed' this should be OK as well. As the saying goes, to "assume" makes an "ass" out of "u" AND "me", doesn't it? :lol:

Mike. ;)

User avatar
rockedge
Site Admin
Posts: 6532
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2742 times
Been thanked: 2619 times
Contact:

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by rockedge »

Tor browser I have always got running on every Puppy I want it to run on.

Download the package, extract it to /root/spot/some_Tor

In a terminal, run the command:

Code: Select all

chown -R spot /root/spot/some_Tor

Copy /root/spot/Tor_Browser/start-tor-browser.desktop to /root/spot/start-tor-browser.desktop

open to modify the /root/spot/start-tor-browser.desktop file and replace the

Code: Select all

Exec=sh -c '"/root/spot/tor-browser_en-US/Browser/start-tor-browser" --detach || ([ !  -x "/root/spot/tor-browser_en-US/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k

with

Code: Select all

Exec=sudo -u spot /root/spot/tor-browser_en-US/Browser/start-tor-browser

I drag and drop /root/spot/tor-browser_en-US/Browser/start-tor-browser on to the desktop to create a short-cut. Also place a copy of this .desktop file in /usr/share/applications and run in a terminal (or from the shutdown menu):

Code: Select all

fixmenus
jwm -restart

I just tested the method again on a Fossapup64-9.0.5 sporting the apt_sfs_load_fossa_amd64.sfs plugin.
and Tor starts!

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable

Post by courtage »

Thanks to all that replied with suggestions, but the only one which has worked is @rockedge 's .

So tvm to him, even though it seems a small pita to have to use spot.

What I *still* don't understand is why I get a segfault; I can only guess that somehow running as root I'm picking up an incompatible library ? (though I did try unsetting my PATH and LD_LIBRARY_PATH & still got a segfault)

User avatar
rockedge
Site Admin
Posts: 6532
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2742 times
Been thanked: 2619 times
Contact:

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by rockedge »

courtage wrote:

What I *still* don't understand is why I get a segfault; I can only guess that somehow running as root I'm picking up an incompatible library ?

I think it has to do with directory/file ownership/permissions. When I run Tor browser as "root" I get a an error message informing that running as root is discouraged and the program halts and will not start the browser. What is probably happening to you is as the browser component starts as root, the main binary is called but can not run the other components because of a "Permission Denied" error. Which causes some parts not to load and the binary seg faults at startup. Which in principle, is what you surmise as well, that some component is incorrectly being selected or missing.

This is all theory and I could be totally wrong.

This method will work also for other packages that will not run as root and run-as-spot doesn't encompass all the permissions a package needs to run.

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by courtage »

Aaargh.

Had this working perfectly in Bionic64.

Code: Select all

#!/bin/bash
cd /root/spot/tor-browser_en-US
sudo -u spot ./start-tor-browser.desktop

but now upgraded to Fossa64 and I'm getting this!

Code: Select all

root# sh tor.sh 
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
root# 

H E L P

User avatar
ThruHammer
Posts: 257
Joined: Sun Jul 12, 2020 1:08 am
Location: Ray Brook, NY
Been thanked: 14 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by ThruHammer »

Courtage mate, what if she reads?

Code: Select all

#!/bin/bash
cd /root/spot/tor-browser_en-US
run-as-spot ./start-tor-browser.desktop
User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by OscarTalks »

Is the objective to have a Tor Browser that works or is it about being able to get it to work yourself?
Would you prefer it to run as spot or as root?
As I mentioned earlier in the thread, my packages which I have tweaked for Puppy are available here:-
https://yadi.sk/d/7AkxbX4NqJUah
I tested 10.0.13 in Fossa64 and it works fine, running as root though, not tried to run it as spot

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by courtage »

I think you're missing the point here.

The fact is, it works perfectly in Bionic but not in Fossa.

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by courtage »

ThruHammer wrote: Tue Mar 16, 2021 4:15 pm

Courtage mate, what if she reads?

Code: Select all

#!/bin/bash
cd /root/spot/tor-browser_en-US
run-as-spot ./start-tor-browser.desktop

When I get a moment I'll reboot and test that, thanks

User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by courtage »

hah

if we try using run-as-spot we get

Code: Select all

root# run-as-spot start-tor-browser.desktop 
su: can't execute '/bin/ash': Permission denied
root# 

For @oscartalks: One problem with using someone else's individually created repackages (and I've encountered this over and over) is not that they don't work, but that the sole maintainer stops maintaining them; In the case of Tor, additionally, it's a package dedicated to security, and thus introducing a repackage in the middle provides an elementary (and gaping) hole in security.
Thus the requirement to find a way to run the native package without compromising that package. Running it via the 3 line script that @rockedge suggested does that perfectly; Or rather, it does it perfectly in Bionic, but apparently not in Fossa, in which case either that's a Fossa problem for the maintainers to sort out, or it's peculiar to my installation, in which case I need help to understand what's going wrong and correct it. The root cause (pun unintended) might have impacts elsewhere, too.
"Just run my repackage" doesn't address any of these. It provides an exit without a solution.

User avatar
ThruHammer
Posts: 257
Joined: Sun Jul 12, 2020 1:08 am
Location: Ray Brook, NY
Been thanked: 14 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by ThruHammer »

That line alone doesn't work, but possibly with a FULL path.

As a script what I posted works for me.

You may have to first, as root:

Code: Select all

chown -R spot ~/spot/tor-browser_en-US

Code: Select all

chgrp -R spot ~/spot/tor-browser_en-US

In order to make it happen.

User avatar
ThruHammer
Posts: 257
Joined: Sun Jul 12, 2020 1:08 am
Location: Ray Brook, NY
Been thanked: 14 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by ThruHammer »

This is the darn truth!

One problem with using someone else's individually created repackages (and I've encountered this over and over) is not that they don't work, but that the sole maintainer stops maintaining them.

There's a lot to be said about being resourceful.

User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: Tor browser segfaults in 64 bit pups -- unusable [mostly SOLVED]

Post by mikewalsh »

ThruHammer wrote: Tue Mar 16, 2021 9:04 pm

This is the darn truth!

One problem with using someone else's individually created repackages (and I've encountered this over and over) is not that they don't work, but that the sole maintainer stops maintaining them.

There's a lot to be said about being resourceful.

So shut the forum down.....and let everybody sort their own issues out. That's the best "equal opportunity" answer to THAT.

Many of us ARE resourceful.....but we still like the chance to have a conflab.....and swap notes, as it were. It's 'human nature', I think; we are, after all, social animals.

(*shrug*)

Mike. :o

Post Reply

Return to “Users”