You are not logged in.
I run Xfce with no desktop icons, so I have no use for the ~/Desktop folder, which I've removed. I've noticed that occasionally the Desktop folder will reappear in my home folder. I saw a thread where a user claimed they saw this behavior after clicking "the upload button" in Firefox. It does seem that clicking "Browse" on an <input type='file'> element will default to your Desktop folder if there's no "last viewed" folder available, and recreate the Desktop folder otherwise.
Source for Firefox/xulrunner:
mozilla-2.0/content/html/content/src/nsHTMLInputElement.cpp:
// Attempt to retrieve the last used directory from the content pref service
nsCOMPtr<nsILocalFile> localFile;
nsHTMLInputElement::gUploadLastDir->FetchLastUsedDirectory(doc->GetDocumentURI(),
getter_AddRefs(localFile));
if (!localFile) {
// Default to "desktop" directory for each platform
nsCOMPtr<nsIFile> homeDir;
NS_GetSpecialDirectory(NS_OS_DESKTOP_DIR, getter_AddRefs(homeDir));
localFile = do_QueryInterface(homeDir);
}
filePicker->SetDisplayDirectory(localFile);
Last edited by gavinhungry (2011-04-30 06:20:46)
Offline
The creation of a ~/Desktop directory by Firefox is a feature; Mozilla is following freedesktop.org implied guidelines. You can stop the creation of the ~/Desktop directory by editing or creating a file, ~/.config/user-dirs.dirs
In that file you specify which directories are defaults for the common directories (common as specified by freedesktop.org). After the user-dirs.dirs file is written, Firefox won't create a Desktop directory again. Here's my user's user-dirs.dirs:
XDG_DESKTOP_DIR="/home/casey/"
XDG_DOWNLOAD_DIR="/home/casey/downloads"
XDG_TEMPLATES_DIR="/home/casey/"
XDG_PUBLICSHARE_DIR="/home/casey/shared/"
XDG_DOCUMENTS_DIR="/home/casey/working"
XDG_MUSIC_DIR="/home/casey/music"
XDG_PICTURES_DIR="/home/casey/pictures"
XDG_VIDEOS_DIR="/home/casey/pictures/videos"
I believe the package xdg-utils must be installed for this to work. See http://www.freedesktop.org/wiki/Software/xdg-user-dirs.
Offline
You can stop the creation of the ~/Desktop directory by editing or creating a file, ~/.config/user-dirs.dirs
Thanks, that's much simpler.
Offline