[Exchange and share] 环境变量设置
Tofloor
poster avatar
小庄佩奇
deepin
2023-08-27 06:38
Author

好像设置在~/.profile并不会全局生效了,

V20当时应该是只需要设置在~/.profile里面,注销再登陆,环境变量就能全局生效了

升级到v23现在只能改到/etc/profile里面去了

Reply Favorite View the author
All Replies
Tonny
deepin
2023-08-27 06:42
#1
It has been deleted!
爱开发
deepin
2023-08-27 07:35
#2

你说的全局是包含 root 的tty 环境,还是桌面环境的全局?

如果是这两种…那解决不了吧?我查过gpt,了解过相关文件的加载方式…好像只有/etc/profile 支持。

Reply View the author
小庄佩奇
deepin
2023-08-27 07:47
#3
爱开发

你说的全局是包含 root 的tty 环境,还是桌面环境的全局?

如果是这两种…那解决不了吧?我查过gpt,了解过相关文件的加载方式…好像只有/etc/profile 支持。

对的,指的是桌面环境,20.9的时候,设置在~/.profile可以

Reply View the author
ljq790615
deepin
2023-08-27 16:48
#4

我一股脑放在 ~/.bashrc 里面了

Reply View the author
Bryan
deepin
2023-08-27 18:45
#5

试一下 ~/.bash_profile

Reply View the author
小庄佩奇
deepin
2023-08-27 19:15
#6
Tonny It has been deleted!

哥们,不能用这个,设置了data分区的Path, 直接block在登陆界面了,直接进不了系统了,我后来还是进tty模式清空了/etc/environment才进来的。。

Reply View the author