Re: [SOLVED] BScreen::BScreen: error, unable to use fluxbox.

Andrej <[email protected]> Tue, 21 May 2013 08:59:47 +1200
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <CACMx3pNPsQDzcFQ1D30BqiZUDSuCQnd31AzM_krMQvNYtKS4nA@mail.gmail.com>
I'd say this is potentially dangerous to run. I have pipes sitting in
/tmp from long-running
processes with a last modified timestamp of more than a week old.
Culling those via
cron may have undesirable effects :)

Of  course, if your machine gets shut-down daily the risk is small.

I'd suggest a  script that runs early in init (e.g. after mounting of
tmp but before daemons
are making use of it) and deletes files.  Or using a script that
checks whether files it's
about to delete aren't listed in 'lsof" output.


My 2 cents.


Cheers,
Andrej



On 21 May 2013 02:03, Sharon Kimble <[email protected]> wrote:
> On Mon, 20 May 2013 10:19:22 +1000
> andrew <[email protected]> wrote:
>
>> On Mon, May 20, 2013 at 01:03:41AM +0100, Sharon Kimble wrote:
>>
>> > Thanks Frank, you are a guru you know :). I had a look for .Xo-lock
>> > in /tmp, found it and thought it looked odd so had a look at its
>> > permissions. All owned by root! chowned it, logged off lxde and
>> > logged straight into fluxbox! Brilliant, thanks!
>>
>> Might be worthwhile setting a script to clear /tmp at shutdown?
>>
> Andrew.
> I already use this script to clear /tmp twice a week, called from cron,
> I don’t know if it will help or get someone started on it?
> ###########################
> :
> ## sudo ./cleartmp.sh -d 7 /tmp
> ##########################################################################
> # Title      :  cleartmp - remove temporary files/directories
> # Author     :  Heiner Steven <[email protected]>
> # Date       :  1992
> # Category   :  System Administration
> # Requires   :  xargs
> # SCCS-Id.   :  @(#) cleartmp   1.2 03/12/19
> ##########################################################################
> # Description
> #       Delete files older than a specified number of days.
> ##########################################################################
>
> PN=`basename "$0"`                      # Program name
> VER='1.2'
>
> Days=7                                  # remove files older than
> 7 days
>
> usage () {
>     echo "$PN - remove temporary files/directories, $VER (stv '92)
> usage: $PN [-d days] directory [directory ...]
>
> All files and subdirectories older than the specified number of days
> (default $Days) are deleted." >&2
>     exit 1
> }
>
> msg () {
>     for i
>     do echo "$PN: $i" >&2
>     done
> }
>
> fatal () { msg "$@"; exit 1; }
>
> set -- `getopt hd: "$@"` || usage
> while [ $# -gt 0 ]
> do
>     case "$1" in
>         -d)     case "$2" in
>                     [0-9]*)     Days="$2"; shift;;
>                     *)          fatal "illegal number of days:
> $2";; esac;;
>         --)     shift; break;;
>         -h)     usage;;
>         -*)     usage;;
>         *)      break;;                 # First file name
>     esac
>     shift
> done
>
> [ $# -lt 1 ] && usage
>
> for i
> do
>     if [ ! -d "$i" ]
>     then msg "no directory: $i"
>     elif [ ! -r "$i" -o ! -w "$i" ]
>     then msg "access denied (need read- and write access): $i"
>     else
>         # Find files, links, FIFOs or sockets
>         find "$i" ! -type d -mtime +$Days -print | xargs rm -f
>> /dev/null 2>&1
>
>         # remove all empty subdirectories
>         [ -d "$i" ] || continue
>         (cd $i || continue
>         for d in *
>         do
>             [ -d "$d" ] || continue
>             find . -depth -type d -mtime +$Days -print |
>                  xargs rmdir > /dev/null 2>&1
>         done
>         )
>     fi
> done
>
> echo "Script run, and /tmp cleared of cruft" 1>&2; exit 1;
>
> exit 0
> ####################################################
>
> Hope this helps?
>
> Thanks
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk/index.html
> efever = http://www.efever.blogspot.com/
> efever = http://sharon04.livejournal.com/
> Debian 7.0, Fluxbox 1.3.5, LibreOffice 4.0.3.3,
> Claws-Mail 3.9.0-182-g852877
> Registered Linux user 334501
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Fluxbox-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fluxbox-users



-- 
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.georgedillon.com/web/html_email_is_evil.shtml

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d