Re: [sabayon] Trying to perform privileged operations from the sessionswindow
- From: "Sayamindu Dasgupta" <sayamindu randomink org>
- To: "Hot GNOME love for admins" <sabayon-list gnome org>
- Subject: Re: [sabayon] Trying to perform privileged operations from the sessionswindow
- Date: Thu, 28 Jun 2007 23:06:41 +0530
On 6/27/07, Sayamindu Dasgupta <sayamindu randomink org> wrote:
Hi all,
I have added an extra option, Edit->Desktop Links to the profile
editor window, which allows the administrator to configure desktop
links (both mandatory and non mandatory) for a particular profile.
However, the problem is that I am not being able to write to the
global desktop link directory since the process running the profile
editor window does not have root privileges.
I tried the seteuid() method for doing the write operations, but it
did not work and directed me to http://www.gtk.org/setuid.html
Is there any way to do privileged operations from the editor window ?
One ugly workaround would be to save the global links in some
temporary directory and when the save button is pressed (__do_save()
in sessionwindow.py), copy the links in the actual directory.
Is there any better way ?
Replying to myself here....
After some preliminary discussions on IRC with Federico, it seems that
as far as Sabayon created profiles are considered, it would be best to
keep a consistent naming system for the global desktop link directory
eg: $(sysconfdir)/desktop-profiles/desktop-items/{profile-name}
This would also take care of distributing these links if the requirement arises.
So, the current idea is to:
1. Have a Edit->Desktop Links menu item in the Sabayon profile editor
window which would fire up the desktop links editing tool (the
directory will be predefined as
$(sysconfdir)/desktop-profiles/desktop-items/{profile-name} as soon as
the user clicks on the menu item.
2. The link editing tool would have a check box to enable/disable the
global (mandatory) desktop links.
Does this sound like a sensible plan ?
Warm regards,
Sayamindu
--
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]