defatul
deepin
2021-02-27 04:34 It has been deleted!
deepin20的.profile不会在开机或登录时加载。
写到.bashrc和.zshrc里。有了这俩.profile 就不加载了
你应该了解终端加载环境变量的基本知识。。
写到.bashrc和.zshrc里。有了这俩.profile 就不加载了
"Deepin-20.1" 無法運作
"Deepin-15.11" 沒問題 
你应该了解终端加载环境变量的基本知识。。
不要误导他人哦。
Display Manager 是否应该默认加载 ~/.profile ,有一定的争议,ubuntu 认为是,而 debian 认为不是,所以 debian 10 开始,lightdm 就不再加载了。deepin 可能过去是跟随 ubuntu 的行为,V20 又改成跟随 debian 10 的行为。
解决办法
修改 lightdm ,删除 /etc/X11/Xsession.d/01deepin-profile:
使用这个方法时,建议也对 ~/.profile 做个小修改:将 `if [ -n "$BASH_VERSION" ]` 改为 `if [ -n $BASH_VERSINFO ]`,因为 lightdm-session 会清除 BASH_VERSION ,使得检测不准确。
重启后再看看.profile是不是已经加载了。
$ lsb_release -a
No LSB modules are available.
Distributor ID: Deepin
Description: Deepin 20.1
Release: 20.1
Codename: n/a
$ cat /etc/lsb-release
DISTRIB_ID=Deepin
DISTRIB_RELEASE=20.1
DISTRIB_DESCRIPTION="Deepin 20.1"
DISTRIB_CODENAME=apricot
$ dpkg --status tzdata|grep Provides|cut -f2 -d'-'
buster
UPDATE
$ cat /etc/lsb-release
DISTRIB_ID=Deepin
DISTRIB_RELEASE=20.1
DISTRIB_DESCRIPTION="Deepin 20.1"
DISTRIB_CODENAME=buster
$ curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/n/a/Release'
## Your distribution, identified as "n/a", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support
$ cat /usr/bin/lsb_release
if options.codename or options.all:
if short:
print(distinfo.get('CODENAME', 'n/a'))
else:
print('Codename:\t%s' % distinfo.get('CODENAME', 'n/a'))
##########################################
手動設定
$ sudo mkdir /usr/lib/nodejs
$ sudo tar -xJvf node-v14.18.0-linux-x64.tar.xz -C /usr/lib/nodejs
$ chown -R xxxxx:xxxxx /usr/lib/nodejs
$ gedit ~/.profile
export NODEJS_HOME=/usr/lib/nodejs/node-v14.18.0
export PATH=$NODEJS_HOME/bin:$PATH
$ . ~/.profile
成功的
node -v
14.xx
npm version
7.xx
僅當我重新啟動計算機時
node -v
bash: npm: no commands
npm version
bash: npm: no commands
------->>>>>>>>>>> $ . ~/.profile
自動啟動不起作用
/home/xxxxx/.config/autostart/synapse.desktop
##########################################
成功的安裝方法
但是您應該解決這個lsb_release問題
https://deb.nodesource.com/setup_14.x <---- COPY
/home/xxxxx/nodejs.sh <----- PASTE
Line 211
DISTRO=buster
$ sudo su
$ bash nodejs.sh
$ apt-get install -y nodejs
您根本不考慮開發人員