On Wed, 2010-03-03 at 22:24 -0600, Shawn Walker wrote:
> On 03/ 3/10 10:17 PM, Harry Lu wrote:
> > On Wed, 2010-03-03 at 22:01 -0600, Shawn Walker wrote:
> >> Greetings,
> >>
> >> I was wondering if it was opensolaris-specific that the
> >> org.gnome.Nautilus dbus service doesn't accept "http" URIs for the
> >> "open_browser" command.  It won't accept them since "they're not a folder."
> >>
> >> Is there some other dbus-accessible service in GNOME that can be used to
> >> either ask FireFox to open a link, or to ask GNOME itself?
> >
> > I am not sure whether GNOME have such a D-Bus service, but at least you
> > could have the following options:
> 
> It does, something like:
> 
> org.opensolaris.Nautilus
> /Factory
> 
> SendMessage("open_browser", ("http://example.com/";, 0, 0, ""), time())
> 
> But when I do so, it just says "Location is not a folder" -- I was 
> expecting it to launch the associated HTTP application handler.
> 
> However, when looking at the mounts that it supports, it says "False" 
> for http, so that's why I asked if it was disabled for OpenSolaris 
> specifically.

OK, I saw what you want to achieve: an gksu'd application to launch an
URL under the original user, instead of under root.

It will be quite hard, I think. Even nautilus could support "http", it
is a session service for the original user, so the gksu'd application
could not connect to it and use it.  You can have a try to ask nautilus
to launch a folder in the gksu'd application, it will start a nautilus
under root, instead of the original user.

Some hacky workaround might be to use gksu (or sudo)'s --user option. So
get the original user ID first, then call 
"gksu --user $original_userid gnome-open $url"

Thanks,
Harry


> Cheers,

-- 

Harry.Lu at Sun.COM
OpenSolaris Desktop Group, Sun Microsystems
Phone ext. 82870


Reply via email to