叶落随风

Good Luck To You!

如何将 Home 目录下的文件夹设置为英文

Home 目录下的文件夹如何如何显示是由本地的 ~/.config/user-dirs.dirs 和全局的 /etc/xdg/user-dirs.defaults 配置文件所控制,我们只需要更改 ~/.config/user-dirs.dirs 就可以将 Home 目录的文件夹改成英文的。

首先打开 ~/.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/视频"

果然是 ~/.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/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"

然后将 Home 目录下的文件全部重命名:

$ mv $HOME/桌面 $HOME/Desktop 
$ mv $HOME/下载 $HOME/Downloads 
$ mv $HOME/模板 $HOME/Templates 
$ mv $HOME/公共 $HOME/Public 
$ mv $HOME/文档 $HOME/Documents 
$ mv $HOME/音乐 $HOME/Music 
$ mv $HOME/图片 $HOME/Pictures 
$ mv $HOME/视频 $HOME/Videos

最后重启。

如果不出意外的话应该就可以看见 “英文版” 的 Home 目录了


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.7.3

Copyright Your WebSite.Some Rights Reserved.蜀ICP备20014301号-1