How to use gparted as NOPASSWD

Hi all!
I tried to use the sudoers option as I can do on debian and all other linux distros, but doesn’t work on opensuse. How can I do? Please anyone know how to run, e.g., gparted without password by my own user only?

Famous problem description …

Explain what you did, show how you run your program, what errors you get.

I did exactly I do normally on Debian and there it works.
/etc/sudoers:
username ALL=(ALL) NOPASSWD:/usr/bin/gparted
Then: $ sudo gparted
Error: (gpartedbin:5731): Gtk-WARNING **: 12:15:43.790: cannot open display:

By default sudo on (open)SUSE does not preserve $DISPLAY and $XAUTHORITY. You should add them to the env_keep list.

You can not expect from people here that they know how that is. So you better explain. Still better, when doing things on openSUSE, do it the openSUSE way.

When I, using KDE, want to start a GUI process (am I correct assuming that Gparted is a GUI program?), I would use kdesu .

SOLVED: file /etc/sudoers:
username ALL=(ALL) NOPASSWD: /usr/bin/gparted

file /etc/environment:
export DISPLAY=:0

file $HOME/.bashrc
xhost +

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