How Does One Re-set After Update/Grade?

Under the when things work - fix it.

I accidentally let L5 update/grade do it’s thing.:bomb:
I have been using “warp.exe” to move image files to computer tower for some time now - no issues until something was fixed. :boom:
An update/upgrade set itself up and
Now, Warp has changed:

  1. Open Warp on both L5 and tower.
  2. Select file on tower to trans to L5
  3. Enter new password in to Warp.
  4. "Error"

    Downloads dir missing. Please set XDG_DOWNLOAD_DIR

  5. Another *Must Know Linux Commands* without notice.

Now the question.
 
How Does One Set a "XDG download dir?

What I Did to check this myself:

  • The file was only 500K
  • Tried other 56K file - same thing.
  • This WARP program worked fine before L5 update/grade.
  • I didn't change anything. I just read text messages and did nothing else.
  • Have all my previous files Downloads gone now?
  • There **WAS** a folder called "Downloads" where Warp defaulted to before the fixes. Now it's called "Downloads\ (copy)"
  • Note: Might be 1 or 2 spaces between the \ and "copy)"

    TIA
    ~S

2 Likes
mv '/home/purism/Downloads\ (copy)' /home/purism/Downloads
2 Likes

I get:

mv: cannot stat ‘/home/purism/
Downloads\ (copy’ 'home/purism/Downloads
\ (copy): No such file or directory

as shown with ELO’s as is on L5.

2 Likes

Copy and paste the exact command.

Bear with me. Must research how to copy/paste via terminal using a new language that L5 didn’t come with. :rage:

Thanks for help
~s

1 Like

The graphical method has more steps, but it may be easier for you to use depending on your experience:

  1. Open Files/Nautilus.
  2. Change the Squeekboard keyboard layout to Terminal.
  3. Select the “Downloads\ (copy)” directory by dragging over it.
  4. On Squeekboard, tap >_, F2, then rename “Downloads\ (copy)” to “Downloads”.
1 Like

Me too!!
(10 chars)

1 Like

That made it easier to chnage. I still get the same error.

Downloads dir missing. Please set XDG_DOWNLOAD_DIR

:question:Does the “Downloads” folder need Permissions set any where maybe? Are we to ignore the “XDG_” part"

:question:Would it hurt the phone if I put the data on a USB-A stick with a USB-C adapter and plug that in to L5 and copy from USB in to L5?

~s
edit - typo

1 Like

Okay, use this command:

xdg-user-dirs-update --set DOWNLOADS ${HOME}/Downloads;

No, that w(sh)ould work just fine

2 Likes

Reflash; it will wipe everything on the device, and reinstall the OS.

You can turn off auto-updating in the PureOS Software app preferences. (Even if the app isn’t working on your device to discover applications, its preferences may still be getting applied.)

3 Likes

There is no “Downloads\ (copy)” just “Downloads”

So far, I tried all the ideas here, and still get the same error.

Downloads dir missing. Please set
XDG-DOWNLOAD_DIR

TIA
~s

1 Like

Try checking the config file at $HOME/.config/user-dirs.dirs. The contents should look something like this:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

If the file does not match what I pasted with my defaults, you can force a full reset with xdg-user-dirs-update --force.

xdg-user-dirs-update man-page
  XDG-USER-DIRS-UPD(1)                                                                                               User Commands                                                                                               XDG-USER-DIRS-UPD(1)

NAME
       xdg-user-dirs-update - Update XDG user dir configuration

SYNOPSIS
       xdg-user-dirs-update [OPTION...] [--set NAME PATH...]

DESCRIPTION
       xdg-user-dirs-update updates the current state of the users user-dirs.dir. If none existed before then one is created based on the system default values, or falling back to the old non-translated filenames if such directories exists.
       The list of old directories used are: ~/Desktop, ~/Templates and ~/Public.

       If an old configuration exists it is updated with any new default directories. 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.

       On the first run a user-dirs.locale file is created containing the locale that was used for the translation. This is used later by GUI tools like xdg-user-dirs-gtk-update to detect if the locale was changed, letting you to migrate from
       the old names.

       xdg-user-dirs-update is normally run automatically at the start of a user session to update the XDG user dirs according to the users locale.

OPTIONS
       The following options are understood:

       --help
           Print help output and exit.

       --force
           Update existing user-dirs.dir, but force a full reset. This means: Don't reset nonexisting directories to HOME, rather recreate the directory. Never use backwards compatible non-translated names. Always recreate user-dirs.locale.

       --dummy-output PATH
           Write the configuration to PATH instead of the default configuration file. Also, no directories are created.

       --set NAME PATH
           Sets the XDG user dir with the given name.

           NAME should be one of the following:
               DESKTOP
               DOWNLOAD
               TEMPLATES
               PUBLICSHARE
               DOCUMENTS
               MUSIC
               PICTURES
               VIDEOS

           PATH must be an absolute path, e.g.  $HOME/Some/Directory.

FILES
       The XDG user dirs configuration is stored in the user-dirs.dir file in the location pointed to by the XDG_CONFIG_HOME environment variable.

ENVIRONMENT
       The XDG_CONFIG_HOME environment variable determines where the user-dirs.dirs file is located.

SEE ALSO
       xdg-user-dir(1), user-dirs.dirs(5), user-dirs.defaults(5), user-dirs.conf(5).

XDG                                                                                                                                                                                                                            XDG-USER-DIRS-UPD(1)
  
1 Like

Wow. Your example should be in a FAQ, or Wiki maybe?
Problem solved.
Any way, thank you very much.
Tell your boss that I said you may have next week off with pay.

~s

2 Likes