You are not logged in.



  • "panzar" is male
  • "panzar" started this thread

Posts: 86

Location: Skovde, Sweden.

  • Send private message


Wednesday, May 12th 2004, 9:21am

How to use kdesu in a proper way?


My application (netGo) is pretty meaningless without root-permissions, so I would like to use "kdesu" to start it.
But my question is how to use it in a proper way? Ofcourse, it's possible to some kind of bash-hack or an alias, but I intend to distribute the program so a proper solution is needed.
In what way is it done with the apps in KDE which use kdesu? Or in which way do you solve it for your own programs?



This post has been edited 1 times, last edit by "panzar" (May 12th 2004, 9:22am)


Friday, December 3rd 2010, 8:14pm

Re: How to use kdesu in a proper way?


KDE usually invokes kdesu from the application link when needed, the other way it's to create a bash to do it, there is no other posible solution!

If you want to distribute your application, you should distribute a .desktop file along with it, which looks like this:

[Desktop Entry]
Name=Rare Viewer
Comment=The best viewer for rare!
TryExec=kdesu rareviewer
Exec=kdesu rareviewer

Where rareviewer is your application. Note the TryExec and Exec entries, they invoke your application after kdesu. If your application is linked to /usr/bin directory, and the icon of your choice is in the standar /usr/share/applications/icons/default folder, this .desktop file will execute your application with root permissions from anywhere it's located.