Score:2

Failed to connect to socket /run/user/1000/at-spi/bus: Permission denied, revisited

mm flag

Prerequisites, I installed:

sudo apt install dbus-x11
sudo apt-get install samba-common-bin
sudo mkdir /var/lib/samba/usershares

The following commands

xhost +SI:localuser:myOtherUser
sudo --user myOtherUser env DISPLAY=$DISPLAY nautilus
xhost -SI:localuser:myOtherUser

cause the following error:

(org.gnome.Nautilus:3806): dbind-WARNING **: 17:54:12.615: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus: Permission denied
* Starting Nautilus Terminal

On a previous fresh install I already faced the above mentioned error, now it's there again on another Ubuntu 22.04.4 fresh install, see Failed to execute child process "dbus-launch" on 'Open in Terminal' (Ubuntu 22.04LTS) and Failed to execute child process "net" when entering Nautilus

Any ideas how I can get rid of the Permission denied error? Thanks in advance!

Score:1
mm flag

adding NO_AT_BRIDGE=1 to the command worked for me:

sudo --user myOtherUser env DISPLAY=$DISPLAY NO_AT_BRIDGE=1 nautilus
Score:0
iq flag

It is just a warning but you can supress it, first create a script to wrap the dbus-launch command:

echo 'export NO_AT_BRIDGE=1' | sudo tee /usr/local/bin/dbus-launch-wrapper
echo '/usr/bin/dbus-launch "$@"' | sudo tee -a /usr/local/bin/dbus-launch-wrapper
sudo chmod +x /usr/local/bin/dbus-launch-wrapper

then modify your sudo command to use this wrapper script:

xhost +SI:localuser:myOtherUser
sudo --user myOtherUser env "DISPLAY=$DISPLAY" "PATH=/usr/local/bin:$PATH" nautilus
xhost -SI:localuser:myOtherUser
ssssstut avatar
mm flag
Sorry to ask again, after having created the wrapper script (file is existing: /usr/local/bin/dbus-launch-wrapper) and using the modified sudo command for the display the warning still is in my console. I think I'm using it somehow wrongly
ssssstut avatar
mm flag
I meant if I call the wrapper script with my sudo command script as parameter /usr/local/bin/dbus-launch-wrapper ./start-nauth.sh --> Warning in the console
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.