kde4 apps won't run with su on suse 11.0 ?

Hi,

I am currently running on suse 11.0 and I experiment several issues trying to run kde4 apps as su.
I run on kde4 as normal user, then I open a Konsole and log as root with su.
I notiecd that I can not run kde4 apps in this way. For eg, kate, konsole, kopete won’t show up but i noticed that a dedicated thread for these applications is running.
The most interesting is that these issues don’t seem to happen whith non kde4 apps launched by su (kaffeine, gtk apps and do on…).

Did you experiment the same problem as me ?
Could you tell me if there is a workaround to fix this problem ?

Thank you,
Regards.

Yes they do not launch, while I’m not 100% sure why I think it to protect the user. Of course it’s easy to run them with admin rights, start krunner (alt-F2) then type kdesu [program].

Example: kdesu dolphin

Create an icon to a command/program to run. Then right-click icon, icon properties, look for the command, choose advanced options, run as another user, choose ‘root’, save, done. When you click the item now, it will give you a password dialog.

Same goes for running a program from somebody else’s account

Thank you for your answers ! :slight_smile:
I’m glad to see that i’m not the only one to have this issue.
Thank you for your tips, I will use them as workaround.

By the way you ever have a future solution to get kde4 app as su running from konsole, please let me know .

Regards.

It is something to do with X and kde4 somehow.

If you try to start it with sudo you will get the result of

cannont connect to X server.

Well it asks for the password first and says that.

Even if you go su it will start the program like kate, it just never displays it. So it could run in the background for a bit if it wasn’t killed.

This is under 10.3 KDE4 I get this result so it is likely the same with 11.0

Yes gregosmith, I have exactly the same behaviour as you.
Although the kdesu method works.
Could it be considered as a bug, and so should it be reported with bugzilla ?

Thx

It wouldn’t hurt for someone to submit it. I took a look at kde4 in the first page of the bug list and didnt’ see anything similar to this listed.

Running DE-based apps under “su” in a terminal within a DE isn’t the “proper” way to do it. You will run the risk of bunging up your X lock files, and you can’t necessarily ensure the behavior of the app running. Leave su for running typical CLI (non-GUI) based stuff.

KDE has kdesu, GNOME has gksu for launching DE-based apps under root. These keep everything clean with regards to the underlying bits and pieces of the system, and is the preferred way to do it.

Opening a ticket will likely not lead very far. Gregosmith was on the right track with his comment, but it isn’t an issue necessarily between X and KDE4. It’s an issue with su and X, and it’s not really an issue, it’s just the reality of how su and X operate.

Better to just launch apps with kdesu app from Konsole.

Just my 2c…

Cheers,
KV

OK, i had the habits of using su to run GUI applications, but I will use kdesu instead. :slight_smile:
Thx four your feedbacks.

Regards.

the KDE team seems to have noticed that trying to run an app in admin mode is a bit harder then it should be. So they are adding an admin button for 4.2.

I was having the same issue too, but as was mentioned here it isn’t so much of an issue.

Thanks for the kdesu mention, it seems like a better way to do it anyway.

Interesting idea for sure.

it will be a good way for KDE4 newbies to run programs this way in case they are unaware of kdesu as a command.

I’ve had success using “su -” instead of just plain “su”. But of course, its always better to use kdesu.

Just installed 11.2 and discovered what I thought was a bug but it seems bash just needs the proper syntex/command

Instead of “su” type “su -” and kwrite, kate whatever should open as super user mode.

“su -” gives you also root’s environment–eg the $PATH variable—with “su -” you ARE root.

explanation given by pixellany in the Lunixquestions dot org forums

Merry Christmas Everyone
Ken

And you should not use su but kdesu in a KDE environment as posted in the ONE AND A HALF YEAR OLD THREAD.