start-browser.desktop 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env ./Browser/execdesktop
  2. #
  3. # This file is a self-modifying .desktop file that can be run from the shell.
  4. # It preserves arguments and environment for the start-[% c("var/project-name") %] script.
  5. #
  6. # Run './start-[% c("var/project-name") %].desktop --help' to display the full set of options.
  7. #
  8. # When invoked from the shell, this file must always be in a [% c("var/Project_Name") %] root
  9. # directory. When run from the file manager or desktop GUI, it is relocatable.
  10. #
  11. # After first invocation, it will update itself with the absolute path to the
  12. # current [% c("var/Project_Name") %] location, to support relocation of this .desktop file for GUI
  13. # invocation. You can also add [% c("var/Project_Name") %] to your desktop's application menu
  14. # by running './start-[% c("var/project-name") %].desktop --register-app'
  15. #
  16. # If you use --register-app, and then relocate your [% c("var/Project_Name") %] directory, [% c("var/Project_Name") %]
  17. # will no longer launch from your desktop's app launcher/dock. However, if you
  18. # re-run --register-app from inside that new directory, the script
  19. # will correct the absolute paths and re-register itself.
  20. #
  21. # This file will also still function if the path changes when [% c("var/Project_Name") %] is used as a
  22. # portable app, so long as it is run directly from that new directory, either
  23. # via the shell or via the file manager.
  24. [Desktop Entry]
  25. Type=Application
  26. Name=[% c("var/Project_Name") %] Setup
  27. GenericName=Web Browser
  28. Comment=[% c("var/Project_Name") %] is +1 for privacy and −1 for mass surveillance
  29. Categories=Network;WebBrowser;Security;
  30. Exec=sh -c '"$(dirname "$*")"/Browser/start-[% c("var/project-name") %] --detach || ([ ! -x "$(dirname "$*")"/Browser/start-[% c("var/project-name") %] ] && "$(dirname "$*")"/start-[% c("var/project-name") %] --detach)' dummy %k
  31. X-[% c("var/ProjectName") %]-ExecShell=./Browser/start-[% c("var/project-name") %] --detach
  32. Icon=web-browser
  33. StartupWMClass=[% c("var/Project_Name") %]