I am used to doing some jobs with root privilege sometimes, so I keep the root privilege with the command line sudo -i in the Konsole, but running some programs with graph user interface in Konsole is always error, what is a correct to do it without entering password so many times?
Read SDB:Login as root - openSUSE Wiki
I assume the kdesu is your friend according to your description.
The “I am used to” above is IMHO a bad argument for doing this.
many thanks
No, kdesu claims about could not connect to display if run Konsole with root. It runs only when Konsole are not in root, but it requires password multiple times if more than GUI applications get executed because kdesu forgets the password each time.
One mostly uses kdesu from the “execute Command” item of the main menu and does not start aseperate konsole for it.
How many GUI applications running under root do you need at the same time? For system maintenance you might need YaST (which can be started directly by an end-user from the GUI), File manager in system management mode, also from the main menu. Konsole (root) terminal, idem. Maybe an editor: kdesu kwrite /etc/fstab.
For most people that is already a dangerous combination of too many root applications open at the same time.
And how many times do you need one or more of these? Maybe only once a week while doing system maintenamce.
And of course it asks you for the root password. Not only should you be protected against any people using your open session, but more important, you should be protected against yourself. You should strongly made aware that you are now going to be dangerous to your system.
And how exactly do you “run Konsole with root”?
If you run Konsole as root, you don’t need kdesu any more anyway, you are already root.
Just running the corresponding command suffices then.
Btw, do not use “sudo -i” to switch to root, but use “su -” and you will be able to run graphical applications (as root, without sudo or kdesu).
Or just start “Terminal - Super User Mode” from the application menu, or switch to the “Root Shell” profile in Konsole (both do exactly the same, namely run a root shell with “su -”).
This time I have more thanks