[tbb-bugs] #13375 [Tor Browser]: Let's ship a .desktop file in Tor Browser for Linux

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Feb 12 21:31:58 UTC 2015


#13375: Let's ship a .desktop file in Tor Browser for Linux
-------------------------+-------------------------------------------------
     Reporter:  lunar    |      Owner:  tbb-team
         Type:           |     Status:  needs_review
  enhancement            |  Milestone:
     Priority:  normal   |    Version:
    Component:  Tor      |   Keywords:  tbb-usability, tbb-helpdesk-
  Browser                |  frequent, tbb-usability-stoppoint-app,
   Resolution:           |  TorBrowserTeam201502R, MikePerry201502R
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-------------------------------------------------

Comment (by mcs):

 Kathy and I experimented a little with this on an Ubuntu 14.04 system
 (Unity/GNOME). We could not find a way to use a relative path for the
 icon; apparently that is not supported. Some people have used the Exec
 command to insert the full path after Icon= in the .desktop file the first
 time it is opened (essentially, by using a self modifying script).  That
 is ugly but would make it so the correct icon is shown after you open the
 browser once.

 Another issue is that the Tor Browser updater cannot touch anything in the
 top-level directory.  We worked around that problem by placing our
 org.torproject.browser.desktop file in the Browser/ directory and creating
 a symlink above that pointed to it (much like we do with start-tor-
 browser).  But then the bash command within the .desktop file needs to
 handle the case where either the symlink or real .desktop object is opened
 by the user.  Here is what we came up with, although it does not handle
 spaces within the installation path:
 {{{
 [Desktop Entry]
 Type=Application
 Name=Tor Browser
 Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
 Categories=Utility;Application;
 Exec=bash -c "TBDIR=`dirname %k`; if [ `basename $TBDIR` = 'Browser' ];
 then TBDIR=`dirname $TBDIR`; fi; $TBDIR/Browser/start-tor-browser"
 }}}

 If we do ship a .desktop file, we may want to remove the start-tor-browser
 symlink since it might cause user confusion (which thing should I double-
 click?)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13375#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list