made more user-friendly system for installing OnionShare in Tails

This commit is contained in:
Micah Lee 2014-06-11 19:53:00 +00:00
parent ff4381d6ed
commit 62c1045aa6
6 changed files with 52 additions and 34 deletions

1
tails/.gitignore vendored
View File

@ -1 +0,0 @@
*.deb

View File

@ -0,0 +1,11 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Icon[en_US]=/home/amnesia/Persistent/.onionshare_install/onionshare80.xpm
Name[en_US]=Install OnionShare
Exec=/usr/bin/gksudo /home/amnesia/Persistent/.onionshare_install/install.sh
Name=Install OnionShare
Icon=/home/amnesia/Persistent/.onionshare_install/onionshare80.xpm

View File

@ -1,24 +1,22 @@
# Running OnionShare in Tails
Until OnionShare gets included in Debian, it will be annoying to install it in Tails so that it persists reboots. For now, you'll need to run a build script the first time, and then run a setup script after each boot. The OnionShare GUI works in Tails 1.1 and later.
Until OnionShare gets included in Debian, it will be annoying to install it in Tails so that it persists reboots. For now, you'll need to run a build script the first time, and then install it separately each time you boot. These instructions make it pretty simple.
### Building for Tails
*The OnionShare GUI works in Tails 1.1 and later.*
### Building for Tails the first time
Start by booting to Tails. Mount your persistent volume and set an administrator password. Once you login and connect to the Tor network, open a terminal and type:
cd ~/Persistent
git clone https://github.com/micahflee/onionshare.git
cd onionshare
sudo tails/build.sh
sudo onionshare/tails/build.sh
You only need to do that once each time you want to build a new verison of OnionShare.
### Installing in Tails
In order to actually use it though, each time you boot Tails you'll need to enable your persistent volume, set an administrator password, and run this:
In order to actually use it though, each time you boot Tails you'll need to enable your persistent volume and set an administrator password. Then open your Persistent folder and double-click on `Install OnionShare`. Type your temporary administrator password, and then OnionShare will get installed.
cd ~/Persistent/onionshare
sudo tails/setup.sh
After running that, OnionShare will appear in the menu under Applications > Internet.
OnionShare will appear in the menu under Applications > Internet > OnionShare.

View File

@ -5,23 +5,32 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
PERSISTENT=/home/amnesia/Persistent
INSTALL_DIR=$PERSISTENT/.onionshare_install
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $ROOT
rm -rf $INSTALL_DIR &>/dev/null 2>&1
mkdir -p $INSTALL_DIR
# install dependencies
apt-get update
apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-stem python-webkit
./build_deb.sh
# copy .deb files
rm tails/*.deb
cp deb_dist/onionshare_*.deb tails
cp /var/cache/apt/archives/libjs-jquery_*.deb tails
cp /var/cache/apt/archives/python-flask_*.deb tails
cp /var/cache/apt/archives/python-jinja2_*.deb tails
cp /var/cache/apt/archives/python-markupsafe_*.deb tails
cp /var/cache/apt/archives/python-stem_*.deb tails
cp /var/cache/apt/archives/python-werkzeug_*.deb tails
# copy files
cp deb_dist/onionshare_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/libjs-jquery_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/python-flask_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/python-jinja2_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/python-markupsafe_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/python-stem_*.deb $INSTALL_DIR
cp /var/cache/apt/archives/python-werkzeug_*.deb $INSTALL_DIR
cp setup/onionshare80.xpm $INSTALL_DIR
cp tails/install.sh $INSTALL_DIR
cp tails/Install\ OnionShare.desktop $PERSISTENT
# fix permissions
chown -R amnesia:amnesia deb_dist tails/*.deb
chown -R amnesia:amnesia deb_dist $INSTALL_DIR
chown amnesia:amnesia $PERSISTENT/Install\ OnionShare.desktop
chmod 700 $PERSISTENT/Install\ OnionShare.desktop

13
tails/install.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You need to run this as root" 1>&2
exit 1
fi
PERSISTENT=/home/amnesia/Persistent
INSTALL_DIR=$PERSISTENT/.onionshare_install
dpkg -i $INSTALL_DIR/*.deb
/usr/bin/sudo -u amnesia /usr/bin/notify-send "OnionShare Installed" "Open with Applications > Internet > OnionShare"

View File

@ -1,12 +0,0 @@
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "You need to run this as root" 1>&2
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
dpkg -i tails/*.deb