Disappearing files, created from /etc/X11/Xclients

Alex Zbyslaw xfb52 at dial.pipex.com
Tue Mar 20 14:56:45 UTC 2007

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.



More information about the freebsd-questions mailing list