0

I have installed CentOS 8 and there is no beesu, or gksu package. I have also tried to install some Fedora rpm packages of beesu, but without success. Previously I used CentOS 7 and I had a desktop shortcut for Root terminal like this:

[Desktop Entry]
Version=1.0
Type=Application
Exec=beesu exo-open --launch TerminalEmulator
Icon=gksu-root-terminal
StartupNotify=true
Terminal=false
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
Name=Terminal Emulator
Comment=Use the command line

What should I have instead?

muru
  • 69,900
  • 13
  • 192
  • 292

1 Answers1

1

In CentOS 8, and also in Debian 10, you can use polkit for this purpose. Instead of using beesu, use pkexec - in graphical mode, it's behavior is the same: it asks for a password before launching the program.

Create custom policy file /usr/share/polkit-1/actions/custom.policy like this:

<policyconfig>
  <vendor>Custom</vendor>

  <action id="exo-open">
    <description>Run as root</description>
    <message>Authentication is required to run as root.</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/exo-open</annotate>
    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
  </action>

  <!-- another actions -->

</policyconfig>

Then update your desktop shortcut for Root terminal like this:

[Desktop Entry]
Version=1.0
Type=Application
Exec=pkexec exo-open --launch TerminalEmulator
Icon=gksu-root-terminal
StartupNotify=true
Terminal=false
Categories=Utility;X-XFCE;X-Xfce-Toplevel;
OnlyShowIn=XFCE;
Name=Terminal Emulator
Comment=Use the command line
Path=
muru
  • 69,900
  • 13
  • 192
  • 292