Years ago, we had a sysadmin who set up the default install so that all users start out with trash, their home folder, and some application launchers on their desktop. I'm currently in the process of building out some new machines for users that need a slight update. I would like to find out what folder he used (it's not /etc/skel or anything in the xdg/* directory) to set this default, then modify it.

Modifying the directory is easy enough, how would I go about finding where this directory is?

Added info: these users will be logging in as local users authenticated against LDAP, we are using XFCE4 on Xubuntu.


Where the desktop is is defined in ~/.config/user-dirs.dirs. If you want to place icons on the desktop, you have to create *.desktop files and put them into the folder [whatever comes after XDG_DESKTOP_DIR=].

*.desktop files are structured like this:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=C++ Eclipse
Exec="/home/christoph/.IDEs/C++ Eclipse/eclipse"
Icon=/home/christoph/.IDEs/C++ Eclipse/icon.xpm

You can find other examples (probably with a lot more content) in /usr/share/applications. The address for trash is trash:///, so Exec could be Exec="nautilus trash:///".

| improve this answer | |
  • Correct, except that the desktop (~/Desktop in this case) is already populated with some items. Everyone gets their own desktop to do with as they please, but everyone starts from the same template with some launchers and links in it, defined somewhere I can't find – agentroadkill Oct 15 '15 at 20:13
  • So ~/Desktop comes pre-populated with some stuff. Is my question clear? – agentroadkill Oct 15 '15 at 20:18
  • It wasn't clear to me and I don't know the answer, but that's how you'll probably get it: So you want to figure out where these files are? Copy the full name (including the file extension) of one of the application launchers and search for them on the entire file system (sudo apt-get install gnome-search-tool if you want a nice graphical one; make sure to search for system and hidden files). This'll be the easiest way to find it out. If you want to know in which file these file names are listed: gnome-search-tool also comes with an option to search the contents of files in a folder. – UTF-8 Oct 15 '15 at 20:35
  • The issue being that these are all generically-named applications that appear in multiple panels all over the place. I did look, and it appears some of them come from one place, but not all - there must be some hidden script I'm not finding. Was hoping there would be logs or something like that. – agentroadkill Oct 15 '15 at 21:57
  • Have you included the file extension? Because there should be really few *.desktop files on a computer (at least if there aren't lots of users with all a lot of user specific *.desktop files). If I search for "firefox.desktop", "steam.desktop", "pdfchain.desktop" or any other application, I always find exactly 2 of these files. If you don't find the files, maybe they are not copied but created by a single file for each user. You cold copy a line from one of the *.desktop files you find on the desktops and search the contents of all files for this line. – UTF-8 Oct 15 '15 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.