Re: Starting gpg-agent on X login (gdm)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Monday 27 April 2009 01:47:32 Magnus Therning wrote:
> After looking through my new shine Arch system I found that ssh-agent is
> run from /etc/gdm/Xsession, so I suppose that's where I need to make
> changes in order to get gpg-agent to run, right?

Hmm.. I use kde and there is nothing for ssh-agent in /etc.  I think it should 
go in shell startup so that even non-gui session have ssh-agent too.

I always ran it thr. ~/.xsession, from days of slackware so didn't notice it 
till now.

Here is the script I use. I also need to find out how to use gpg-agent as ssh-
agent. :)

-----------------------------------
if [ -x "$(which gpg-agent)" ]; then
  if test -f $HOME/.gpg-agent-info &&    kill -0 $(cut -d: -f 2 $HOME/.gpg-
agent-info) 2>/dev/null; then
    GPG_AGENT_INFO=$(cat $HOME/.gpg-agent-info)
    export GPG_AGENT_INFO
  else
    eval $(gpg-agent --daemon)
    echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
  fi
fi

# Note that the new option --write-env-file may be used instead.

# You should always add the following lines to your .bashrc or whatever
# initialization file is used for all shell invocations:

GPG_TTY=$(tty)
export GPG_TTY


#Start ssh-agent. Don't want to use agent from last session if it persits at 
all.
killall ssh-agent;
eval `ssh-agent -s`;
export SSH_AGENT_PID;
export SSH_AUTH_SOCK;
-----------------------------------		

> Should I look into using seahorse instead of {ssh,gpg}-agent?

and I got to find a KDE equivalent too. :)

-- 
 Shridhar


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux