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-linuxSo the file which i should set keyboard shortcut is this directory:
/home/sina/tor-browser-linux/tor-browser_en-US/Tor\ BrowserI 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 directoryI tried to solve it by reading this link(like i did it for telegram before):
I tried to do this for tor(instead of telegram):
sina@msi:~$ nano ~/.profileI 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/autostartI 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.desktopTor 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 directoryI 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?
1 Answer
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 --detachp.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.xmlYou 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 --reconfigureEdit
Regarding Xfce shortcuts see these links:
Cannot change global keyboard shortcuts in Linux Mint XFCE - Unix & Linux Stack Exchange
Locate xfce4-keyboard-shortcuts.xml and edit as needed.
Making Keyboard Shortcuts for Frequently Used Applications - Manjaro Linux
Panel, Applications -> Settings -> Keyboard. Open the Application Shortcuts T and add the shortcut and app as needed.