[15:53] <venugopal> I am using daemib which is launched using upstart initctl start command. From this daemon I am trying to launch firefox browser with user permission using command "sudo -u <username> xdg-open http://www.google.com"
[15:54] <venugopal> This launching in user mode and everything is fine  on ubuntu 11.04. But on ubuntu 10.04, 10.10 version it is still launching in root mode..  
[15:55] <venugopal> Can anyone tell if there is any patch available for these two lower versions..
[15:55] <venugopal> ?
[16:22] <venugopal> can anyone help me with this issue?
[16:44] <JanC> I'm not sure why you need a system job to launch Firefox?  (you probably can't even be sure that there is an X session with that user logged in at that moment?)
[17:15] <venugopal> JanC, This how my daemon works. It is responsible of displaying the basic UI and In this case I am sure that there is an X session with that user logged in..
[17:16] <venugopal> Since this is triggered from user input..
[17:17] <JanC> and the daemon can't run as the user?
[17:19] <JanC> actually, why not let the user process that starts the daemon also start the browser?
[17:20] <venugopal> no daemon can't run as user. since it needs root permissions.
[17:21] <venugopal> but from the daemon I want to launch the browser with user permissions as seperate process..
[17:27] <venugopal> JanC, Is there any way to get this working??
[17:27] <venugopal> But the samething is working finr on ubuntu 11.04 version..
[17:28] <JanC> so how does the user start the daemon?
[17:29] <venugopal> daemon is start by "initctl start" command
[17:30] <venugopal> *started
[17:30] <venugopal> from /etc/init/script
[17:30] <JanC> so why not make a script that runs "initctl start", waits until the daemon is started, then starts Firefox?
[17:32] <venugopal> actuall initctl start is called while installing my debian package in postinst script.
[17:32] <venugopal> firefox is started from daemon when user selects a button in UI displayed by daemon.
[17:33] <venugopal> so I have to launch the firefox from the daemon only.. 
[17:55] <venugopal> JanC, Any way to fix this?
[17:55] <JanC> ugh
[17:57] <JanC> venugopal: not sure what you are trying to do, but to me it sounds like you try doing things the wrong way...
[18:00] <venugopal> JanC, My daemon is started from init scripst using initctl command, responsible for displaying UI and depending on UI events it wants to launch the firefox with user permission using xdg-open command.
[18:01] <venugopal> Yes, wrong thing here is daemon shouldn't contain any UI.. But that's the way client has request us.. they don't want seperate app for UI.. so we don't other way. 
[18:02] <JanC> venugopal: tell them they are nuts  :P
[18:03] <JanC> actually, why does that daemon need root?
[18:04] <venugopal> It is an antivirus software and need root access to monitor the iptable details and monitor applications trying to access internet..  
[18:06] <venugopal> but the same logic is working fine on ubuntu 11.04 and only problem is with 10.04, 10.10 versions..
[18:28] <venugopal> JanC, Any pointers?
[18:31] <JanC> yes: use separate programs
[18:33] <JanC> BTW: running GUI apps from postinst scripts is *not done* (because there really is no way to do it properly)
[18:34] <JanC> for example, you don't know which user installed the package, so you can't know on who's display you have to show it
[18:36] <JanC> (if there is an X display at all)
[18:43] <venugopal> but I am sure on whos display I have to show the UI..