主目录搞砸了

最近,我安装了Ubuntu 12.04。 出于某种原因,我将我的主目录内容备份到另一个目录(比如bkp目录)。 确切地说,我将文档,图片,下载等移动到了bkp目录。 现在,删除了我原来的所有主目录内容。 我将所有bkp目录内容恢复到了主页。 我发现它们都在我的桌面上。 我相信有些链条坏了。 我没有找到相应的主目录图标。 我该如何恢复它? 另外,我没有在我的地方选择它们。

桌面看起来像这样:

桌面的屏幕截图显示了许多文件

运行ls -lh ~ ~/Desktop显示:

 nuthan@nuthan-desktop:~$ ls -lh ~ ~/Desktop /home/nuthan: total 2.8M drwxr-x--- 11 nuthan nuthan 4.0K May 28 20:05 android-sdk-linux drwxrwxr-x 4 nuthan nuthan 4.0K May 25 13:36 android-sdks drwxrwxr-x 2 nuthan nuthan 4.0K May 18 17:30 convert -rw-rw-r-- 1 nuthan nuthan 0 May 30 09:07 dependancies~ drwxr-xr-x 2 nuthan nuthan 4.0K Jun 6 14:16 Desktop drwxrwxrwx 6 nuthan nuthan 4.0K Jun 6 12:06 Documents drwxr-xr-x 28 nuthan nuthan 12K Jun 6 13:52 Downloads drwxrwxr-x 2 nuthan nuthan 4.0K Mar 6 13:23 examples -rw-r--r-- 1 nuthan nuthan 8.3K May 11 16:19 examples.desktop drwxrwxr-x 4 nuthan nuthan 4.0K May 18 19:04 github -rw-rw-r-- 1 nuthan nuthan 0 May 28 18:40 linux~ drwxr-xr-x 2 nuthan nuthan 4.0K May 11 16:46 Music drwxrwxr-x 2 nuthan nuthan 4.0K May 30 08:48 node-code drwxrwxr-x 4 nuthan nuthan 4.0K May 30 08:40 node_modules drwxr-xr-x 7 nuthan nuthan 4.0K May 25 13:55 noduino drwxrwxr-x 2 nuthan nuthan 4.0K May 30 11:58 nuthan drwxrwxrwx 3 nuthan nuthan 4.0K May 24 11:13 Pictures drwxrwxr-x 6 nuthan nuthan 4.0K Mar 6 13:23 public drwxr-xr-x 2 nuthan nuthan 4.0K May 25 11:44 Public drwxrwxr-x 2 nuthan nuthan 4.0K May 29 18:50 python -rw-rw-r-- 1 nuthan nuthan 983K Jun 6 14:16 Screenshot from 2012-06-06 14:16:37.png -rw-rw-r-- 1 nuthan nuthan 980K Jun 6 14:20 Screenshot from 2012-06-06 14:20:24.png -rw-rw-r-- 1 nuthan nuthan 731K Jun 6 14:22 Screenshot from 2012-06-06 14:22:06.png drwxrwxr-x 3 nuthan nuthan 4.0K May 31 18:17 sketchbook drwxrwxr-x 2 nuthan nuthan 4.0K Jun 6 13:05 sql -rw-rw-r-- 1 nuthan nuthan 201 May 28 22:08 sql~ drwxr-xr-x 2 nuthan nuthan 4.0K May 11 16:46 Templates -rw-rw-r-- 1 nuthan nuthan 5.1K Jun 4 12:29 test~ drwxrwxr-x 3 nuthan nuthan 4.0K May 14 11:09 Titanium_Studio drwxrwxr-x 4 nuthan nuthan 4.0K May 14 21:00 Titanium Studio Workspace drwxrwxr-x 4 nuthan nuthan 4.0K Jun 1 18:29 TPM_Trak drwxrwxr-x 2 nuthan nuthan 4.0K May 24 17:30 Ubuntu One drwxr-xr-x 2 nuthan nuthan 4.0K May 11 16:46 Videos drwxrwxr-x 6 nuthan nuthan 4.0K May 31 15:10 workspace drwxrwxr-x 3 nuthan nuthan 4.0K May 14 11:57 Zend /home/nuthan/Desktop: total 20K -rw-rw-r-- 1 nuthan nuthan 441 May 30 09:07 dependancies -rw-rw-r-- 1 nuthan nuthan 1.6K May 28 18:40 linux -rw-rw-r-- 1 nuthan nuthan 470 May 28 22:16 sql -rw-rw-r-- 1 nuthan nuthan 5.1K Jun 4 19:34 test nuthan@nuthan-desktop:~$ 

我不得不在xdg-user-dirs-update文件中更改XDG引用

回答于: https : //answers.launchpad.net/ubuntu/+question/199558

文件位置:/home/username/.config/user-dirs.dirs

 # 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/" XDG_DOWNLOAD_DIR="$HOME/" XDG_TEMPLATES_DIR="$HOME/" XDG_PUBLICSHARE_DIR="$HOME/" XDG_DOCUMENTS_DIR="$HOME/" XDG_MUSIC_DIR="$HOME/" XDG_PICTURES_DIR="$HOME/" XDG_VIDEOS_DIR="$HOME/" 

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