/var/run/tor/control broken symlink

I tried to connect OnionShare with socket file option, but it said “Can’t connect to the Tor controller using socket file /var/run/tor/control.”

Then I tried to see the content inside tor/control by sudoedit and it says No such device or address. But since I can see it exist in GUI File Manager, I tried
ls -l /var/run/tor/
result being,
total 8
srw-rw-rw- 1 debian-tor debian-tor 0 Apr 11 04:19 control
-rw-r----- 1 debian-tor debian-tor 32 Apr 11 04:21 control.authcookie
-rw-r----- 1 debian-tor debian-tor 32 Apr 11 04:21 control_auth_cookie
srw-rw-rw- 1 debian-tor debian-tor 0 Apr 11 04:19 socks
while “control” and “socks” are coloured purple (orphan symlink).

How do I restore broken symlink to use OnionShare properly?

Did you follow these instructions?

Yes, I was following that page’s instruction.
I did Flatpak OnionShare Installation and both Gateway and Workstation VM configurations.
Both OnionShare v1.3 and v2.1 cannot connect to Tor with socket file.

I did tested with other possible Tor-over-Tor setting and while it threw no error, I still couldn’t download my file through the url (“Could not reach the server” error on browser).
I’ll follow that page’s instruction from the biggining one more time.

Edit: I didn’t do anything but now i can use OnionShare v1.3 with socket file without an issue, and then v2.1 won’t even open.
I guess I’ll reinstall it from flatpak.

Anyway, thank you for your time.

Same problem here. I installed via flatpak.

“Can’t connect to the Tor controller using socket file /var/run/tor/control.”

Another problem is I often have to delete ~/.config/onionshare/lock to be able to start OnionShare.

It works if I choose the option “connect using control port”. It says “connected to the tor controller” with all functionalities available.

Is there a drawback to this method?

Actually, I’m not sure if it works because I can’t access the services that I host via tor browser from another Whonix workstation.

In fact I checked the files and they are okay.

Inside Whonix-Workstation:

socat - UNIX-CONNECT:/var/run/tor/control

signal NEWNYM

250 OK


It appears to be working.

user@host:~$ socat -d -d - UNIX-CONNECT:/var/run/tor/control

2021/07/22 00:44:56 socat[18278] N reading from and writing to stdio
2021/07/22 00:44:56 socat[18278] N opening connection to AF=1 “/var/run/tor/control”
2021/07/22 00:44:56 socat[18278] N successfully connected from local address AF=1 “\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xEE\xEE\xEE\xEE\0\0”
2021/07/22 00:44:56 socat[18278] N starting data transfer loop with FDs [0,1] and [5,5]

How do I get that output?

I don’t understand anything anymore. I started over with a new Whonix-Workstation AppVM based on the whonix-ws-15 TemplateVM where OnionShare is installed. But lo and behold, when I try to run OnionShare in the new workstation I get an error saying " app/org.onionshare.OnionShare/x86_64/master not installed", even though I added OnionShare to the available applications in Qube Settings and the file /usr/bin/onionshare is present.

  1. type

signal NEWNYM

  1. press enter

I am asking because the signal command was not found.

How do you explain the error about OnionShare not being installed despite the fact that it is installed in whonix-ws-15 TemplateVM? Edit: I just realized this is a question for the Qubes-Whonix forum.

Prerequisite is already running socat - UNIX-CONNECT:/var/run/tor/control.

It’s not installed. It’s uwt.

dpkg -S /usr/bin/onionshare

Please use Information Booster might be Available! to learn how to install onionshare or any flatpak based application inside Qubes. In this regard, Whonix is same as Qubes Debian template.

It works.

I followed all the instructions. Consider updating the instructions to add the following step.
apt install gnome-software-plugin-flatpak as per the setup guide at Flatpak—the future of application distribution

Yep. I followed all the instructions plus the missing step and yet…

whonix-ws-15 TemplateVM says:

Skipping: orgonionshare.OnionShare/x86_64/stable is already installed

onionshare AppVM says:

error: app/org.onionshare.OnionShare/x86_64/master not installed

Should I file a bug report?