# ~/.bash_profile: executed by bash(1) for login shells. # 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/login.defs #umask 022 export TERM=linux # set variable identifying the chroot you work in if [ -f /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # might dbus/PA/gpg-agent start up be more robust, # readable, and maintainable as perl scripts? # DBus session startup script if [[ -e "/usr/bin/dbus-daemon" ]]; then # test for an existing bus daemon, just to be safe if [[ -z "$DBUS_SESSION_BUS_PID" ]] ; then ## if not found, launch a new one eval $(dbus-launch --sh-syntax) export DBUS_SESSION_BUS_ADDRESS export DBUS_SESSION_BUS_PID echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" fi else echo "dbus not installed" fi # test if PA is available and if it is already running #kill -0 $(pgrep pulseaudio) 2>/dev/null; if [[ -x "/usr/bin/pulseaudio" ]]; then if [[ $(kill -0 $(pgrep pulseaudio)) ]]; then echo "PulseAudio is already running" else pulseaudio -D sleep 1 export PULSE_PID=$(pgrep pulseaudio) echo "Pulse pid is $PULSE_PID" fi else echo "PulseAudio is not avalible" fi # setup gpg-agent if [[ -x "/usr/bin/gpg-agent" ]]; then if test -f $HOME/.gpg-agent-info && kill -0 $(sed -n '1p' $HOME/.gpg-agent-info | cut -d: -f 2) 2>/dev/null; then GPG_AGENT_INFO=$(cat $HOME/.gpg-agent-info) export GPG_AGENT_INFO #export SSH_AUTH_SOCK #export SSH_AGENT_PID #echo "gpg-agent is alreaady running" else eval 'gpg-agent --enable-ssh-support --daemon --write-env-file' #echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info #export SSH_AUTH_SOCK #export SSH_AGENT_PID fi else echo "gpg-agent is not installed" fi # fortune on startup if [ -x /usr/games/fortune ]; then #echo; /usr/games/fortune -a; echo echo; /usr/games/fortune climate_change; echo fi