From: David B. <dav...@gm...> - 2010-06-11 18:56:36
|
Hi Wenyuan, On Fri, Jun 11, 2010 at 7:52 AM, Tim Holy <ho...@wu...> wrote: > Hi Wenyuan, > > On Thursday, June 10, 2010 11:41:45 pm Wenyuan Guo wrote: >> Do you have write access to your tuxmath install directory (in my >> case, /usr/local/share/tuxmath) and whether there is enough disk >> space? The caching PNG files will be written to the same directories >> where the original SVG sprites are located. > > On Linux systems, the typical default (e.g., for distributor-supplied > packages, or a default make install) is to have the SVGs in some system > directory, to which users do not have write access. I agree - the PNG cache can't be located under the install directory, because that will not be writeable by ordinary users. This situation has a lot in common with the "custom word list" tuxtype project from last summer - ideally, we might want to have an area that is writeable by tuxmath and readable by all users. Our high score table has similar considerations. I found out that this is a thorny problem for distro packagers - if they are into security, they won't allow any files that are user-writeable outside of /home. The traditional way to handle this is to make the file setgid for games, and put tuxtype into the games group. Some distros (e.g. Fedora) didn't even like that idea, and said we ought to write a dedicated daemon to handle such file operations. At that point, I gave up for the time being. For this case, I think we should just put the cache under ~/.tuxmath. If tuxmath subsequently gets run by another user, nothing bad will happen except for the slower startup the first time while the rescaling takes place. Cheers, David Bruce |