Hello,

same as the precedent mail, don't know if it's what you are requesting but maybe you can look at "consolehelper".

You place your binary in /usr/sbin and link to it in /usr/bin with consolehelper to have a graphical prompt for the root password upon execution.

For example (bat from bacula package):

[slaanesh@3zpc0560 ~]$ ls -al /usr/bin/bat /usr/sbin/bat
lrwxrwxrwx. 1 root root      13  5 dic 15.18 /usr/bin/bat -> consolehelper
-rwxr-xr-x. 1 root root 1376520  5 dic 15.13 /usr/sbin/bat

[slaanesh@3zpc0560 ~]$ cat /etc/security/console.apps/bat
USER=root
PROGRAM=/usr/sbin/bat
SESSION=true
FALLBACK=true

[slaanesh@3zpc0560 ~]$ cat /etc/pam.d/bat
#%PAM-1.0
auth       sufficient   pam_rootok.so
auth       sufficient   pam_timestamp.so
auth       include      system-auth
session    optional     pam_xauth.so
session    optional     pam_timestamp.so
account    required     pam_permit.so


Regards,
--Simone


On 5 December 2011 09:23, Nelson Manuel Marques <nelson-m-marques@ext.ptinovacao.pt> wrote:

Hi,

I'm not sure this is the answer you are looking for, but, _if_ you
require "root" permissions for your application to work, one of the
possible was would be to use one of the existing wrappers to start your
application from the .desktop file. I'm not sure which one is used by
Fedora, but I was a bit fond of 'xdg-su' in another distribution I
regularly use. To use with xdg-su (a part of xdg-utils ??) would be
something like (in the desktop file):

Exec: xdg-su -c "/usr/bin/app"

This would ask the user for root password when launching the
application. Though I suspect you are looking for something else.

NM

On Sun, 2011-12-04 at 15:07 -0500, Erik Blankinship wrote:
> Could someone please point me to where/how to grant my python
> application, installed with a .desktop file into gnome, permission to
> talk to certain devices on USB?
>
>
> When I run the application from the command line with sudo, usb
> communication works, but when I run from the gnome application menu,
> no luck.
>
>
> What is the best practice for granting these types of permissions when
> an application is installed and launched with a .desktop file?
>
>
> Thanks

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging



--
You cannot discover new oceans unless you have the courage to lose sight of the shore (R. W. Emerson).