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

Sharon Kimble <[email protected]> Mon, 20 May 2013 15:03:53 +0100
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <[email protected]>
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