DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Question what keeps creating ~/Desktop directory?

I'm on OpenBSD 6.5 with fluxbox, which doesn't really have a desktop. Therefore, I don't have (or want) a ~/Desktop directory.

Much to my surprise, something on my system periodically creates a ~/Desktop directory. It happens randomly, I delete it when it appears, a few days later it shows up again, and the cycle repeats.

I'm guessing a badly-behaved GUI application is to blame, but I use very few GUI applications. The only ones I use at least weekly are xterm, xfe, thunderbird, iridium, filezilla, mpv, redshift, xscreensaver. I think that's it (iridium runs with unveil, so it's probably not a suspect).

I appended a line to ~/.config/user-dirs.dirs, so that it now looks like this:
Code:
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_DESKTOP_DIR="$HOME"
Also, I added this line to my ~/.xsession:
Code:
export XDG_CONFIG_HOME=/home/bruno/.config
The above has had no effect and I'm not sure what to try next. Any ideas? I can live with ~/Desktop existing, but I don't like the feeling that I'm not in control of my computer.

Last edited by brudan; 20th May 2019 at 09:59 PM. Reason: clarification
Reply With Quote
  #2   (View Single Post)  
Old 21st May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

I am using Fluxbox, myself, but recently. Was using OpenBox, and Fvwm usually. I don't know, but it does seem like if you removed/deleted the directory, it should not just come back all by itself. Were there any files in it , before you deleted it ?
I have just now tried, as a experiment, I renamed my Desktop directory, since it has a lot of files and I do use it, but out of curiosity to see if a new one appears later. It does seem odd to me.
__________________
My best friends are parrots
Reply With Quote
  #3   (View Single Post)  
Old 21st May 2019
victorvas victorvas is offline
Real Name: Victor
Linux
 
Join Date: May 2019
Posts: 148
Default

chown root:wheel ~/Desktop and then launch every of your apps through terminal and detect which one outputs an error related to ~/Desktop directory
Reply With Quote
  #4   (View Single Post)  
Old 21st May 2019
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

I believe ~/Desktop is produced by Firefox. I have almost the same entry in ~/.config/user-dirs.dirs as brudan but it's slightly different.

XDG_DESKTOP_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/"

This works for me.
Reply With Quote
  #5   (View Single Post)  
Old 21st May 2019
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

If a browser is set to download to a Downloads directory, downloading something will cause WMs to create a ~/Downloads directory. If I remember correctly, that is when ~/Desktop is also created. I do not know how to stop it, since I just leave the Desktop directory in place and use it as storage space for my files.
Reply With Quote
  #6   (View Single Post)  
Old 21st May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Quote:
acampbell>I believe ~/Desktop is produced by Firefox.
Some searches last night got a lot of results saying Firefox does this,..
Do you remember how/when the first instance of a "Desktop" directory got created ? I ask because on a fresh , default install of OpenBsd, there is no Desktop directory created in the /home directory.
On my system, the /home directory is in the sd0k partition, normally no sub directories are created until I create them. In my case the "Desktop" directory was made when I transferred copied all the files/directories in my /home directory on my old Linux system, to the fresh OpenBsd system, this was way back when OpenBsd was 5.3 or 5.4, but any way the Desktop directory was created because there was a Desktop dir in the home dir I copied.
Just now tried some downloads using Firefox, and so far no new Desktop dir has been made. I do agree, I would find it rather disturbing if something unknown was creating any directories with out me telling it to,
__________________
My best friends are parrots
Reply With Quote
  #7   (View Single Post)  
Old 21st May 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

All though Firefox, did not do this, just now tried "Seamonkey", and it immediately created a new Desktop directory. Than is sad, in my mind that classifies as mal ware, no Browser should do that.
Well, maybe not excatly mal ware, it seems harmless enough, but in any event no browser should be makeing un wanted directories, like that.
Quote:
brudan>>I'm guessing a badly-behaved GUI application is to blame, but I use very few GUI applications. The only ones I use at least weekly are xterm, xfe, thunderbird, iridium, filezilla, mpv, redshift, xscreensaver. I think that's it (iridium runs with unveil, so it's probably not a suspect).
However, the OP says they use iridium, but still, I would check it, and see.
===edit ======
Trying Iridium my self, and seems ok, no Desktop dir got created so far.
__________________
My best friends are parrots

Last edited by PapaParrot; 21st May 2019 at 02:44 PM.
Reply With Quote
  #8   (View Single Post)  
Old 21st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you all for the suggestions.

Regarding firefox: Internet searches give many hits about firefox doing this, but I don't have firefox installed. However, I do use thunderbird which is/was made by same folks. I'm going to try changing
Code:
XDG_DESKTOP_DIR="$HOME"
to
Code:
XDG_DESKTOP_DIR="/home/bruno"
in ~/.config/user-dirs.dirs as suggested here: https://support.mozilla.org/en-US/questions/985990

I never created ~/Desktop myself; when it gets auto-created, the directory is empty.

@victorvas: That's an excellent idea, but the creation of ~/Desktop happens only rarely. I already tried launching all my X applications one at a time, and was not able to reproduce. It only happens when I'm not expecting

In the meantime, I'll always have this script running in the background, so at least I'll know what processes were running ~when it happens again:

Code:
#!/bin/sh

busted()
{
	aucat -i /path/to/alarm.wav
	date >$HOME/suspects.txt
	ps axuww >>$HOME/suspects.txt
	exit
}

while true; do
	[ -d $HOME/Desktop ] && busted
	sleep 1
done
If someone can think of a more refined approach to identify suspects, please let me know.

Last edited by brudan; 22nd May 2019 at 12:29 AM.
Reply With Quote
  #9   (View Single Post)  
Old 22nd May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

My script above helped me find the culprit: thunderbird.

Just normal usage of thunderbird (starting it, sending and receiving email, uploading/downloading attachments, closing it) is fine, but certain operations (e.g., clicking on Edit then Preferences) reliably cause ~/Desktop to be created if ~/.config/user-dirs.dirs contains XDG_DESKTOP_DIR="$HOME" (note the lack of a final forward slash) or no entry specifying desktop dir. To make thunderbird stop automatically creating ~/Desktop, having any of these in ~/.config/user-dirs.dirs does the trick:

XDG_DESKTOP_DIR="$HOME/"
XDG_DESKTOP_DIR="/home/username"
XDG_DESKTOP_DIR="/home/username/"

So I was just missing a forward slash after $HOME. Who would have thought?!

P.S. For you fellow minimalists out there, I discovered that exporting XDG_CONFIG_HOME in ~/.xsession (as I mentioned in the original post) is not necessary--at least as far as thunderbird is concerned. In other words, it seems that looking for user-dirs.dirs in ~/.config/ is the default.

Last edited by brudan; 22nd May 2019 at 12:29 PM. Reason: PS about .xsession
Reply With Quote
Reply

Tags
desktop, solved, xdg, xenocara


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recommend an app for creating galleries Sonya General software and network 4 15th July 2013 10:37 PM
Help creating a slice kly FreeBSD Installation and Upgrading 4 22nd May 2010 04:37 PM
Creating port backrow OpenBSD Packages and Ports 9 9th September 2009 11:55 AM
Creating 2 slices Beastie FreeBSD Installation and Upgrading 7 23rd March 2009 12:22 AM
strange "~" directory in home directory gosha OpenBSD General 5 23rd February 2009 06:12 PM


All times are GMT. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick