Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: gparted: Error executing command as another user: No authentication agent found.

  1. #1
    Join Date
    May 2010
    Beans
    195

    gparted: Error executing command as another user: No authentication agent found.

    Hi,
    I have two laptops with ubuntu mate 22.04 with the latest updates. On one gparted works as expected. On the other one it issues the error: "Error executing command as another user: No authentication agent found." I compared the relevant running processes with "ps -ealf | grep polk" yielding the identical output as seen below.

    4 S root 651 1 0 80 0 - 61199 - Nov13 ? 00:00:06 /usr/libexec/polkitd --no-debug
    0 S me 1619 1076 0 80 0 - 201097 do_pol Nov13 ? 00:00:00 /usr/lib/x86_64-linux-gnu/polkit-mate/polkit-mate-authentication-agent-1
    0 S me 1713620 1406124 0 80 0 - 2396 pipe_r 21:22 pts/2 00:00:00 grep --color=auto polk

    what is wrong here?
    thanks a lot, D-E

  2. #2
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,414
    Distro
    Xubuntu

    Re: gparted: Error executing command as another user: No authentication agent found.

    If you start gparted in the terminal do you get the same error?

  3. #3
    Join Date
    Jun 2014
    Beans
    7,369

    Re: gparted: Error executing command as another user: No authentication agent found.

    How do you start Gparted on both machines? From some GUI icon or from a terminal and as asked above, if you do it from a terminal, do you get any messages on screen? Does the user you are trying to run Gparted with have sudo privileges?
    Last edited by yancek; November 26th, 2023 at 11:00 AM.

  4. #4
    Join Date
    May 2010
    Beans
    195

    Re: gparted: Error executing command as another user: No authentication agent found.

    Thanks for the replies! When I start gparted from the terminal I get: "Error executing command as another user: No authentication agent found" When I start it from Menu / System Tools nothing happens. When I try to run it as sudo I receive the message: "No protocol specified

    (gpartedbin:2069424): Gtk-WARNING **: 23:02:35.977: cannot open display: :2" On the other machine it works correctly under all the above three conditions. Of note, when using sudo I get the message: "sudo gparted GParted 1.3.1 configuration --enable-libparted-dmraid --enable-online-resize libparted 3.4" but this does not seem to impact on gparted's normal execution!

  5. #5
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: gparted: Error executing command as another user: No authentication agent found.

    Are you using X11 or Wayland?
    Wayland forbids root graphical applications. Whilst there are workarounds for XWayland apps, you really cannot have XWayland-free graphical applications running as root
    Those workarounds are written into the startup script of GParted.

    Snip from file '/usr/sbin/gparted'
    Code:
            # Interim workaround to allow GParted run by root access to the
            # X11 display server under Wayland.  If configured with
            # './configure --enable-xhost-root', the xhost command is
            # available and root has not been granted access to the X11
            # display via xhost, then grant access.
            #
            ENABLE_XHOST_ROOT=no
            GRANTED_XHOST_ROOT=no
            if test "x$ENABLE_XHOST_ROOT" = 'xyes' && xhost 1> /dev/null 2>&1; then
                    if ! xhost | grep -qi 'SI:localuser:root$'; then
                            xhost +SI:localuser:root
                            GRANTED_XHOST_ROOT=yes
                    fi
            fi
            #
            # Run gparted as root.
            #
            pkexec --disable-internal-agent '/usr/sbin/gparted' "$@"
            status=$?
            #
            # Revoke root access to the X11 display, only if we granted it.
            #
            if test "x$GRANTED_XHOST_ROOT" = 'xyes'; then
                    xhost -SI:localuser:root
            fi
    Test by doing this first... Logout and logback into an X11 session, try to start GParted...

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  6. #6
    Join Date
    May 2010
    Beans
    195

    Re: gparted: Error executing command as another user: No authentication agent found.

    Thanx!!!!

    When running your script I get; "Error executing command as another user: No authentication agent found."

    when trying to find out which windows manager runs on my machine with wmctrl I get:

    wmctrl -m
    Name: Metacity (Marco)
    Class: N/A
    PID: N/A
    Window manager's "showing the desktop" mode: N/A

    but the output of this command is the same on the machine on which gparted runs correctly!

  7. #7
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: gparted: Error executing command as another user: No authentication agent found.

    That was not a script I wrote! That was only a snippet (piece) of the script that starts GParted... To show you, that by default, GParted is suppose to run on Xorg, not Wayland. Wayland has to be given a workaround to use an X11 screen to run on X11.

    Tell me what this returns:
    Code:
    printenv XDG_SESSION_TYPE XDG_SESSION_DESKTOP
    I had asked you to logout, and log back in, in an Xorg Session, instead of Wayland.

    When you logout, select your username. When the password dialog box appears, there will be a gear icon in the lower right. Select it. Select an Xorg session. Enter your password and go on...

    Tell me how "that" goes.
    Last edited by MAFoElffen; November 27th, 2023 at 05:54 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  8. #8
    Join Date
    May 2010
    Beans
    195

    Re: gparted: Error executing command as another user: No authentication agent found.

    On the laptop where gparted iworks and where it does not work I get the same output:

    printenv XDG_SESSION_TYPE XDG_SESSION_DESKTOP
    x11
    On both I was unable to localize a gear icon, which has probably to do with the fact that I use mate?

  9. #9
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: gparted: Error executing command as another user: No authentication agent found.

    Show this"
    Code:
    grep . /etc/X11/default-display-manager

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  10. #10
    Join Date
    May 2010
    Beans
    195

    Re: gparted: Error executing command as another user: No authentication agent found.

    On the PC gparted does not work:
    grep . /etc/X11/default-display-manager
    /usr/sbin/lightdm

    I get the same on another laptop running Ubuntu 20.04.06 (I do not have the other one at hand) where gparted works!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •