[linux] add Desktop launch scripts

Former-commit-id: 57539ee9f0885f8f3ee1b39935813ec331565016
This commit is contained in:
R4SAS 2022-04-21 00:19:35 +00:00
parent 677f1671c7
commit a6f28e6fe0
4 changed files with 365 additions and 33 deletions

View file

@ -0,0 +1,34 @@
#!/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-i2pd-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-i2pd-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=I2Pd Browser Setup
GenericName=I2Pd Browser
Comment=I2Pd Browser for surfing I2P sites
Categories=Network;WebBrowser;Security;
Exec=sh -c '"$(dirname "$*")"/browser/start-i2pd-browser --detach || ([ ! -x "$(dirname "$*")"/browser/start-i2pd-browser ] && "$(dirname "$*")"/start-i2pd-browser --detach)' dummy %k
X-I2PdBrowser-ExecShell=./browser/start-i2pd-browser --detach
Icon=web-browser
StartupWMClass=I2Pd Browser