i use latest thunar from git. when i want run thunar with root privilege i always run: gksudo thunar or pkexec thunar in both cases i have the same error: gksudo thunar (thunar:6536): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed (thunar:6536): thunar-CRITICAL **: Name 'org.xfce.FileManager' lost on the message dbus, exiting. ThunarThumbnailer: failed to create proxy: Błąd podczas wywoływania wiersza poleceń „dbus-launch --autolaunch=0f33a3b91c4f4d018354b970613911f1 --binary-syntax --close-stderr”: Proces potomny został zakończony z kodem 1
pkxec show more info pkexec thunar Thunar: Failed to initialize Xfconf: Error spawning command line ?dbus-launch --autolaunch=0f33a3b91c4f4d018354b970613911f1 --binary-syntax --close-stderr?: Child process exited with code 1 (thunar:6636): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed (thunar:6636): thunar-CRITICAL **: Name 'org.xfce.FileManager' lost on the message dbus, exiting. ThunarThumbnailer: failed to create proxy: Błąd podczas wywoływania wiersza poleceń „dbus-launch --autolaunch=0f33a3b91c4f4d018354b970613911f1 --binary-syntax --close-stderr”: Proces potomny został zakończony z kodem 1
What works for me is: gksu dbus-launch thunar
Created attachment 7342 an ugly workaround I'm not sure if just skipping the name registration is the correct fix.
on manjaro board they advised to install dbus-X11 it also fix the problem so now i dont know is this a bug in thunar or maybe only not installed all needed package?
This behavior of exit if fails to register the dbus name was introduced recently and the use case for root user was overlooked, not really a bug yet since we haven't released a development version of Thunar. Let's see if it's possible to just launch sudo thunar as before and avoid the use of dbus-launch and similar approaches.
Andre Miranda referenced this bugreport in commit b1af81ca05f0ef0310b1eddac410c2650ef89305 Allow Thunar run with sudo as before (Bug #13884) https://git.xfce.org/xfce/thunar/commit?id=b1af81ca05f0ef0310b1eddac410c2650ef89305
I've pushed the fix to master, but I'll let this bug open just in case it causes any trouble.
So far haven't noticed any issue and no one complained, closing..
Hi, Please re open this bug because it's not solved at all, details on Arch up to date : Installed packages : thunar 1.8.9-2 dbus 1.12.16-2 python-dbus 1.2.8-2 python-dbus-common polkit 0.116-2 aur/xfce-polkit 0.3-1 Result of pkexec thunar : Thunar: Failed to initialize Xfconf: Error spawning command line ?dbus-launch --autolaunch=a69a0452d6474191bf0feb1dbf827eb3 --binary-syntax --close-stderr?: Child process exited with code 1 (thunar:12173): thunar-WARNING **: 08:20:38.410: Nom « org.xfce.FileManager » perdu sur le message dbus. (thunar:12173): thunar-WARNING **: 08:20:38.410: Nom « org.freedesktop.FileManager1 » perdu sur le message dbus. ThunarThumbnailer: failed to create proxy: Erreur lors de la génération de la ligne de commande « dbus-launch --autolaunch=a69a0452d6474191bf0feb1dbf827eb3 --binary-syntax --close-stderr » : Le processus fils s’est terminé avec le code 1 It open in a reduced window, doesn't generate any thumbnails and doesn't save any settings. I'm using startx without any DM installed. Let me know if you need more informations. Thanks.
The fix mentioned here was reverted by the one from Bug #15149. My dbus knowledge is far from great, so I don't know how apps running as root should handle name registration. FWIW I see a similar problem when running pkexec nemo, and nautilus won't even launch (cannot open display).
I see... Maybe a good opportunity to ask directly on https://gitlab.freedesktop.org/dbus/dbus and mention this behavior ?
(In reply to guy.b from comment #9) > It open in a reduced window, doesn't generate any thumbnails and doesn't > save any settings. It happens because xfconf, xfsettingsd and tumbler are not registered to root's dbus session. They also won't work with pkexec, sudo or gksudo. Like I said, Nemo and Nautilus also can't work with dbus in this setting. (In reply to guy.b from comment #11) > Maybe a good opportunity to ask directly on > https://gitlab.freedesktop.org/dbus/dbus and mention this behavior ? I tried my best to look at their documentation whether this use case is supported and searched for any app that supports it, no success. For this reason I can't really file a bug for something I'm not sure it's a defect. If you can volunteer to ask about this, please go ahead. If you also know of any app that is able to register a dbus name when run via pkexec also let us know.
Hi, As far as I remember Thunar was able to perfectly deal with pkexec/dbus, saving settings etc. Suddenly got broken by an update, fixed and by an update, and broken since by another (Thunar or dbus ?) update. At that time I was under Antergos os which is now dead. Unfortunately I can't find my bug report from that time because the forum is now closed. Anyway, I will try to get the info from dbus as soon as I can and post the result. Yes, I know an app that deals without any pkexec/dbus errors, it's Geany the file editor.
(In reply to guy.b from comment #13) > Hi, > > As far as I remember Thunar was able to perfectly deal with pkexec/dbus, > saving settings etc. Suddenly got broken by an update, fixed and by an > update, and broken since by another (Thunar or dbus ?) update. That was probably Thunar 1.6.x, it uses dbus-glib instead of GDBus[1]. > Yes, I know an app that deals without any pkexec/dbus errors, it's Geany the > file editor. Doesn't work for me: pkexec geany Unable to init server: Could not connect: Connection refused Geany: cannot open display 1 - https://git.xfce.org/xfce/thunar/commit/?id=4ce7c64
(In reply to Andre Miranda from comment #14) > Doesn't work for me: > pkexec geany > Unable to init server: Could not connect: Connection refused > Geany: cannot open display > > 1 - https://git.xfce.org/xfce/thunar/commit/?id=4ce7c64 pkexec geany probably doesn't work because you need to create the file /usr/share/polkit-1/actions/org.freedesktop.geany.policy (here on Archlinux) which contains : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd"> <policyconfig> <vendor>geany</vendor> <vendor_url>https://www.geany.org/</vendor_url> <icon_name>geany</icon_name> <action id="org.freedesktop.policykit.pkexec.geany"> <description>Run "geany"</description> <message>Authentication is required to run geany</message> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/geany</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig>