ssh agent finally working

This commit is contained in:
Frank Villaro-Dixon 2013-08-22 12:15:15 +02:00
parent 32cebf7f55
commit dd76577861
3 changed files with 21 additions and 7 deletions

24
bashrc
View file

@ -114,18 +114,13 @@ alias mfilms='cd /dev/shm && mkdir films && sshfs frank@vi-di.fr:/media/ films/'
alias upgrub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
alias ssh='ssh-add -l >/dev/null || ssh-add ~/.ssh/id_rsa.auth && unalias ssh; ssh'
alias upkey='gpg --keyserver subkeys.pgp.net --send-key 6F36914A'
alias shm='cd /dev/shm'
alias ip6='ip -6'
#MONITOR_PATH=~/Programmation/Utils/monitor.sh
#alias dual='$MONITOR_PATH dual'
#alias laptop='$MONITOR_PATH laptop'
#alias extern='$MONITOR_PATH extern'
alias disk-usage-analyser='baobab'
#alias 'make celan'='make clean'
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages
export CC=clang
@ -146,6 +141,16 @@ function cd()
fi
}
alias ssh='hh'
function hh {
ssh-add -l | grep id_rsa.auth > /dev/null
if [ $? -eq 1 ]; then
echo -e "$RED Please enter ssh passphrase ;) $DFT"
ssh-add ~/.ssh/id_rsa.auth
fi;
"/usr/bin/ssh" "$*"
}
function logs {
tail -f $1 | ccze -A
@ -187,3 +192,10 @@ extract() {
#Launch startx when login
[[ -z $DISPLAY && $XDG_VTNR -le 4 && -z $SSH_CLIENT ]] && exec startx
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi

View file

@ -2,3 +2,4 @@ image/*; eog %s
text/html; lynx -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput
audio/*; vlc %s
application/pdf; evince %s
application/msword; libreoffice %s

View file

@ -37,7 +37,8 @@ done &
xautolock -time 60 -locker "systemctl suspend" &
redshift -l 46:6&
ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm
#ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm
/home/frank/Programmation/dotfiles/dwm/dwm
# exec gnome-session