Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified.

Bug #680192 reported by Lonnie Lee Best
202
This bug affects 42 people
Affects Status Importance Assigned to Milestone
vidalia (Debian)
Fix Released
Unknown
vidalia (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Binary package hint: vidalia

I installed Vidalia using Ubuntu Software center in Ubuntu Desktop 10.10 64 bit edition.

When I try to start vidalia, I get the following error:

"Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified."

Then I click the show settings button, and see:
"Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified."

The the default path show is: "/usr/sbin/tor".

Isn't this a bug, that it can't start using this default path?

Related branches

description: updated
description: updated
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

Does the vidalia package in Ubuntu need to be update?
http://www.torproject.org/docs/debian-vidalia.html.en

Revision history for this message
David Ramsden (david-hexstream) wrote :

This is because tor is starting as a "system service".

$ ls -l /etc/rc2.d/S20tor
lrwxrwxrwx 1 root root 13 May 23 2009 /etc/rc2.d/S20tor -> ../init.d/tor

When you run Vidalia, tor needs to run tor under your user account. Vidalia tries to start tor but can't, because it's already running. So you need to stop tor before running Vidalia:

$ sudo /etc/init.d/tor stop

If you don't have the need to run tor at system start up (because you always use Vidalia for example), edit /etc/default/tor and set RUN_DAEMON to "no".

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vidalia (Ubuntu):
status: New → Confirmed
Revision history for this message
Jack Wearden (jackweirdy) wrote :

I'm experiencing this bug even when I confirm the tor service is stopped (either through `service tor status` or `service tor stop`), so it looks like this may not be the issue.

What's more, running `/usr/sbin/tor` from the command line *does* start tor.

Revision history for this message
Volkmar (thelastdonj) wrote :

On 12.10 (freshly installed) , I've the same experience as Jack Wearden .

Revision history for this message
Jack Wearden (jackweirdy) wrote :

This is the output of `vidalia -loglevel debug`:

(<unknown>:7310): IBUS-WARNING **: Unable to load /var/lib/dbus/machine-id: Failed to open file '/var/lib/dbus/machine-id': Permission denied

(<unknown>:7310): GVFS-RemoteVolumeMonitor-WARNING **: cannot open directory /usr/share/gvfs/remote-volume-monitors: Error opening directory '/usr/share/gvfs/remote-volume-monitors': Permission denied
process 7310: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
process 7310: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.

I tried running vidalia with `gksudo vidalia -loglevel debug` but got the error:

vidalia: cannot connect to X server :0

Also attached screenshot of the error message.

Revision history for this message
Sam Edwards (cfsworks) wrote :

Hello all,

This appears to be a problem with AppArmor not allowing Vidalia to launch the Tor binary. The package maintainer should probably fix the AppArmor profile.

Until then, a suitable workaround is to disable the usr.bin.vidalia AppArmor profile:

sudo ln -s /etc/apparmor.d/usr.bin.vidalia /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.vidalia

Cheers,
Sam

Revision history for this message
Jack Wearden (jackweirdy) wrote :

I can confirm that apparmor is the cause.

A safer alternative to Sam Edwards' suggestion is to allow Vidalia access to the tor binary, by adding the following line to /etc/apparmor.d/usr.bin.vidalia:

 /usr/sbin/tor Ux,

also ensure that the tor service isn't running (by running service tor stop, and removing it from rc.d scripts if needed)

Revision history for this message
Jack Wearden (jackweirdy) wrote :

Patch attached: Patches debian/apparmor-profile to allow access to tor binary

Revision history for this message
Jack Wearden (jackweirdy) wrote :

Oops, uploaded the file, not the patch!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "apparmor-profile-patched" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
dllud (dllud) wrote :

Same bug here, solved as suggested by Jack Wearden. Then I just issued the following command to replace apparmor definitions:
sudo apparmor_parser -r /etc/apparmor.d/usr.bin.vidalia

tags: added: raring
tags: added: precise quantal
Revision history for this message
Adam Roos (adamroos) wrote :

I have this problem as well, and am wondering how to apply patch to file etc/apparmor.d/usr.bin.vidalia. New ubuntu user. Tried to insert command line myself, couldn't save it due to gedit being unable to backup the file. I understand that this is very nooby, any advice?

Revision history for this message
Jack Wearden (jackweirdy) wrote :

Adam;

Open up a terminal and run the command

gksudo gedit /etc/apparmor.d/usr.bin.vidalia

this should open up a text editor with root permissions so you can overwrite the file with the new one. Then paste in the following line:

 /usr/sbin/tor Ux,

Revision history for this message
Brooks B (bmbeverst) wrote :

Fixed as well. Thanks Jack Wearden.

Revision history for this message
Jack Wearden (jackweirdy) wrote :

I've finally got around to attempting to fix this bug properly - I'm not the package maintainer though so it has to be reviewed before it is accepted. If you're interested in following the progress of this, see here https://code.launchpad.net/~jackweirdy/vidalia/680192/+merge/178623

Changed in vidalia (Debian):
status: Unknown → New
Revision history for this message
Robie Basak (racb) wrote :

Thanks for submitting this bug to Debian!

So based on that, my understanding is:

This is a bit of a wishlist bug in Debian, since AppArmor isn't installed in Debian by default, and this only affects one specific mode of operation in Vidalia. Is this accurate?

But in Ubuntu, AppArmor is installed by default, so this specific mode of operation in Vidalia doesn't work by default. Right?

So it might make sense to apply a patch temporarily in Ubuntu until there's a more general fix and confinement is added for non-root Tor use from Vidalia. Or perhaps it's better to require the user to apply this workaround so that the user understands that Tor isn't going to run confined as it otherwise would.

What do you think?

Wesley Tanaka (wtanaka)
tags: added: saucy
Revision history for this message
RaphaelBarros (thebigheadone) wrote :

Jack Wearden, in which line should I paste the line " /usr/sbin/tor Ux,"? After " /usr/share/icons/*/index.theme k,"?

Thank you.

Revision history for this message
Jack Wearden (jackweirdy) wrote : Re: [Bug 680192] Re: Vidalia was unable to start Tor. Check your settings to ensure the correct name and location of your Tor executable is specified.

It doesn't matter exactly which line, you can place it anywhere as long as
it has the trailing comma :)

Changed in vidalia (Ubuntu):
importance: Undecided → High
Revision history for this message
giacof (giacof) wrote :

I confirm this bug on saucy.
Adding the "/usr/sbin/tor Ux," line to AppArmor configuration does NOT fix the issue to me.

Revision history for this message
giacof (giacof) wrote :

In the kernel log I found the following lines:

Feb 11 13:14:34 Base kernel: [ 515.502544] type=1400 audit(1392120874.882:50): apparmor="DENIED" operation="open" parent=2110 profile="/usr/bin/vidalia" name="/usr/share/kde4/config/kdebugrc" pid=5065 comm="vidalia" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Feb 11 13:14:34 Base kernel: [ 515.502609] type=1400 audit(1392120874.882:51): apparmor="DENIED" operation="open" parent=2110 profile="/usr/bin/vidalia" name="/usr/share/kubuntu-default-settings/kde4-profile/default/share/config/kdebugrc" pid=5065 comm="vidalia" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Feb 11 13:15:07 Base kernel: [ 548.148103] audit_printk_skb: 90 callbacks suppressed
Feb 11 13:15:07 Base kernel: [ 548.148107] type=1400 audit(1392120907.506:82): apparmor="DENIED" operation="rename_src" parent=1 profile="system_tor" name="/etc/tor/torrc" pid=1773 comm="tor" requested_mask="wd" denied_mask="wd" fsuid=109 ouid=0
Feb 11 13:15:10 Base kernel: [ 551.304020] type=1400 audit(1392120910.662:83): apparmor="DENIED" operation="exec" parent=5065 profile="/usr/bin/vidalia" name="/usr/bin/tor" pid=5156 comm="vidalia" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
Feb 11 13:20:15 Base kernel: [ 856.643244] type=1400 audit(1392121215.814:84): apparmor="DENIED" operation="exec" parent=5065 profile="/usr/bin/vidalia" name="/usr/bin/tor" pid=8816 comm="vidalia" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
Feb 11 13:20:40 Base kernel: [ 881.196426] perf samples too long (2511 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
Feb 11 13:40:50 Base kernel: [ 2091.621962] type=1400 audit(1392122450.042:85): apparmor="DENIED" operation="open" parent=2110 profile="/usr/bin/vidalia" name="/home/tuxx/.kde/share/config/kdebugrc" pid=5065 comm="vidalia" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

Revision history for this message
Wesley Tanaka (wtanaka) wrote :

I also encounter

https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/22

in Ubuntu 13.10 and based on the previous comments in this thread was able to fix it by adding:

  /usr/bin/tor Ux,

to /etc/apparmor.d/usr.bin.vidalia and then running sudo apparmor_parser -r /etc/apparmor.d/usr.bin.vidalia

Revision history for this message
Martin Cigorraga (martincigorraga) wrote :

Hello all, I came here redirected by this bug report: https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/1290107/comments/5

> lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04

> aptitude show vidalia
Package: vidalia
State: installed
Automatically installed: no
Version: 0.2.21-1
Priority: extra
Section: universe/net
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Uncompressed Size: 6.201 k
Depends: libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libqt4-network (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.8.0), libqtgui4 (>= 4:4.7.0~beta1), libstdc++6 (>= 4.1.1), debconf (>= 1.5.11) | debconf-2.0, ucf, adduser, tor (>= 0.2.2.29-beta-1)

> vidalia

(process:13711): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
An AppArmor policy prevents this sender from sending this message to this recipient, 0 matched rules; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="Hello" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)

(<unknown>:13711): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
fish: Job 1, “vidalia” terminated by signal SIGTRAP (Trace or breakpoint trap)

Cheers

Revision history for this message
Max Beikirch (max-beikirch-3) wrote :

Same here! I edited my /etc/apparmor.d/usr.bin.vidalia to look like this:

#include <tunables/global>

/usr/bin/vidalia {
  #include <abstractions/kde>
  #include <abstractions/nameservice>

  /usr/lib/** mr,

  /usr/bin/tor Ux,

  owner @{HOME}/.vidalia/ rw,
  owner @{HOME}/.vidalia/** rwmk,

  /{var/,}run/tor/control rw,
  /{var/,}run/tor/control.authcookie r,

  /usr/share/icons/*/index.theme k,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.bin.vidalia>
}

but the error persists.

Revision history for this message
frood (ford-pre) wrote :

Same here running Xubuntu 14.04.
The bugfix does not solve the issue.

Revision history for this message
aeronutt (aeronutt) wrote :

Same here also. Tried all the above fixes, and vidalia does not run.

Revision history for this message
aeronutt (aeronutt) wrote :

UPDATE, as a test, I disabled apparmor completely, and vidalia runs.
Using Gnome-ubuntu 14.04

Revision history for this message
giacof (giacof) wrote :

Confirmed on Kubuntu 14.04.1 LTS
Vidalia is unusable to me

Revision history for this message
Solitaire (bill-s0l) wrote :

Running : Ubuntu 14:10 beta

Used Sam Edwards Workaround to get Vidalia running.:

https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/8

Revision history for this message
> "Wetware Random Number Generator" (tnrng-purge-deactivatedaccount) wrote :

Confirmed on Ubuntu 14.04.1 LTS.

I edited my /etc/apparmor.d/usr.bin.vidalia to look like this:

#include <tunables/global>

/usr/bin/vidalia {
  #include <abstractions/kde>
  #include <abstractions/nameservice>

  #include <abstractions/dbus-session>
  #include <abstractions/dconf>
  #include <abstractions/ibus>
  #include <abstractions/tor>

  owner @{HOME}/.vidalia/ rw,
  owner @{HOME}/.vidalia/** rwmk,

  /{var/,}run/tor/control rw,
  /{var/,}run/tor/control.authcookie r,

  /usr/share/icons/*/index.theme k,

  /etc/** rmk,
  /usr/** rmixk,
  @{PROC}/ r,
  @{PROC}/* rm,
  owner /{,var/}run/user/*/** rw,
  owner @{PROC}/** rm,

  owner @{HOME}/.tor/ rw,
  owner @{HOME}/.tor/** rwmk,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.bin.vidalia>
}

Then I just issued the following command to replace apparmor definitions:

sudo apparmor_parser --replace /etc/apparmor.d/usr.bin.vidalia

Now vidalia runs, I have tor connectivity & /var/log/syslog is clean of AppArmor messages.

tags: added: trusty
Revision history for this message
HacKan (hackan) wrote :

Confirmed, #31 (https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/31) works for me, but previous #8 (https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/8) adding the line "/usr/bin/tor Ux," does not.

---
My system:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

uname -a
Linux hc-vision-black 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

vidalia 0.2.2.1 (GUI)

tor --version
Tor version 0.2.4.23 (git-19f0f189116dba73).

---

Previous Error:

vidalia

(process:31922): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
An AppArmor policy prevents this sender from sending this message to this recipient, 0 matched rules; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="Hello" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)

(<unknown>:31922): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
«trap» para punto de parada/seguimiento (`core' generado)

---

Solution:
#31 https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/31

Revision history for this message
> "Wetware Random Number Generator" (tnrng-purge-deactivatedaccount) wrote :

After reboot, vidalia can't connect with D-BUS again. To solve my new /etc/apparmor.d/usr.bin.vidalia looks like is:

#include <tunables/global>

/usr/bin/vidalia {
  #include <abstractions/lightdm>
  #include <abstractions/kde>
  #include <abstractions/nameservice>

  owner @{HOME}/.vidalia/ rw,
  owner @{HOME}/.vidalia/** rwmk,

  /{var/,}run/tor/control rw,
  /{var/,}run/tor/control.authcookie r,

  /usr/share/icons/*/index.theme k,

  owner @{HOME}/.tor/ rw,
  owner @{HOME}/.tor/** rwmk,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.bin.vidalia>
}

Revision history for this message
Farshad (farshad-foroughi1985) wrote :

Same here I faced the problem in Ubuntu 14.10 and "https://bugs.launchpad.net/ubuntu/+source/vidalia/+bug/680192/comments/8" fixed the issue

Revision history for this message
arsalan (e-arsalan) wrote :

I'm new and using ubuntu 14,
I can't find out what should I do and what does it mean:

sudo ln -s /etc/apparmor.d/usr.bin.vidalia /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.vidalia

Revision history for this message
Puneet (puneet-kumar) wrote :

hey arsalan, i think you are not using root to open these commsnds....
In command prompt type: su
It will ask password for root. After that you can edit those changes.
P.S. su means super user.

post of "Wetware Random Number Generator" (tnrng-purge-deactivatedaccount) worked for my case that is new /etc/apparmor.d/usr.bin.vidalia looks like is:

#include <tunables/global>

/usr/bin/vidalia {
  #include <abstractions/lightdm>
  #include <abstractions/kde>
  #include <abstractions/nameservice>

  owner @{HOME}/.vidalia/ rw,
  owner @{HOME}/.vidalia/** rwmk,

  /{var/,}run/tor/control rw,
  /{var/,}run/tor/control.authcookie r,

  /usr/share/icons/*/index.theme k,

  owner @{HOME}/.tor/ rw,
  owner @{HOME}/.tor/** rwmk,

  # Site-specific additions and overrides. See local/README for details.
  #include <local/usr.bin.vidalia>
}

Changed in vidalia (Debian):
status: New → Fix Released
Revision history for this message
themusicgod1 (themusicgod1) wrote :

This isn't much of a bug in wily since vidalia is gone.

Revision history for this message
themusicgod1 (themusicgod1) wrote :

Vidalia has been replaced in tails, and now in debian by OnionCircuits https://packages.debian.org/sid/utils/onioncircuits

Revision history for this message
themusicgod1 (themusicgod1) wrote :

onioncircuits, the replacement for vidalia is now in ubuntu (yakkety)
http://packages.ubuntu.com/yakkety/onioncircuits

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.