[Tfug] Squeeze Temporary FIles

Charles R. Kiss charles at kissbrothers.com
Sat May 7 10:38:44 MST 2011


I'm trying to get my USB scanner working through windows on a virtualbox linux 
host; I installed the extpack and the vbox additions; so I'm not sure this is 
a vbox EULA question. 

I have a network scanner working on linux, just trying to get this other 
scanner going since it can do slides, but it's a Canon Lide80.

There is a popular piece of code that apparently works for other machines for 
testing USB of guests, but it doesn't work for mine, and I would like to know 
why, please see below.  Can someone please make a comment.

On a side note, I added vboxusers group as well as other depricated groups to 
user.  The Debian Squeeze seems to have changed some /udev stuff, fstab wise, 
etc. which I would like to mention as possible methods of working around this 
USB issue but I've also noticed some other temporary files problems, resulting 
in my having to manually clear it (maybe not a good idea but bears mentioning, 
I run through a script:  rm -Rf /tmp/kde-charles/* ), maybe these issues are 
related since /tmp clearing is something I've never had to do before.

All these issues exist across multiple reboots.

The /tmp is it's own partition, and I did look into the IFS splitting of for 
loops in bash with spaces for characters, but not sure it applies.

What else is there? 

Here are the test code pieces:

This code works, and writes to the /tmp dir:

TMPFILE=`mktemp /tmp/example.XXXXXX`
     if [ -z "$TMPFILE" ]; then exit 1; fi
     echo "program output" >> $TMPFILE

The popular code aborts here, which is the first paragraph of the script:

# Set up environment
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/home/charles/bin"
set -u    #this was originally:  set -o nounset
unset IFS
tmp_afn="$(mktemp "/tmp/$0.XXXXXX")"
[[ $? -ne 0 ]] && \echo "ERROR: unable to create temporary file (this is not a 
VirtualBox USB problem)" >&2 && \exit 1
trap "rm -f $tmp_afn" EXIT

The whole of the "popular code" can be found here:

http://forums.virtualbox.org/viewtopic.php?f=2&t=29356

Apparently, I can't get past the first paragraph!


Thanks again,
Charles



More information about the tfug mailing list