ubuntu12.04 取消主目录下文件在桌面上面的图形显示

由于我对/home/lfl/目录即主目录下面的文件夹进行了清理,把所有的文件夹都删除了(包括Desktop文件夹),

然后又在主目录下创建了一些经常要用到的文件夹及文件,所以当第二次再打开ubuntu系统时,桌面上面就显示

出了主目录下面我所创建的所有文件及文件及。

lfl@ubuntu:~$ vi ./.config/user-dirs.dirs 

这时会发现文件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/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

现在重启系统,就可。

标红色背景的为不同的一行代码,即只要主目录下面有Desktop文件夹即可保证正常。


如果重启后还会出现错误:Could not apply the stored configuration for monitors

请参见:http://blog.csdn.net/think_embed/article/details/8805510

谢谢^_^

你可能感兴趣的:(unclassified)