Install from PPA rather than repo

22 replies [Last post]
GNUbahn
Offline
Joined: 02/18/2016

I have used the tor browser launcher (tbl) for some time and it generally works well.

On my latest fresh Trisquel install (Librebooted Macbook 2,1) I cannot gen tbl to work. It downloads without issues, but when the browser is to be opened I get a signature verification problem.

I install it from Micah's PPA but I just realised that tbl is also in Trisquel's repository. Since Micah's PPA has the newest version I prefer that but now comes the questions which are both specific to the given case and generic for similar cases:

Can the given issue be caused by the same application being present in both the repo and a PPA?

How can I make sure, that Trisquel installs from the PPA and not the repo?

--
See: https://github.com/micahflee/torbrowser-launcher

calher

I am a member!

Offline
Joined: 06/19/2015

PPAs usually take precedence over the system repos, so the PPA should
be what's installed.

To check, you can do "apt search torbrowser-launcher" at the command
line.  If one of the packages are installed, you should see
"[installed]" next to the package listing, like:

cal@flexo:~$ apt search torbrowser-launcher
Ordenando... Hecho
Buscar en todo el texto... Hecho
torbrowser-launcher/flidas,now 0.2.4-1 amd64 [instalado]
  helps download and run the Tor Browser Bundle

Hope this helps.

GNUbahn
Offline
Joined: 02/18/2016

Thanks. I got this output:

~$ apt search torbrowser-launcher
Sorting... Done
Full Text Search... Done
torbrowser-launcher/flidas,now 0.2.4-1 amd64 [installed]
helps download and run the Tor Browser Bundle

I suppose it means that the version from the PPA is not accessible somehow?

As can be seen in the attached pic, the PPA is registered and active.

PPA.png
calher

I am a member!

Offline
Joined: 06/19/2015

Should I use torbrowser-launcher instead of just downloading it from
Tor's website and running it from the archive?

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> Can the given issue be caused by the same application being present in
> both the repo and a PPA?

No, The version that is not installed should have no effect on your
system.

> How can I make sure, that Trisquel installs from the PPA and not the repo?

The package manager will default to the newer version, so in this
particular case you should not have to worry about it.

In general, you can run

$ apt policy [name of package]

to see what versions of a package are available, which (if any) is
installed, and which version the package manager would install by
default.

You can force a specific version with

$ sudo apt install [package name]=[version]

and prevent this from being overridden when upgrading with

$ sudo apt-mark hold [package name]

If you prefer a GUI, all of this can be done graphically using Synaptic
Package Manager.

GNUbahn
Offline
Joined: 02/18/2016

It seems that the version from the PPA is not even accessible:

~$ apt search torbrowser-launcher
Sorting... Done
Full Text Search... Done
torbrowser-launcher/flidas,now 0.2.4-1 amd64 [installed]
helps download and run the Tor Browser Bundle

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

What is the output of

$ apt policy torbrowser-launcher

?

GNUbahn
Offline
Joined: 02/18/2016

~$ apt policy torbrowser-launcher
torbrowser-launcher:
Installed: 0.2.4-1
Candidate: 0.2.4-1
Version table:
*** 0.2.4-1 500
500 http://es.archive.trisquel.info/trisquel flidas/main amd64 Packages
100 /var/lib/dpkg/status

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> Version table:
> *** 0.2.4-1 500
> 500 http://es.archive.trisquel.info/trisquel flidas/main amd64

Okay, indeed the package manager does not find the PPA's version of the
package.

Based on the screenshot you attached earlier it seems like you really
did add the PPA, but run

$ ls /etc/apt/sources.list.d

real quick and make sure that you see "micahflee-ppa-xenial.list"

Did you run "sudo apt update" after adding the PPA? This is a necessary
step, as adding the PPA just tells the package manager to use that
repository. Until you do an update, the package manager does not
actually check to see what is available in that repository.

Do an "apt update" now, and watch the output to see if there are any
errors. If there are errors, copy/paste them here. If not, run

$ apt policy torbrowser-launcher

again.

GNUbahn
Offline
Joined: 02/18/2016

~$ ls /etc/apt/sources.list.d
micahflee-ubuntu-ppa-xenial.list

It seems to be regignised, but after a an 'apt update' I still get

~$ apt search torbrowser-launcher
Sorting... Done
Full Text Search... Done
torbrowser-launcher/flidas,now 0.2.4-1 amd64 [installed]
helps download and run the Tor Browser Bundle

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

Any error messages or warnings while updating?

> ~$ apt search torbrowser-launcher

What about "apt policy torbrowser-launcher"?

GNUbahn
Offline
Joined: 02/18/2016

And the policy:

~$ apt policy torbrowser-launcher
torbrowser-launcher:
Installed: 0.2.4-1
Candidate: 0.2.4-1
Version table:
*** 0.2.4-1 500
500 http://es.archive.trisquel.info/trisquel flidas/main amd64 Packages
100 /var/lib/dpkg/status

GNUbahn
Offline
Joined: 02/18/2016

This drives me crazy. As you can see from the screenshot attached above, Micah's PPA is added, registered and recognised by trisquel. It is also shown by
~$ ls /etc/apt/sources.list.d
micahflee-ubuntu-ppa-xenial.list

But tha PPA seems to be not recognised when I try to install from it:
~$ sudo apt install torbrowser-launcher
Reading package lists... Done
Building dependency tree
Reading state information... Done
torbrowser-launcher is already the newest version (0.2.4-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

This is consistent with a search command output:
~$ apt search torbrowser-launcher
Sorting... Done
Full Text Search... Done
torbrowser-launcher/flidas,now 0.2.4-1 amd64 [installed]
helps download and run the Tor Browser Bundle

And with a policy command output:
~$ apt policy torbrowser-launcher
torbrowser-launcher:
Installed: 0.2.4-1
Candidate: 0.2.4-1
Version table:
*** 0.2.4-1 500
500 http://es.archive.trisquel.info/trisquel flidas/main amd64 Packages
100 /var/lib/dpkg/status

According to the Github page, the latest version, which I expected to have installed, is v0.3.1: https://github.com/micahflee/torbrowser-launcher/releases

How come Trisquel does not recognise the version from Michah's PPA?

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

I've found the problem. See here:

https://launchpad.net/~micahflee/+archive/ubuntu/ppa/+packages

The PPA does not have torbrowser-launcher packaged for Xenial, only
Bionic and Cosmic. Since Trisquel 8 is based on Xenial, there's no
package available.

If I were you I'd build it from source. The build instructions look very
straightforward.

https://github.com/micahflee/torbrowser-launcher/blob/develop/BUILD.md

GNUbahn
Offline
Joined: 02/18/2016

Thanks.

I have never tried to build from source before so let this be my first try.

I already had a beginners problem:

According to the guide the first steps are

git clone https://github.com/micahflee/torbrowser-launcher.git
cd torbrowser-launcher

but there is no torbrowser-launcher folder to cd to. And from where should I cd to it? I don't know but is the right question: Where does git clone the source to?

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> but there is no torbrowser-launcher folder to cd to.

Make sure that git is installed

$ sudo apt install git

so that the command is successful.

> And from where should I
> cd to it? I don't know but is the right question: Where does git clone the
> source to?

The torbrowser-launcher directory will be created in the directory where
you run "git clone", so if you are in your home directory (/home/user)
it will be in /home/user/torbrowser-lancher. Therefore, you should just
run the "cd" command immediately after "git clone".

GNUbahn
Offline
Joined: 02/18/2016

Thanks. Now I got a little further, but ran into a new problem:

~/Downloads/torbrowser-launcher$ sudo apt install build-essential dh-python python3-all python3-stdeb python3-pyqt5 python3-gpg python3-requests python3-socks gnupg2 tor
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-gpg
jcb@t4s:~/Downloads/torbrowser-launcher$ ./build_deb.sh

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> E: Unable to locate package python3-gpg

This package isn't present in Ubuntu 16.04 or Trisquel 8. I tried
several ways of getting it and ran into problems. I can't afford to
spend more time on this today. You could ask the dev for build
instructions for Ubuntu 16.04, or just do this:

$ wget https://www.torproject.org/dist/torbrowser/8.0.4/tor-browser-linux64-8.0.4_en-US.tar.xz
$ tar xf tor-browser-linux64-*_en-US.tar.xz
$ rm tor-browser-linux64-*_en-US.tar.xz

You can now launch Tor Browser with

$ ~/tor-browser_en-US/Browser/start-tor-browser

but you probably also want to be able to launch it with a single
terminal command and/or from menus and launchers.

To be able to launch it with a single terminal command, run

$ echo "/home/$USER/tor-browser_en-US/Browser/start-tor-browser" > ~/.local/bin/tor-browser
$ chmod +x ~/.local/bin/tor-browser

and you will now be able to launch it with

$ tor-browser

To make Tor Browser appear in menus and launchers, create and edit with pluma

$ sudo pluma /usr/share/applications/tor-browser.desktop

and copy/paste the text below, replacing both instances of "chaosmonk"
with your own user.

[Desktop Entry]
Version=1.0
Name=Tor Browser
Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=/home/chaosmonk/tor-browser_en-US/Browser/start-tor-browser
Terminal=false
Type=Application
Icon=/home/chaosmonk/tor-browser_en-US/Browser/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;

GNUbahn
Offline
Joined: 02/18/2016

Chaosmonk, I am sorry to take too much of your time, and I really appreciate your efforts. Thanks a lot.

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> Chaosmonk, I am sorry to take too much of your time, and I really
> appreciate your efforts. Thanks a lot.

No problem. I'll look into torbrowser-launcher more if I have the
chance, but for now the instructions in my last message should achieve
the same thing. (Assuming that you are the only user, since the binary
is in your home directory. I'll have to tweak the instructions if you
need it available to other users system-wide.)

GNUbahn
Offline
Joined: 02/18/2016

I have now successfully installed Tor by your instructions. After you spending so much time on it, I am almost embarrassed to say that I did know how to install Tor the 'normal' way. But I didn't know your trick to add it to the menu. I ad to manually make the /bin/ though.

Still, I will much appreciate a solution to the torbrowser-launcher since I wish to use it myself and it is a lot more convenient and convincing for others (even less knowledgeable than me).

Once again, thanks a lot for your efforts.

loldier
Offline
Joined: 02/17/2016

No need to "install", I never do.**

Get the latest Tor-Browser here (portable executable).

https://www.torproject.org/projects/torbrowser.html.en

Extract to ~/Desktop, and launch.

**
Unless there's non-free stuff in the bundle.

tor.png
GNUbahn
Offline
Joined: 02/18/2016

This is an easy solution. I believe that the main difference to the solution provided by chaosmonk is that the tar is extracted in a folder on the desktop and no link and icon is created in the menu? Or is there more to it?