11

I'm using pkexec / xhost to open a graphical file explorer for another user 'myOtherUser'

  • With Ubuntu 18.04 I was able to open a command shell by mouse right click 'Open Terminal'.
  • With Ubuntu 22.04 on a new machine however I get the follwing error when I use mouse right click context menu 'Open in Terminal': 'Failed to execute child process "dbus-launch"'

Script:

#!/bin/sh
xhost +SI:localuser:myOtherUser
pkexec --user myOtherUser env DISPLAY=$DISPLAY nautilus
xhost -SI:localuser:myOtherUser

log output

localuser:myOtherUser being added to access control list

(org.gnome.Nautilus:3429): dbind-WARNING **: 18:11:36.147: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus: Permission denied

(org.gnome.Nautilus:3429): libunity-CRITICAL **: 18:11:36.286: file unity-launcher.c: line 1638: unexpected error: Failed to execute child process “dbus-launch” (No such file or directory) (g-exec-error-quark, 8)

(org.gnome.Nautilus:3429): libunity-CRITICAL **: 18:11:36.286: unity_launcher_entry_dbus_impl_construct: assertion 'conn != NULL' failed

(org.gnome.Nautilus:3429): libunity-CRITICAL **: 18:11:36.288: unity-inspector.vala:96: Unable to connect to session bus: Failed to execute child process “dbus-launch” (No such file or directory)

(org.gnome.Nautilus:3429): dconf-WARNING **: 18:11:36.409: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)

(org.gnome.Nautilus:3429): dconf-WARNING **: 18:11:36.409: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)

(org.gnome.Nautilus:3429): LIBDBUSMENU-GLIB-WARNING **: 18:11:36.448: Unable to get session bus: Failed to execute child process “dbus-launch” (No such file or directory)

** (org.gnome.Nautilus:3429): CRITICAL **: 18:11:36.474: update_dbus_opened_locations: assertion 'dbus_object_path' failed

(org.gnome.Nautilus:3429): dconf-WARNING **: 18:11:36.475: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)

(org.gnome.Nautilus:3429): GLib-GIO-CRITICAL **: 18:11:36.513: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(org.gnome.Nautilus:3429): GLib-GIO-CRITICAL **: 18:11:36.513: g_dbus_proxy_get_cached_property: assertion 'G_IS_DBUS_PROXY (proxy)' failed Nautilus-Share-Message: 18:11:36.575: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)

(org.gnome.Nautilus:3429): dconf-WARNING **: 18:11:40.854: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory) Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Failed to execute child process “dbus-launch” (No such file or directory)

How can I fix this? Thank you for your help!

ssssstut
  • 667

1 Answers1

37

Installing dbus-launch (via sudo apt install dbus-x11) worked for me

Note pkexec --user myOtherUser env DISPLAY=$DISPLAY nautilus I changed to sudo --user myOtherUser env DISPLAY=$DISPLAY nautilus

ssssstut
  • 667