How run Tor-browser for a new user account?

Hi,

I would like to run tor browser from another user… ( linux )

So I’ve did the following ( Under the latest MX Linux, within XFCE environment)

# as root
useradd -mc "To run tor browser only." TorUser
passwd TorUser

su TorUser

cd /opt
tar -xf ~/tor-browser-linux-x86_64-14.5.4.tar.xz

cd /opt/tor-browser
./start-tor-browser.desktop

but nothing happen, I get no error message and I don’t see any tor process running ps

Any ideas ?

Thanks.

Hi,

I’m still stuck with this problem…

I have tried something else.

under, MX Linux ( Debian, SysVinit, XFCE )

#as root, in a terminal under XFCE

useradd --create-home --system --shell /usr/sbin/nologin TorUser
# btw I don't know If I show create it with or without --system !?

tar -xf tor-browser-linux...tar -C /opt --totals
chown -R TorUser:TorUser /opt/tor-browser

runuser -u TorUser -- /opt/tor-browser/start-tor-browser.desktop

return

Launching ‘./Browser/start-tor-browser --detach’…

But nothing happen, and I don’t see any process for TorUser

any ideas ?

I’ve tried another approach, as runuser don’t succeed.

I’ve the permission group to FooBar and make the permissions change for the group on all the files.

I’ve did

groupadd --users gordon FooBar
newgrp Foobar
cd /path/to/tor-browser
./start-tor-browser.desktop

and got now (in the tor-browser GUI ! (progress) )

Tor exited during startup. This might be due to an error in your torrc file, a bug in Tor or another program on your system, or faulty hardware. Until you fix the underlying problem and restart Tor, Tor Browser will not start.

Hey Gordon,
I’m still learning myself, but I’ve played with Tor Browser on Linux a bit, so I’ll try to help as much as I can :slightly_smiling_face:

A couple of things stand out to me:

1) --system user + nologin
Creating TorUser with --system and /usr/sbin/nologin is probably part of the issue. Tor Browser isn’t really designed to be run by a system user with no login shell. Even if runuser launches it, Tor Browser still expects a usable home directory, environment variables, DBus session, etc.

If the goal is isolation, Tor Browser already does a lot of sandboxing internally, so running it as a normal user is usually the recommended approach.

If you really want a separate user, I’d try something like:

useradd -m -s /bin/bash toruser

(no --system, no nologin)

Then actually log in as that user (or use su - toruser) before starting Tor Browser.

2) .desktop file from terminal
Running:

./start-tor-browser.desktop

from a terminal can be misleading. The .desktop file is mainly for desktop environments, not CLI execution. Usually the supported way is:

./Browser/start-tor-browser --detach

When you used runuser, it said it launched, but since there was no graphical session for TorUser, nothing could appear.

3) Group-based approach
The group approach is closer, but Tor Browser can be very picky about permissions. If Tor (or Firefox inside it) sees writable directories or unexpected ownership, it may refuse to start — which could explain the “Tor exited during startup” error.

Also, Tor Browser expects to fully control its own profile and tor data directory. Mixing users/groups sometimes breaks that assumption.

4) Tor exited during startup
That message is generic, but common causes are:

  • wrong permissions on the tor-browser directory

  • no writable home directory

  • broken or inherited torrc

  • missing DBus / X session environment

You can try starting it from a terminal and watching output:

./Browser/start-tor-browser --verbose

TL;DR (student opinion :sweat_smile:)

  • Tor Browser is easiest and most reliable when run as a normal desktop user

  • Running it as a system user or via runuser is likely to fail

  • If isolation is the goal, a separate normal user account or a VM is usually the safer path

Hope that helps a bit — if I’m wrong on anything, happy to be corrected too :+1:

~shdwcodr