- Your VNC session may give an error as shown below:
Could not connect to session bus:Failed to connect to socket /tmp/dbus-xxxxxx:Connection refused
- The root cause of this error is that the session bus gets multiple dbus-daemon modules in the default path set for the user.
- A path for /root/anaconda3/bin was exported and set as the default path for a user.
Delete the path /root/anaconda3/bin from the default PATH. If the session bus error is faced by a single user, the anaconda path needs to be removed from the two files mentioned below:
~/.bash_profile and ~/.bashrc
- If a session bus error is generated for system-wide users, the anaconda path needs to be removed from the following files:
/etc/bashrc and /etc/profile
- To reproduce this error, connect vnc viewer to vnc server, the window will pop up showing the following error:
Could not connect to session bus:Failed to connect to socket /tmp/dbus-xxxxxx:Connection refused