3

I wanted to set keyboard shortcut for tor browser.
So i need a command which opens tor browser.
I installed .tar.gz file of tor browser,which installed in my home directory:

/home/sina/tor-browser-linux

So the file which i should set keyboard shortcut is this directory:

/home/sina/tor-browser-linux/tor-browser_en-US/Tor\ Browser

I wanted to open tor browser via terminal in these way:

sina@msi:~$ ./home/sina/tor-browser-linux/tor-browser_en-US/Tor\ Browser
bash: ./home/sina/tor-browser-linux...: No such file or directory

I tried to solve it by reading this link(like i did it for telegram before):

How to run Telegram from Terminal

I tried to do this for tor(instead of telegram):

sina@msi:~$ nano ~/.profile

I added this to the last line of .profile:

export PATH="/home/sina/tor-browser-linux/tor-browser_en-US/start-tor-browser.desktop"

It didn't work!

sina@msi:~$ sudo ln -s /home/sina/tor-browser-linux/tor-browser_en-US/start-tor-browser.desktop /usr/local/bin
sina@msi:~$ sudo ln -s /home/sina/tor-browser-linux/tor-browser_en-US/start-tor-browser.desktop /usr/share/applications
sina@msi:~$ cp /usr/share/applications/start-tor-browser.desktop ~/.config/autostart

I tried this too:

sina@msi:~$ alias tor='/home/sina/tor-browser-linux/tor-browser_en-US/start-tor-browser.desktop'
sina@msi:~$ tor
/usr/bin/env: ‘./Browser/execdesktop’: No such file or directory


When i cd to the tor browser's directory and run this command:

sina@msi:~/tor-browser-linux/tor-browser_en-US$ ./start-tor-browser.desktop

Tor browser opens and works...but when i run this:

sina@msi:~$ ./tor-browser-linux/tor-browser_en-US/start-tor-browser.desktop
/usr/bin/env: ‘./Browser/execdesktop’: No such file or directory

I have start-tor-browser.desktop in my home directory,and i can open it with thunar,but not with terminal:

sina@msi:~$ ./start-tor-browser.desktop
/usr/bin/env: ‘./Browser/execdesktop’: No such file or directory
  • Is there any command to open tor browser via terminal?
  • im a bit confused .. can you tell us what the executable file is called and where it is located exactly .. you have used 3 different names for the executable and I don't have a tor browser installed so I cant look at the directory structure myself – John Orion Dec 14 '17 at 20:11
  • @JohnOrion tor browser is installed in this directory:/home/sina/tor-browser-linux/tor-browser_en-US/Tor Browser ...and the file name is Tor Browser – Sss Dec 14 '17 at 20:20
  • 1
    Please try to start it with this command: /home/sina/tor-browser-linux/tor-browser_en-US/Browser/start-tor-browser. Unless you changed the directory structure or moved files around this should work, assuming you gave the correct path in your question… Moving the .desktop file will certainly not work, as it uses a relative path – and please don't do export PATH=/some/path in your .profile unless you know very well what you do. – dessert Dec 14 '17 at 23:39
  • 1
    Btw, info taken from my answer here. – dessert Dec 14 '17 at 23:45
3

The path to run tor-browser is (taken from [start-tor-browser].desktop file)

[unzipped tar archive]/tor-browser_en-US/Browser/start-tor-browser --detach

p.s.: you didn't specify which desktop manager you have or which distro.

If you have LXDM/lightdm/lubuntu** then edit this file:

[homefolder]/.config/openbox/lxde-rc.xml

You will see lots of sections <keybind>...</keybind>; add underneath one of them your keybind like so:

<keybind key="C-A-T">
    <action name="Execute">
        <command>[path to where you unzipped the tar archive]/tor-browser_en-US/Browser/start-tor-browser --detach</command>
    </action>
</keybind> 

Save and exit and run the following inside terminal:

openbox --reconfigure

Edit

Regarding Xfce shortcuts see these links:

  • i have ubuntu 17.10 xfce – Sss Dec 14 '17 at 21:04
  • and i don't have openbox directory in .config – Sss Dec 14 '17 at 21:09
  • i know how to set keyboard shortcut... the problem is what command i should use for it! u can see it in title of my question – Sss Dec 14 '17 at 21:44
  • see the second row of my post.. /[path to where you unzipped the tar archive]/tor-browser_en-US/Browser/start-tor-browser --detach; the executable is "start-tor-browser" – user688056 Dec 14 '17 at 23:43

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.