xdg-user-dirs:控制$HOME目录下面Music,Videos等目录存在与否
作者:碳酸钙baby_849 | 来源:互联网 | 2017-11-10 19:13
xdg-user-dirs:控制$HOME目录下面Music,Videos等目录存在与否--Linux通用技术-Linux技术与应用信息,下面是详情阅读。
[root@localhost ~]# pwd
/root
[root@localhost ~]# cd .config/
[root@localhost .config]# ll
total 28
drwxr-xr-x 2 root root 4096 2007-11-26 17:17 audacious
drwxr-xr-x 4 root root 4096 2007-11-28 11:34 banshee
drwxr-xr-x 3 root root 4096 2007-11-28 10:52 bmpx
drwx------ 2 root root 4096 2007-12-10 15:53 gtk-2.0
drwxr-xr-x 2 root root 4096 2007-11-29 11:07 menus
-rw------- 1 root root 617 2007-12-10 16:48 user-dirs.dirs
-rw-r--r-- 1 root root 5 2007-11-22 10:52 user-dirs.locale
[root@localhost .config]# cd /etc/xdg
[root@localhost xdg]# ll
total 40
drwxr-xr-x 2 root root 4096 2007-11-29 12:07 autostart
drwxr-xr-x 6 root root 4096 2007-12-07 15:01 menus
drwxr-xr-x 2 root root 4096 2007-11-29 12:06 Thunar
-rw-r--r-- 1 root root 414 2007-08-21 20:12 user-dirs.conf
-rw-r--r-- 1 root root 421 2007-12-10 16:35 user-dirs.defaults
drwxr-xr-x 4 root root 4096 2007-11-29 12:07 xfce4
drwxr-xr-x 2 root root 4096 2007-11-29 12:07 xfce4-session
[root@localhost xdg]# xdg-user-dir
xdg-user-dir xdg-user-dirs-gtk-update xdg-user-dirs-update
[root@localhost xdg]# which xdg-user-dirs-update
/usr/bin/xdg-user-dirs-update
[root@localhost xdg]# rpm -qf /usr/bin/xdg-user-dirs-update
xdg-user-dirs-0.9-1.fc8
把.config/user-dirs.conf文件中有关Pictures的那行注释掉,运行xdg-user-dirs-update有如下信息:
[root@localhost ~]# xdg-user-dirs-update
/root/Pictures was removed, reassigning PICTURES to homedir
就是说那些目录不能直接删除,那样的话下次启动还会自动生成。可以通过修改上述配置文件,它在update时会把路径设置为$HOME,也就相当于删除了相应目录:
$(XDG_CONFIG_HOME)/user-dirs.dirs specifies the current set of directories for the user. This file is in a shell format, so its easy to access from a shell script. This file can also be modified by users (manually or via applications) to change the directories used. Note: To disable a directory, point it to the homedir. If you delete it it will be recreated on the next login.
推荐阅读
2019独角兽企业重金招聘Python工程师标准MPP结构:129GTM节点,130coordinator、gtm_proxy、datanode& ...
[详细]
蜡笔小新 2023-10-12 18:49:46
DeaDBeeF音频播放器是一款来自国外的强大音乐播放软件,使用这款完全中文的DeaDBeeF音频播放器可以让你随时编辑本地的音乐文件标签和属性,根据不同的音乐文件配置不同的音色输出 ...
[详细]
蜡笔小新 2023-10-12 10:21:48
xmake-ftmpxxx.luaxmake--filexxx.lua最简单:--添加名为demo的目标到工程target(demo)--设置目标程序类型为二进制,一般为 ...
[详细]
蜡笔小新 2023-09-24 08:32:23
蜡笔小新 2023-09-24 04:47:29
我有一个vim默认安装在Linux上,在一个系统上有vt52终端仿真器和unicode功能。Vim不会接受换行一切都工作正常,直到今天,当 ...
[详细]
蜡笔小新 2023-09-24 03:23:37
并发系列之CAS与原子操作1、CAS的概念2、Java实现CAS的原理-Unsafe类3、原子操作-AtomicInteger类源码简析4、CAS实现原子操作的三大问题4.1、AB ...
[详细]
蜡笔小新 2023-09-23 19:48:49
本文主要介绍关于人工智能,shell的知识点,对【winyyy.sys,hcpidesk.sys,mtlrd.sys,uldfhjfh.sys,servets.exe等1】和【】有兴趣的朋友可以看下由 ...
[详细]
蜡笔小新 2023-09-23 16:17:58
概念:组合模式(CompositePattern)将对象组合成树形结构以表示“部分-整体”的层次结构,组合模式使得用户对单个对象和组合对象的使用具有一致性。有时候又叫做部分-整体模 ...
[详细]
蜡笔小新 2023-09-23 15:55:31
openpyxlxlrdxlwtxlwingsxlsxwriter了解各个库的异同,从而在不同场景下可以灵活使用首先让我们来整体把握下不同库的特点“xlrdxlwtx ...
[详细]
蜡笔小新 2023-09-23 14:59:24
篇首语:本文由编程笔记#小编为大家整理,主要介绍了2D阵列选择排序相关的知识,希望对你有一定的参考价值。所以 ...
[详细]
蜡笔小新 2023-09-23 13:49:49
一:协议解析(一)协议格式设计(二)字段说明Version(1Byte):版本信息,这里默认0即可Status(1Byte):协议的状态信息#definePROTO_LOGIN_R ...
[详细]
蜡笔小新 2023-09-23 12:12:24
如果有人不了解人体的内部结构,就自称医生,声称自己能给人开腹割掉发炎的阑尾,甚至还能开胸给冠心病人做心脏搭桥,你信吗 ...
[详细]
蜡笔小新 2023-09-23 10:00:32
本文目录一览:1、mysql数据库插入数据很慢,咋回事 ...
[详细]
蜡笔小新 2023-09-23 09:44:58
题意:对于整数序列$A[1n]$定义$f(l,r)$为区间$[l,r]$内等于区间最大值元素的个数,定义$z[i]$为所有满足$f(l,r)i$的区间总数。对于所有的$1\l ...
[详细]
蜡笔小新 2023-09-18 17:49:04
html+css网页设计源码_11个Html和CSS 动态网页背景免费代码案例 ...
[详细]
蜡笔小新 2023-09-18 12:49:39
碳酸钙baby_849
这个家伙很懒,什么也没留下!