-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVP of how to add custom scripts to the amnesia terminal on TailsOS #4
Comments
We're already doing this. Maybe we could just document better (than people look at the dotfiles, in special the |
Oh f**k me. Did not work as expected. I think instead of do the rigth way (read the documentation and undestand how it is suposed to work) I will just reinvent the wheel! The main error I found was, when restarting the Tails, neither # ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
umask 077
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
#### Custom additions from original ~/.profile, START __________________________
#### /home/amnesia/Persistent/software/bin .....................................
# @see docs/portable-software.sh
# If this path exists, executable binaries here will have priority over
# /home/amnesia/bin.
if [ -d "/home/amnesia/Persistent/software/bin" ] ; then
PATH="/home/amnesia/Persistent/software/bin:$PATH"
fi
#### /home/amnesia/Persistent/bin ..............................................
# @see docs/portable-software.sh
# If this path exists, executable binaries here will have priority over
# /home/amnesia/Persistent/software/bin and /home/amnesia/bin.
if [ -d "/home/amnesia/Persistent/bin" ] ; then
PATH="/home/amnesia/Persistent/bin:$PATH"
fi
#### Startup scripts ...........................................................
# TODO: this feature was not fully tested yet. (fititnt, 2020-10-24 18:42 UTC)
#
# Note: this code exists both on the my-git-repo/bin/startup-scripts.sh and
# my-git-repo/dotfiles/example/rocha/.bash_profile
# If ~/bin/startup-scripts/ (or ~/bin/startup-scripts-examples/) exists, we
# execute every .sh file there
if [ -d "$HOME/bin/startup-scripts" ];
then
run-parts --regex '.*sh$' "$HOME/bin/startup-scripts/"
elif [ -d "$HOME/bin/startup-scripts-examples" ];
then
run-parts --regex '.*sh$' "$HOME/bin/startup-scripts-examples/"
fi
#### Custom additions from original ~/.profile, END ____________________________ On the rm -r ~/bin
ln -s /home/amnesia/Persistent/git/fititnt/TailsOS-for-non-whistleblowers/bin ~/bin So maybe lets call this a feature. |
Ok, I just created a release here https://github.com/fititnt/TailsOS-for-non-whistleblowers/releases/tag/v1.0. So I will do some refactoring. I may not do new releases on future, but this release is just to I care less of more severe refactoring. |
…ha for release v1.0; refactoring started
Document (or maybe do some shell scripting) of an minimum viable product (MVP) of how do deploy scripts that are acessible by the user on TailsOS.
As reference, the /home/amnesia/.profile alredy seems to load to the path the /home/amnesia/bin if already was created when starting a new shell
amnesia@amnesia:~$ cat .profile
Edit: missed last line of code on sample code. Added.
The text was updated successfully, but these errors were encountered: