You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

panzar

Trainee

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

Posts: 86

Location: Skovde, Sweden.

  • Send private message

1

Wednesday, May 12th 2004, 9:21am

How to use kdesu in a proper way?

Hi!

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?

Thanks,

Per

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


2

Friday, December 3rd 2010, 8:14pm

Re: How to use kdesu in a proper way?

Hi!

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]
Version=1.0
Type=Application
Name=Rare Viewer
Comment=The best viewer for rare!
TryExec=kdesu rareviewer
Exec=kdesu rareviewer
Icon=rarev

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.