You are not logged in.

#1 2012-12-08 12:06:56

Whef
Member
Registered: 2012-08-26
Posts: 33

What keeps creating ~/Desktop and ~/Downloads?

Both ~/Desktop and ~/Downloads folders are spontaneously created, despite my continued removal of them. I don't use a desktop environment (I use dwm + xinit).

I'm fairly sure that ~/Desktop is being created at boot, but I haven't actually tested it yet (don't want to reboot, lots of man pages open).

I thought either Firefox or Transmission were creating ~/Downloads, so I tested it and found the folder (as expected). Then I tried to replicate this and couldn't... in other words, I have no idea what's creating it, but it seems to be fairly unpredictable. :S

Offline

#2 2012-12-08 12:16:06

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: What keeps creating ~/Desktop and ~/Downloads?

afaik the xdg-user-dirs package is responsible for this, removing it might help.

Offline

#3 2012-12-08 12:37:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: What keeps creating ~/Desktop and ~/Downloads?

I believe firefox will create the Downloads folders, but not every time it is run - only when it tries to download.

The only time I've ever had a Desktop folder is when I experiment with DE's.  Nothing I currently use creates Desktop,


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-12-08 12:46:40

Whef
Member
Registered: 2012-08-26
Posts: 33

Re: What keeps creating ~/Desktop and ~/Downloads?

65kid wrote:

afaik the xdg-user-dirs package is responsible for this, removing it might help.

Yeah, you're right, it does. However, I don't have it installed.

Trilby wrote:

I believe firefox will create the Downloads folders, but not every time it is run - only when it tries to download.

The only time I've ever had a Desktop folder is when I experiment with DE's.  Nothing I currently use creates Desktop,

I took the liberty of downloading the source tarball of your ttwm project on git, and it didn't create Downloads; I forgot to mention, I have changed my Firefox downloads directory to ~/downloads/browser.


So, whatever it is it's still in the wind. Is there any way to log what's making filesystem operations?

Offline

#5 2012-12-08 13:06:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: What keeps creating ~/Desktop and ~/Downloads?

Whef wrote:

So, whatever it is it's still in the wind. Is there any way to log what's making filesystem operations?

One quick way would be to use community/inotify-tools which could either pop up a dialog (xenity/xdialog) when one of these folders were created so you could pinpoint when it happened, and/or inotify-tools could be in a script to dump a list of currently running processes every time one of these folders is accessed, then by running for a bit and comparing these lists you could narrow down a suspect list.

I anticipate there are more efficient and direct ways of detecting what created a given folder though.  Hopefully someone will be able to describe one.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2012-12-08 13:30:04

fijit
Member
Registered: 2012-07-06
Posts: 24

Re: What keeps creating ~/Desktop and ~/Downloads?

Try editing ~/.config/user-dirs.dirs (make the relevant entries point to $HOME) and see if this prevents the directories from being created.

Offline

#7 2012-12-08 13:54:22

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: What keeps creating ~/Desktop and ~/Downloads?

If you don't have a ~/.config/user-dirs.dirs file then you must create it.  You use this file to give apps such as Firefox an alternate location for directories that the app insists that you must have.  Here's my user-dirs.dirs:

$ cat ~/.config/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/"
XDG_MUSIC_DIR="/home/casey/music"
XDG_PICTURES_DIR="/home/casey/pictures"
XDG_VIDEOS_DIR="/home/casey/pictures/videos"

As far as I know, you don't need to install the extra/xdg-user-dirs package for this to work – I haven't installed that package.  It works here to stop the directory creation annoyance using no DE, I have just Openbox as a WM.

Last edited by thisoldman (2012-12-08 13:56:17)

Offline

#8 2012-12-08 13:56:22

eruditorum
Member
Registered: 2012-11-12
Posts: 130

Re: What keeps creating ~/Desktop and ~/Downloads?

del

Last edited by eruditorum (2012-12-08 14:05:38)

Offline

#9 2012-12-09 00:30:16

Whef
Member
Registered: 2012-08-26
Posts: 33

Re: What keeps creating ~/Desktop and ~/Downloads?

I restarted and ~/Desktop wasn't created, so I still have no idea what's doing it...

As for ~/.config/user-dirs.dirs, I already had it (probably because I used to have Gnome and KDE installed). I changed the directories to something that should work, so I guess I'll just wait and see if they pop up again. If they do, I'll probably try to track down the offending program with Trillby's method.

Offline

#10 2012-12-09 06:20:16

Mactownes
Member
From: The womb
Registered: 2012-08-17
Posts: 22
Website

Re: What keeps creating ~/Desktop and ~/Downloads?

Many GTK and other DE applications will create the Downloads and Desktop folders, because they assume that they were installed on a system such as vanilla Ubuntu or Debian, so there are already Desktop and Downloads.

In other words, it may be any programs you use that are from DEs. I have had the same issue.

Offline

Board footer

Powered by FluxBB