Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2007 14:56:43 +0000
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Laszlo Nagy <gandalf@designaproduct.biz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Disappearing files, created from /etc/X11/Xclients
Message-ID:  <45FFF62B.9030206@dial.pipex.com>
In-Reply-To: <45FFE73B.1080406@designaproduct.biz>
References:  <45FFE73B.1080406@designaproduct.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
Laszlo Nagy wrote:

>
> The strange thing is that, if I login with user 'gandalf' who is in 
> 'wheel', the files are created and saved into 
> /tmp/disklessips/gandalf.txt and /tmp/disklessips/gandalf.history.txt. 
> But if I login with any other user (they are in group 'users'), no 
> files are created, but the window manager IS started. The startwm.py 
> program creates these files BEFORE starting gnome, and it does throw 
> an error. So they must have been created, but I do not see them 
> anywhere. They simply disappear. Never existed? Any thoughts?
> [...]
> fout = file('%s/%s.txt'%(ddir,os.getlogin()),'wb+')

If os.getlogin() failed non-fatally and returned, say, and empty string, 
then you'd be creating a file called ".txt", if I read correctly.  What 
does "ls -lsa /tmp/disklessips" show?  Do you in fact have .txt and 
.history.txt files (which a simple ls won't show you).

Failing that, you'll just need to include some debugging.  Open a file 
in /tmp to write stuff to, and print *all* the various variables you use 
to that file.  (Or just print them to stdout if that will show up on the 
console).  Then try as some other user and check that everything really 
does have the value you think it does.

Since python doesn't crash, my belief is that it really has written the 
stuff somewhere.

hth,

--Alex







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45FFF62B.9030206>