1、问题描述

在centos上完成了xrdp的安装,但是远程连接不上,表现为输了密码之后闪退

2、原因分析

查看~/.xsession-errors的日志,如下所示

(imsettings-check:20869): IMSettings-WARNING **: 15:14:24.803: Could not connect: Connection refused

(imsettings-check:20869): GLib-GIO-CRITICAL **: 15:14:24.803: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

GLib-GIO-Message: 15:14:25.264: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

** (process:20626): WARNING **: 15:14:25.285: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused

经过各种查找之后,导致失败的原因是因为centos上安装了anaconda,anaconda的环境变量靠前了,所以连接失败。

3、解决

主要在于将anaconda环境变量的顺序往后移动

涉及文件1:~/.bashrc,修改其中的一行配置

#修改前

export PATH=/usr/local/cuda/bin/:$PATH

#修改后

export PATH=$PATH:/usr/local/cuda/bin/

涉及文件2:/etc/profile,修改其中的一行配置

#修改前

export PATH=/opt/anaconda3/bin:$PATH

#修改后

export PATH=$PATH:/opt/anaconda3/bin

使修改生效

source ~/.bashrc

source /etc/profile

Logo

更多推荐