13

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?

deshmukh
  • 4,061
  • @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 04: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
  • @Scimonster I had permanently deleted. Edited my question to mention that. – deshmukh Aug 22 '17 at 12:28
  • @krs013 Yes. More regular backups is the way to go. I took one today. Unfortunately, there are not many elegant and easy-to-use solutions available for KDE. I would love a solution that is automatic (starts backup at a specified hour or on attaching an external USB), in the file manager, click on a file/ folder and restore it or click on the empty space and restore a deleted file, the backup itself is accessible without the backup tool (so if I can restore things on, say, a windows comupter) and the backup is verifiable (so I know that I have a reliable backup) – deshmukh Aug 22 '17 at 12:35

5 Answers5

19

.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.

Suraj Rao
  • 627
6

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.

thomasrutter
  • 36,774
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"
heemayl
  • 91,753
4

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

dessert
  • 39,982
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.

Ravexina
  • 55,668
  • 25
  • 164
  • 183