Results 1 to 7 of 7

Thread: use sudo instead of xdg-su for YaST

  1. #1

    Default use sudo instead of xdg-su for YaST

    by default whenever we launch YaST it uses xdg-su. I am using i3 and it is very annoying to have the password prompt to be kept open when using YaST. Also, I want to disable the password prompt, which I have done in sudoers for sudo.

    Cheers

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,574
    Blog Entries
    3

    Default Re: use sudo instead of xdg-su for YaST

    You can already use "sudo" for the "ncurses" version of Yast (command line "yast" or "yast2 --ncurses").

    If you want to use "sudo" for the GUI version of Yast, then you need to have $DISPLAY available. There's actually a setting in the "sudoers" file where you can add DISPLAY to the list of exported variables. You might also need XAUTHORITY and perhaps some others.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3

    Default Re: use sudo instead of xdg-su for YaST

    I know a little late but it may be useful in the future.

    This can be done in two ways:

    Visudo or PolicyKit
    https://vinzv.de/en/opensuse-with-sudo-but-convenient/

    or

    install libgnomesu (sudo zypper install libgnomesu)

    then add the following line to your ~/.bashrc or ~/.profile file

    export DESKTOP_SESSION=gnome (or xfce)

    The first example only works with Yast Manager.
    The second works using xdg-su, so you can run any Yast module.

    I use TW with I3-gaps and rofi.
    I found myself a little bit to figure out
    how to use xdg-su to make a graphic password prompt work

  4. #4

    Default Re: use sudo instead of xdg-su for YaST

    Is there a solution to this for tiling window managers? I have used the generic desktop installation for Tumbleweed and use both i3 and qtile but xdg-su is defaulting to xterm for authorization and then stays open after input.

    I have installed gnomesu which I would prefer to use but the solutions here do not appear to work. Am I missing something simple?

    Cheers

  5. #5

    Default Re: use sudo instead of xdg-su for YaST

    Could not work it out so went with the non elegant solution.

    I just ended up replacing xdg-su with gnomesu in the usr/share/applications directory in any desktop file using it:-

    Code:
    grep -rl 'xdg-su' ./ | xargs sed -i 's/xdg-su/gnomesu/g'
    At least now I get the behavior I want.

    "Is speaking to oneself the first sign of madness?"

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,059
    Blog Entries
    15

    Default Re: use sudo instead of xdg-su for YaST

    Quote Originally Posted by Lighters73 View Post
    Could not work it out so went with the non elegant solution.

    I just ended up replacing xdg-su with gnomesu in the usr/share/applications directory in any desktop file using it:-

    Code:
    grep -rl 'xdg-su' ./ | xargs sed -i 's/xdg-su/gnomesu/g'
    At least now I get the behavior I want.

    "Is speaking to oneself the first sign of madness?"
    Hi
    A strange solution, next update will overwrite...?

    Even in GNOME, gnomesu isn't used, for YaST2 (org.opensuse.YaST.desktop) it's `/usr/bin/xdg-su -c /sbin/yast2`...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7

    Default Re: use sudo instead of xdg-su for YaST

    Quote Originally Posted by malcolmlewis;[URL="tel:3075924"
    3075924[/URL]]Hi
    A strange solution, next update will overwrite...?

    Even in GNOME, gnomesu isn't used, for YaST2 (org.opensuse.YaST.desktop) it's `/usr/bin/xdg-su -c /sbin/yast2`...
    Agreed Malcolm, but I could not find a solution to xdg-su defaulting to using xterm on the tiling window managers hence my strange solution 😊

Posting Permissions

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