[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Bug ? "Save As" dialog box should not start with /tmp by default



Reuben D. Budiardja wrote:
> Hello,
> Here's a scenario that just happened to my wife that should not. This is on 
> Fedora 8.
> 
> 1. Open a document from email attachment (with Kmail), that opens in 
> OpenOffice
> 2. "Save As" the document so that it can be edited.
> 3. Openoffice "Save As" dialog open with the default 
> directory "/tmp/kde-username" because that's where Kmail put its attachment
> 4. In a hurry, just name the file something else
> 5. Edit the file, Save, shutdown the computer
> 6. Next time computer boot up, document gone
> 
> I know all the arguments blaming the user. As a technical person, regretably 
> that was my first reaction also. On second thought, for regular user, who can 
> tell what  /tmp is ? Regular user does not know that /tmp are cleaned every 
> reboot. Furthermore, in a hurry, if one just want to save quickly so that it 
> can be used the next time computer boots up, it's understandable that user 
> makes the mistake to save the document to whatever default directory is 
> presented by the dialog box (thinking one can always re-open it from "Recent 
> Document" menu).
> 
> This is not limited to Kmail or Openoffice, I just tried and it's the same 
> with KPDF, Kghostview, etc. Firefox opening files in application also has 
> similar problem.
> 
> What should be the general solutions for this ? Should this be the 
> responsibility of the desktop environment project (ie. KDE, GNOME) from 
> their "Save As" dialog rather than each individual apps ? 
> I'm thinking of filling a bug report but then I'm not sure whom I should file 
> this with.
> 
> I can think of some hacky band-aid solution to prevent document loss next time 
> like a rotating backup of /tmp for the next two reboot or edit the boot up 
> script to not delete /tmp, etc, but none of those is a good enough general 
> solution.
> 
> Maybe it should be sometime like:
> 1. Default to $HOME directory for saving if file is opened from /tmp
> 2. Have a shortcut in the dialog to go to the directory where the document is 
> opened from (ie. "/tmp/kde-username") for the case where one would actually 
> just want to save a temporary file there. Probably have a "warning" and 
> a "don't warn me again" or "do this automatically next time" preference.
> 
> Thoughts ?
> 
> Thanks for any discussion.
> RDB
One way to handle it it to have a /tmp file in the user's home
directory, and have a TMP or TEMP environmental variable that
programs look at for their temporary storage. BY using a shell
variable, you could easily customize it for different system
requirements. You would have to have some kind of fallback behavior
for when TMP is not set... There are some programs that already
honor TMP, so that would probably be the way to go.

You could have KDE and GNOME set a default for all programs that use
their desktop, but that does not help for non-desktop-aware programs...

In any case, change the save as behavior would cause more trouble
then it would solve. The default of saving in the same directory as
the original file was opened from is probably what most people are
going to want, and is what most people expect.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]