Update to zensu has side effects

The zensu update to 0.3-2 destroyed the ability to open Thunar as Root and Firewall configuration (GUFW). I downgraded to 0.3-1 and it works again. I did the downgrade in terminal and I was asked to put on Ignore, which I answered “Yes”. Strange that Pamac shows version 0.3-2 is installed.

Edit: I read Pamac wrong, it is indeed showing 0.3-1 version, Darn old eyes…

That makes no sense as all that changed was merging this PR from @linux-aarhus:

Do you have yad or zenity installed (or both)?

zenity is installed, yad is not. Thunar open as root and GUFW are set as follows:

gksu dbus-run-session thunar

zensu /usr/sbin/gufw-pkexec

No - you are mistaken - as @Yochanan already pointed out.

The only change made to zensu was these lines

elif [ -e /usr/bin/zenity ] then;
	PASSWD="$(zenity --password --title =Authentication)"
else
	echo "Dependency not available.\n Please install at least one of: spacefm, kdialog, yad, zenity"

IF the additional check for zenity did in fact break your usage - it is revealing a flaw in how you are using the utility.


Your usage

is revealing lack of understanding for the processes involved and it looks like they are a result of a lucky guess on how to achieve the deprecated and discouraged actions of running graphical application as root.

gksu has been deprecated for years - use pkexec is the way forward.

  1. when zensu is installed gksu is a symlink to zensu
  2. the gui to ufw is automatically authorized through pkexec (gufw-pkexec)

If you must launch thunar as root then launch it using pkexec

pkexec thunar

Note that not all applications can be launched this way as it requires the presence of a polikit rule for the application.

These links are to the archived forum FAQ

2 Likes

Thanks for the links. I allowed the upgrade to zensu 0.3-2. I have read the above and will initiate thunar root through terminal. No big deal there.
sudo thunar works, but pkexec thunar throws up the following:

 pkexec thunar                                                                                                                       [1]
thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY

Unable to init server: Could not connect: Connection refused

(thunar:11236): Gtk-WARNING **: 07:46:59.235: cannot open display: 

Is there any solution to the d-bus error?. I do have dbus-x11 installed here.

This happens to work:
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar

I cannot get the Firewall Configuration launcher in whisker menu to launch GUFW. In terminal sudo gufw-pkexec works. Is there a way to get the launcher to work? I had seen an older post which involved modifying /usr/bin/ gufw and gufw-pkexec, but it seems like the fixes mentioned have been implemented.

bleck. please stop 'sudo file-manger’ing.

as to gufw … is it broken again ? or still?

Does this work?

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gufw-pkexec

*(old thread: GUFW Firewall not opening - #6 by cscs)

1 Like

Yes the above works, but the launcher does not work with that command. pkexec thunar or pkexec thunar %f throw up the error listed above, however, when I issue
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY thunar %d Thunar opens properly. Is there a way to fix it so pkexec works without env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ?

it works on my system - check you have a polkit daemon running.

Screenshot

image

polkit service is running:

systemctl status polkit.service                                                                                                        
● polkit.service - Authorization Manager
     Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
     Active: active (running) since Fri 2021-10-22 07:09:26 EDT; 2h 44min ago
       Docs: man:polkit(8)
   Main PID: 1333 (polkitd)
      Tasks: 12 (limit: 9371)
     Memory: 19.5M
        CPU: 1.275s
     CGroup: /system.slice/polkit.service
             └─1333 /usr/lib/polkit-1/polkitd --no-debug

Oct 22 08:05:41 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain TEMPORARY authoriz>
Oct 22 08:06:52 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:07:07 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:07:50 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:08:08 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:13:24 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:14:23 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:14:58 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 08:17:41 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza>
Oct 22 09:37:01 Dell15R polkitd[1333]: Operator of unix-session:2 successfully authenticated as unix-user:jrichard to gain ONE-SHOT authoriza

Then the auth screen comes up:

Then I get this:

~ >>> pkexec thunar                                                                                                                          
thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY

Unable to init server: Could not connect: Connection refused

(thunar:42986): Gtk-WARNING **: 09:55:37.706: cannot open display:

I don’t know - all I know is that it work on my end

Summary

creating an alias in .zshrc has fixed the pkexec thunar issue for me.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.