Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

XDG error

Ask your questions here.

XDG error

Postby Mark9 » Thu Feb 02, 2017 4:57 pm

I have run into a recurring issue with nearly every installed Debian that I used to create remasters. The most recent remaster of Debian 8 Mate 64 Bit this time, had the same issue come up as has happened for years. I have no idea how this happens though I have found a temporary fix. I am actually not 100 % certain this error is being created via the creation of a remaster. It may be related to Debian or Mate or an issue with XDG.
What keeps happening is that I will start up my computers and find that the folders from /home/??? have been placed onto my desktop. When I look into the file manager my named home /folder/??? has been renamed Desktop.
I can restore my folders by deleting /home/???/.config/user-dirs.dirs and then logging out and in again.
The error will at some random time recur. I would love to know how to stop this from happening, and I wonder if my remasters are passing along whatever is causing this, to new installs?

The user-dirs.dirs file can be edited to use absolute paths(works), but I do not know if this will actually stop the issue from happening, but also I wonder if using an absolute path, will mess up the remastering when this file is copied to /etc/skel The absolute path contains my user name in /home

Any ideas?
Mark9
 
Posts: 22
Joined: Thu Feb 02, 2017 4:23 pm

Re: XDG error

Postby fsmithred » Thu Feb 02, 2017 7:35 pm

That's a weird one. I would start with comparing the user's user-dirs file with etc/xdg/user-dirs.defaults to make sure it's formatted correctly. Neither the installer nor the snapshot tool do anything with these files except copy them. If you change the user name during install, the installer will go into .config and change instances of /home/oldname /home/newname inside the files, but that shouldn't cause the problem you're seeing.

If you copy your configs to /etc/skel, you'll need to be selective. I know with xfce, it's possible to include the configs necessary for the refracta desktop without including any files that contain the user name. I don't know about mate. (grep -r "/home/your-name" .config)

Have you seen this problem only with refractainstaller and snapshot, or has it occurred with other remastering tools?
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: XDG error

Postby Mark9 » Thu Feb 02, 2017 9:11 pm

Good question. It may also have happened when testing remastersys, but mostly I used your software as I find it makes more sense to exclude what isn't needed rather that decide what to include(Remastersys). If I have a fully working setup, I know if I include everything it will work, so like I said, it just makes sense to me to exclude things that are not needed. I have made some lovely remasters using both remastering softwares.
I have had the very same issue with XDG occur with Debian Xfce.

I once wrote to the XDG developers but found no answers. I know the file, /user-dirs.dirs in /.config gets recreated during login. I had found others online with the same issue, who suggested deleting the file and logging out and back in, and sure enough it puts everything back to normal.

The remastered live DVD starts up with everything in it's proper place. It is just the installed system this happens to. As I mentioned, I am not 100% sure it is the remastering process that causes this bug, but it has happened very often to setup's that I had created remasters with. Very strange indeed.

The first time this happened, I made the mistake of thinking the folders that appeared all over my desktop, were just linked or copied, and I deleted them. Must have needed sleep. I deleted all my data :-(
Mark9
 
Posts: 22
Joined: Thu Feb 02, 2017 4:23 pm

Re: XDG error

Postby fsmithred » Thu Feb 02, 2017 11:08 pm

I just looked in my ~/.config/user-dirs.dirs and my user name is not there.
Code: Select all
XDG_DESKTOP_DIR="$HOME/Desktop"


And etc/xdg/user-dirs.defaults has everything commented out except this:
Code: Select all
DESKTOP=Desktop


Have you ever looked inside user-dirs.dirs when this happens? Next time don't delete the file, but move/rename it.

Do you have any friends who know linux, have access to your computer and have a strange sense of humor?

Here's an interesting piece from 'man xdg-user-dirs-update'.
Additionally, any configured directories that point to non-existing locations are reset by pointing then to the users home directory. This typically happens when the users removed the directory, so they likely don't want to use it anymore.
Makes me wonder if xdg is getting confused about something and resetting your dirs wrong. Just a guess.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: XDG error

Postby Mark9 » Fri Feb 03, 2017 5:35 pm

I will look more closely at the old XDG files next time this happens. I know the newly created ones looked normal, so I would say they were identical. When this error occurs, rebooting doesn't correct the folders.

You are correct that the user name isn't mentioned in the XDG files. There is the option to use direct paths though, where the user name is used. I thought maybe this would be less confusing for XDG, and perhaps stop this error from occurring; however if I do this, using direct paths, and a user name, I imagine that the user name MAY be copied to the remaster? I suppose I could then simply make sure to not copy those files to /etc/skel when creating a remaster, but they would have to then be created live with every boot up of the live DVD. Or before creating a remaster, I could change the paths back to the default. I don't know that using the direct path method will actually prevent this error from coming up again, as it happens seemingly completely at random times.
Mark9
 
Posts: 22
Joined: Thu Feb 02, 2017 4:23 pm

Re: XDG error

Postby fsmithred » Sat Feb 04, 2017 1:40 am

Yes, the users xdg-user-dirs.dirs will get copied into the snapshot. See /usr/lib/refractasnapshot/snapshot_exclude.list to see what won't get copied.

If you're using a pre-configured user, then you don't need to put files in /etc/skel. That only gets used when creating a new user. If you don't have a pre-configured user, and you're letting live-config create the user at boot, then I guess you do need to copy the files.

I'm a little afraid to say anything, but it looks like a much hated forum bug got fixed.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred