You are not logged in.

#1 2015-04-30 12:25:12

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

[Solved] Openbox menu.xml problem when starting Tor Browser

Hi all,

I used to open Tor Browser from Openbox's menu without a problem, but some days ago it started failling. My configuration in menu.xml looks like:

<item label="Tor">
    <action name="Execute">
      <command>/home/user/Tor/start-tor-browser</command>
    </action>
  </item>

Trying to find a solution I tried the following too:

<item label="Tor">
    <action name="Execute">
      <command>/home/user/Tor/./start-tor-browser</command>
    </action>
  </item>

Note that the only difference is the period between the folder's name and the file to start the browser. I also tried to open it through my terminal emulator as thus:

terminator --command="/home/user/Tor/./start-tor-browser"

But this fails too. However, I can open the browser normally if I do it manually, i.e., cd'ing to the directory and:

./start-tor-browser

I read around about similar problems, but I couldn't found any solution. Any help/lead will be very appreciated!!!

Last edited by Humble_Panda (2015-04-30 13:45:29)

Offline

#2 2015-04-30 12:45:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

It sounds like an environment issue - the one way to test would be the following:

terminator --command="/bin/bash -l -c /home/user/Tor/start-tor-browser"

If that works, it will confirm that it is an environment issue.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-04-30 13:19:29

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

Thanks for your quick reply. By trying out your suggestion I get an error message like this:

/usr/lib/python2.7/site-packages/terminatorlib/window.py:63: Warning: The property GtkWindow:allow-shrink is deprecated and shouldn't be used anymore. It will be removed in a future version.
  self.set_property('allow-shrink', True)

** (terminator:21630): WARNING **: Binding '<Shift><Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.

And to be honest, I don't know what that exactly means. The "binding" part gives me a lead, but as far as I know there is nothing mapped to <Shift><Control><Alt>a.

Offline

#4 2015-04-30 13:25:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

But did Tor work?

Also, is the issue in this thread only with Tor?  If so, could you change your title to be more representative?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2015-04-30 13:29:02

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

Nope, Tor wasn't launched at all, just the error message. Right now I the only problem is with Tor, but I don't have in my menu, right now, any other application that needs to be called in a similar fashion (the rest of items in my menu.xml are called directly with commands, without having to start any specific file).

ps. I've changed the title of this thread. Sorry about that.

Offline

#6 2015-04-30 13:30:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

The file is a command, it's executable, right?  What is in that file?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2015-04-30 13:36:11

Humble_Panda
Member
Registered: 2013-04-30
Posts: 32

Re: [Solved] Openbox menu.xml problem when starting Tor Browser

Trilby wrote:

The file is a command, it's executable, right?  What is in that file?

Yes, it is. This is the result of "cat'ing" the file: (I just substituted my user name by the generic "user")

#!/usr/bin/env ./Browser/execdesktop
#
# This file is a self-modifying .desktop file that can be run from the shell.
# It preserves arguments and environment for the start-tor-browser script.
#
# Run './start-tor-browser.desktop --help' to display the full set of options.
#
# When invoked from the shell, this file must always be in a Tor Browser root
# directory. When run from the file manager or desktop GUI, it is relocatable.
#
# After first invocation, it will update itself with the absolute path to the
# current TBB location, to support relocation of this .desktop file for GUI
# invocation. You can also add Tor Browser to your desktop's application menu
# by running './start-tor-browser.desktop --register-app'
#
# If you use --register-app, and then relocate your TBB directory, Tor Browser
# will no longer launch from your desktop's app launcher/dock. However, if you
# re-run --register-app from inside that new directory, the script
# will correct the absolute paths and re-register itself.
#
# This file will also still function if the path changes when TBB is used as a
# portable app, so long as it is run directly from that new directory, either
# via the shell or via the file manager.

[Desktop Entry]
Type=Application
Name=Tor Browser
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=sh -c '"/home/user/Tor/Browser/start-tor-browser" --detach || ([ !  -x "/home/user/Tor/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=/home/user/Tor/Browser/browser/icons/mozicon128.png

EDIT: Ok, so thanks to Trilby I could find a solution. The executable file re-directs the whole thing to another one in a different folder within the Tor directory:

Exec=sh -c '"/home/user/Tor/Browser/start-tor-browser" --detach || ([ !  -x "/home/user/Tor/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach

If you use that one in menu.xml Tor runs normally. Thanks for the lead, Trilby!

The resulting code in menu.xml should look like:

<item label="Tor">
    <action name="Execute">
      <command>/wherever_you_have_Tor_files/Browser/./start-tor-browser</command>
    </action>
  </item>

Last edited by Humble_Panda (2015-04-30 13:46:48)

Offline

Board footer

Powered by FluxBB