public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "farfargoth@gmail.com" <farfargoth@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Is this cruft in my /tmp?
Date: Sat, 29 Jul 2006 23:53:09 +0200	[thread overview]
Message-ID: <5e5428ed0607291453q5afb1f0bxafd6c6a24008d700@mail.gmail.com> (raw)
In-Reply-To: <200607292236.41140.bo.andresen@zlin.dk>



On 7/29/06, Bo Ørsted Andresen <bo.andresen@zlin.dk> wrote:
> On Sunday 23 July 2006 13:18, Mick wrote:
> > I checked the script I have in my /etc/X11/Sessions/fluxbox:
> > ==============================
> > eval "$(gpg-agent --daemon)"
> > /usr/bin/startfluxbox
> > kill `echo ${GPG_AGENT_INFO} | cut -d ':' -f 2`
> > ==============================
> >
> > Running these separately after I kill gpg-agent *and* empty the /tmp/gpg-*
> > entities gives me the following semi-illuminating response:
> >
> > $ eval "$(gpg-agent --daemon)"
> > can't connect to `/home/michael/.gnupg/log-socket': Connection refused
> >
> > Why does this happen? A new ENV variable has been created alright in the
> > /tmp dir:
> >
> > $ echo ${GPG_AGENT_INFO}
> > /tmp/gpg-0UQfJ1/S.gpg-agent:11772:1
> >
> > I think that the kill `echo ${GPG_AGENT_INFO} | cut -d ':' -f 2` line in my
> > fluxbox start up script kills the gpg-agent process but does not seem to
> > flush the ENV variable, hence all this cruft accumulates in /tmp.
> >
> > Does anyone else have this problem?
> 
> Apparently gpg-agent does clean up properly after it when it is killed. I have
> just changed my gpg-agent.sh shutdown script as shown below. The rm and rmdir
> lines should make it clean up nicely after it.
> 
> $ cat ~/.kde/shutdown/gpg-agent.sh
> #!/bin/sh
> # the second field of the GPG_AGENT_INFO variable is the
> # process ID of the gpg-agent active in the current session
> # so we'll just kill that, rather than all of them :)
> if [[ -n ${GPG_AGENT_INFO} ]]; then
>         kill $(echo ${GPG_AGENT_INFO} | cut -d ':' -f 2)
>         rm $(echo ${GPG_AGENT_INFO} | cut -d ':' -f 1)
>         rmdir $(dirname `echo ${GPG_AGENT_INFO} | cut -d ':' -f 1`)
>         unset GPG_AGENT_INFO
> fi
> 
> --
> Bo Andresen
> 
> 

First off, doesn't one of the boot scripts clean /tmp? Or is that just my imagination?
Second, I have found that it is better to mount /tmp as a tmpfs. That way I get a (slight) increase in performance when I'm ripping cd's and stuff, I don't risk running out of space on / (not all that big of a problem, though), whenever I turn the computer of /tmp get's cleared and, last but not least, I tell myself that I get more battery-time on my laptop since it doesmn't have to write to disk as much. Yay!
To do this, all you need is to put
none                    /tmp            tmpfs           defaults        0 0
in /etc/fstab. Add size=nbytes to select maximum size of the filesystem. Defaults to half of ram.


-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-07-29 21:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-22 22:50 [gentoo-user] Is this cruft in my /tmp? Mick
2006-07-23  5:25 ` Philip Webb
2006-07-23 13:29   ` Philip Webb
2006-07-23 19:22     ` Mick
     [not found]   ` <200607231218.46831.michaelkintzios@gmail.com>
2006-07-29 20:36     ` Bo Ørsted Andresen
2006-07-29 21:53       ` farfargoth [this message]
2006-07-30  9:13         ` Neil Bothwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e5428ed0607291453q5afb1f0bxafd6c6a24008d700@mail.gmail.com \
    --to=farfargoth@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox