9

I accidentally deleted (permamently deleted. Not a soft delete to Trash) ~/.config directory.

I logged out and re-logged in and thing seem to be normal. But are they?

What have I lost? How will affect my computer? How do I set things right?

  • @AFSHIN That I am running Kubuntu 17.04 is not important? – deshmukh Aug 21 '17 at 11:16
  • Hi, your question is not version specific related or an issue, the directory ~/.config is a kind of convention, defined by XDG Base Directory Specification, you may also need to have a look this post – αғsнιη Aug 21 '17 at 11:27
  • Did you permanently delete or soft delete (move to trash)? – Scimonster Aug 21 '17 at 14:40
  • 1
    Hopefully the long-term effect will be that you start making regular backups of your computer. – krs013 Aug 22 '17 at 4:31
  • @AFSHIN Thanks for pointing it out. I mentioned the version number as I thought it was a 'good practice'. – deshmukh Aug 22 '17 at 12:27
17

.config folder contains your application configurations. Whether it is system level or user level depends on the location.Yours look like user level config.

Check this post.

What have I lost? How will affect my computer?

You would likely lose any user level custom configuration/settings you may have set for any app that adheres to the XDG Directory Specification.

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

Most apps in this case revert to default settings. You may have to manually add these configurations again. Note: Certain applications that have their own config folder instead of using config will not be affected.

5

You have removed all the user specific modifications or properties (for that specific user) for the applications that use directories under ~/.config to dump and read configuration. Generally, all the XDG applications use ~/.config; ~/.config is used to set or override any user specific configuration of an application set globally elsewhere.

This is not a problem per se, given you are want to set those again, or prompted to be set or happy with th globals.

At the very least, i would suggest you to run:

xdg-user-dirs-update

to create the file ~/.config/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that contains various XDG_* directory directives that many applications use.

You should get your ~/.config/user-dirs.dirs having:

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"
5

The ~/.config directory contains application configuration related to your user account only. Deleting it will return the configuration for those applications to their default value, as if you had not used them before.

Whether this is a problem for you depends on what applications you've been using and configuring.

It does not affect any system-wide configuration of any applications, only the customizations added for your user account.

2

Most of the programs will generate their configuration files and put them in place again, however if you have something manually set, they're gone and you have to config them again.

Use your Ubuntu for a while or try something like testdisk to get your files back.

2

If you accidentally deleted something, just go into your backup and restore the deleted files.

  • Yes. That did teach me the importance of backups :) – deshmukh Aug 21 '17 at 6:59

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.