LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2018, 04:18 AM   #1
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Rep: Reputation: Disabled
torsocks not working properly


Hi altogether,

I have installed torsocks according to the readme-file and the description on page https://www.wilderssecurity.com/thre...ks-2-1.378057/ . I got the installation file and did the following:

Code:
$ ./configure
$ make
$ sudo make install

If you are compiling it from the git repository, run ./autogen.sh before the
configure script.
The installation went well and torsocks is now installed.

Yet when trying to get it to run (e.g.) with
Code:
torsocks rhythmbox
it starts rhythmbox alright but it canīt establish an internet connection.
So I cannot play any radio stations.

The terminal says:

Code:
(rhythmbox:32024): Rhythmbox-WARNING **: Unable to grab media player keys: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon was not provided by any .service files
1528636178 PERROR torsocks[32024]: socks5 libc connect: Verbindungsaufbau abgelehnt (in socks5_connect() at socks5.c:202)
Code:
torsocks -P 9150 rhythmbox
doesnīt work either.

When typing
Code:
torsocks firefox
firefox doesnīt seem to start in the first place. Yet when looking at "ps" firefox appears in the list. Strange!

Can anyone tell me what I am doing wrong here?

Tnx a lot in advance.

Greetings.
Rosika
 
Old 06-12-2018, 05:34 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by Rosika View Post
Can anyone tell me what I am doing wrong here?
Well, to me it looks like you have missed the package manager. The correct way to add torsocks would be to install it from the repositories using the distro's official package management system. That will avoid a lot of trouble and mess. Which distro, including version, do you have?

Failing that, a distant second best way would be to roll torsocks into a package and then install it from that. Again that depends on which version of which distro you have. I would recommend the first way however.
 
1 members found this post helpful.
Old 06-12-2018, 06:01 AM   #3
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi,

tnx for your answer.
Indeed, I didnīt install torsocks via apt because when doing so I would also get tor and tor-geoipdb automatically.
Yet I donīt want to install tor via apt because Iīve already got the standalone tor-version (Tor-Browser-Bundle), which doesnīt require installation and can be be put on a USB-stick.

Ubuntuusers.de says itīs the variant recommended by the Tor-developers (https://wiki.ubuntuusers.de/Tor/Inst...le-Webdownload).
So I chose this one.

Are you saying that torsocks requires tor to be installed on the system?
Then why would the installation-description of torsocks be necessary? ----> https://github.com/dgoulet/torsocks

Anyhow hereīs additional info as to my system:

- Lubuntu 16.04.4 LTS, 64 bit
- kernel: 4.4.0-128-generic #154
- torsocks-version: Torsocks 2.2.0
 
Old 06-12-2018, 06:09 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by Rosika View Post
Yet I donīt want to install tor via apt because ...
Ok, since you have Lubuntu, you can install it via dpkg instead -- after you roll your own package. If you use a bare 'make all && sudo make install' approach, you will eventually mess up your system enough that a fresh re-installatino of the whole OS is needed. Start with these older articles as background:

https://debian-administration.org/ar...ackages_part_1

https://debian-administration.org/ar...ackages_part_2

Then walk through the steps here:

https://wiki.debian.org/HowToPackageForDebian

Once you have a .deb package, you can add it (or remove it) with dpkg.
 
Old 06-12-2018, 06:19 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
On Mint 19, using Ubuntu 18.04's package base, apt show torsocks indicates that torsocks does not depend on the tor package, it only recommends it. Its only dependency is libc6. Unless you have your apt system set up to install recommended packages, it shouldn't automatically install tor, on an 18.04 system anyway.

What does apt show torsocks show on your 16.04 system?

Last edited by hydrurga; 06-12-2018 at 06:20 AM.
 
1 members found this post helpful.
Old 06-12-2018, 06:45 AM   #6
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi hydrurga,

tnx.
I checked that with me as well. Youīre right.

apt show torsocks gives me the same results you posted.
Quote:
Unless you have your apt system set up to install recommended packages [...]
Thatīs probably it.

O.K., Iīm a bit confused now.
As already mentioned I installed torsocks that way:
Code:
$ ./configure
$ make
$ sudo make install
Did I do something wrong here?
Because Turbocapitalist pointed out:
Quote:
If you use a bare 'make all && sudo make install' approach, you will eventually mess up your system enough that a fresh re-installatino of the whole OS is needed.
Should I un-install it?

P.S.:

libc6 is installed :
libc6:amd64, libc6:i386, libc6-dev:amd64
 
Old 06-12-2018, 06:48 AM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
For the moment, let's have a look to see if apt is set up to automatically install recommended packages or not:

Code:
apt-config dump | grep Recommends
 
Old 06-12-2018, 06:55 AM   #8
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Yeah, it seems that way:

Code:
APT::Install-Recommends "true";
 
Old 06-12-2018, 07:04 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Indeed. I would recommend against it as, imo, only dependencies should be auto installed.

Can you bear with me a moment while we figure out why that is the case for your particular system?

Code:
ls -la /etc/apt/apt.conf.d
 
Old 06-12-2018, 07:12 AM   #10
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Tnx.
Here are my results:

Code:
 ls -la /etc/apt/apt.conf.d 
insgesamt 56
drwxr-xr-x 2 root root 4096 Jun 12 11:33 ./
drwxr-xr-x 6 root root 4096 Mär 11  2017 ../
-rw-r--r-- 1 root root   49 Jul 20  2016 00aptitude
-rw-r--r-- 1 root root   40 Jul 20  2016 00trustcdrom
-rw-r--r-- 1 root root  769 Apr 14  2016 01autoremove
-r--r--r-- 1 root root 2759 Jun 12 11:33 01autoremove-kernels
-rw-r--r-- 1 root root   42 Apr 14  2016 01-vendor-ubuntu
-rw-r--r-- 1 root root  168 Dez  8  2016 10periodic
-rw-r--r-- 1 root root  108 Apr 12  2016 15update-stamp
-rw-r--r-- 1 root root   85 Apr 12  2016 20archive
-rw-r--r-- 1 root root  243 Dez 16  2009 20dbus
-rw-r--r-- 1 root root  182 Nov 10  2015 70debconf
-rw-r--r-- 1 root root   32 Jun 10 13:55 99synaptic
-rw-r--r-- 1 root root  305 Apr 12  2016 99update-notifier
 
Old 06-12-2018, 07:18 AM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Thanks. Ok, let's add another config file to the mix, if you want to switch off the auto installation of recommended packages:

*** Note that this advice has now been superseded - see later in this thread ***

Code:
sudo cat > /etc/apt/apt.conf.d/01norecommend << EOF
APT::Install-Recommends "0";
EOF
Then run the command in post #7 again to confirm that it has taken hold.

Also, let's check, just in case, what your equivalent setting for Suggests is:

Code:
apt-config dump | grep Suggests

Last edited by hydrurga; 06-12-2018 at 08:46 AM.
 
Old 06-12-2018, 07:30 AM   #12
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Well, the first one didnīt work:
Code:
rosika@rosika-Lenovo-H520e:~$ sudo cat > /etc/apt/apt.conf.d/01norecommend << EOF
> APT::Install-Recommends "0";
> EOF
bash: /etc/apt/apt.conf.d/01norecommend: Keine Berechtigung
Bash says I donīt have the permission to do that. My password isnīt queried.

The second one:
Code:
rosika@rosika-Lenovo-H520e:~$ apt-config dump | grep Suggests
APT::Install-Suggests "0";
 
Old 06-12-2018, 07:37 AM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok, my apologies.

Before that command, issue a sudo su command first.

For the command itself, don't use sudo.

Then after the command, issue an exit command.

That will temporarily give you the root priviledges you need to create that file.
 
1 members found this post helpful.
Old 06-12-2018, 07:47 AM   #14
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Tnx.
This time it worked.
But still:
Code:
rosika@rosika-Lenovo-H520e ~> apt-config dump | grep Recommends
APT::Install-Recommends "true";
 
Old 06-12-2018, 07:57 AM   #15
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
What fun. Some other config option must be taking precedence, unless there's some cacheing of config options going on. We can sort that out later, but if you want, let's try installing the repo version of torsocks (we can use the --no-install-recommends command line option). It's not guaranteed to work any better than the version you manually built, but it's worth trying.

First of all though, you need to uninstall the version you manually installed. Does its README file, or other documentation, advise as to how it can be uninstalled?

By the way, if anyone reading this wonders why the original sudo cat command didn't work: https://stackoverflow.com/questions/...vim-works-fine - I had no idea. I do now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I using the torsocks with curl. P.G.Krish Linux - Security 4 07-11-2016 12:16 AM
Hibernate not working properly. hack3rcon Linux - Software 5 02-25-2016 03:35 AM
Using Torsocks to hide the i.p. address question(s) Michael Piziak Linux - Software 8 02-14-2016 01:20 PM
dhcpd not working properly bwarsh Linux - Networking 1 08-15-2005 04:24 PM
X not working properly. MylesCLin Linux - Software 1 09-15-2004 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration