FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 12-04-2011, 07:07 PM
Erik Blankinship
 
Default .desktop and permissions for using usb?

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
 
Old 12-05-2011, 07:23 AM
Nelson Manuel Marques
 
Default .desktop and permissions for using usb?

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
 
Old 12-05-2011, 03:56 PM
Simone Caronni
 
Default .desktop and permissions for using usb?

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).



--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 12-05-2011, 08:21 PM
Erik Blankinship
 
Default .desktop and permissions for using usb?

Thank you for your feedback and suggestions to prompt the user for their password with a visual sudo tool.
Fortunately, it looks like I can bypass sudo requirements, for this project, if my rpm can install two files (one is a .sh) into*/etc/udev/

Is the right way to do this using %files in my spec?
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 12-06-2011, 06:41 AM
Simone Caronni
 
Default .desktop and permissions for using usb?

In /etc/udev you should only have rules.

Try what you think is right and then check all rpms with the "rpmlint" commands, it will print most of the things you could do or not inside packages.
It's a great tool to learn.


2011/12/5 Erik Blankinship <erikb@mediamods.com>

Thank you for your feedback and suggestions to prompt the user for their password with a visual sudo tool.
Fortunately, it looks like I can bypass sudo requirements, for this project, if my rpm can install two files (one is a .sh) into*/etc/udev/


Is the right way to do this using %files in my spec?

--

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).



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

Thread Tools




All times are GMT. The time now is 11:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org