Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java6: When are BROWSE and MAIL actions supported on Linux?

Reply
Thread Tools

Java6: When are BROWSE and MAIL actions supported on Linux?

 
 
Bernd Eggink
Guest
Posts: n/a
 
      12-31-2008
Does anybody know what exactly has to be present on Linux systems to
make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.) return
true? There appears to be no documentation on this. What I figured out
so far is that the 'gconf' package is required, and that the information
is kept in ~/.gconf/desktop/gnome/url-handlers/*.
On one of my systems, however, the JRE says BROWSE isn't supported
although gconf ist installed. So some other thing must be missing.

Thanks for any hints,
Bernd

--
Bernd Eggink
http://sudrala.de
 
Reply With Quote
 
 
 
 
Lars Enderin
Guest
Posts: n/a
 
      12-31-2008
Bernd Eggink wrote:
> Does anybody know what exactly has to be present on Linux systems to
> make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.) return
> true? There appears to be no documentation on this. What I figured out
> so far is that the 'gconf' package is required, and that the information
> is kept in ~/.gconf/desktop/gnome/url-handlers/*.
> On one of my systems, however, the JRE says BROWSE isn't supported
> although gconf ist installed. So some other thing must be missing.
>


In my Ubuntu installation, I have

/sda3/home/enderin/.gconf/desktop/gnome/url-handlers:
used 32 available 77515304
drwx------ 8 enderin enderin 4096 2008-08-08 12:03 .
drwx------ 11 enderin enderin 4096 2008-11-23 18:03 ..
drwx------ 2 enderin enderin 4096 2008-10-26 01:17 about
-rw------- 1 enderin enderin 0 2008-07-10 21:54 %gconf.xml
drwx------ 2 enderin enderin 4096 2008-10-26 01:17 http
drwx------ 2 enderin enderin 4096 2008-10-26 01:17 https
drwx------ 2 enderin enderin 4096 2008-07-10 21:54 mailto
drwx------ 2 enderin enderin 4096 2008-12-31 12:47 rtsp
drwx------ 2 enderin enderin 4096 2008-10-26 01:17 unknown

In the http directory, I find %gconf.xml, with the contents:
<?xml version="1.0"?>
<gconf>
<entry name="needs_terminal" mtime="1217950670" type="bool"
value="false">
</entry>
<entry name="command" mtime="1218185892" type="string">
<stringvalue>firefox -new-tab &quot;%s&quot;</stringvalue>
</entry>
</gconf>

I tried the desktop demo application from
http://java.sun.com/developer/techni...6/desktop_api/,
which worked well on my computer.
 
Reply With Quote
 
 
 
 
Bernd Eggink
Guest
Posts: n/a
 
      12-31-2008
Lars Enderin schrieb:
> Bernd Eggink wrote:
>> Does anybody know what exactly has to be present on Linux systems to
>> make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.)
>> return true? There appears to be no documentation on this. What I
>> figured out so far is that the 'gconf' package is required, and that
>> the information is kept in ~/.gconf/desktop/gnome/url-handlers/*.
>> On one of my systems, however, the JRE says BROWSE isn't supported
>> although gconf ist installed. So some other thing must be missing.
>>

>
> In my Ubuntu installation, I have
>
> /sda3/home/enderin/.gconf/desktop/gnome/url-handlers:
> used 32 available 77515304
> drwx------ 8 enderin enderin 4096 2008-08-08 12:03 .
> drwx------ 11 enderin enderin 4096 2008-11-23 18:03 ..
> drwx------ 2 enderin enderin 4096 2008-10-26 01:17 about
> -rw------- 1 enderin enderin 0 2008-07-10 21:54 %gconf.xml
> drwx------ 2 enderin enderin 4096 2008-10-26 01:17 http
> drwx------ 2 enderin enderin 4096 2008-10-26 01:17 https
> drwx------ 2 enderin enderin 4096 2008-07-10 21:54 mailto
> drwx------ 2 enderin enderin 4096 2008-12-31 12:47 rtsp
> drwx------ 2 enderin enderin 4096 2008-10-26 01:17 unknown
>
> In the http directory, I find %gconf.xml, with the contents:
> <?xml version="1.0"?>
> <gconf>
> <entry name="needs_terminal" mtime="1217950670" type="bool"
> value="false">
> </entry>
> <entry name="command" mtime="1218185892" type="string">
> <stringvalue>firefox -new-tab &quot;%s&quot;</stringvalue>
> </entry>
> </gconf>


I have all this on the system I mentioned, but nevertheless it doesn't
work. It works on two other systems which have a similar configuration,
but other (additional) libraries installed. The question is, which of
the several hundred libraries is the crucial one; or better: Where is a
documentation that clearly defines the prerequisites JRE 6 expects on Linux?

Bernd

--
Bernd Eggink
http://sudrala.de
 
Reply With Quote
 
Bernd Eggink
Guest
Posts: n/a
 
      12-31-2008
Bernd Eggink schrieb:
> Does anybody know what exactly has to be present on Linux systems to
> make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.) return
> true? There appears to be no documentation on this. What I figured out
> so far is that the 'gconf' package is required, and that the information
> is kept in ~/.gconf/desktop/gnome/url-handlers/*.
> On one of my systems, however, the JRE says BROWSE isn't supported
> although gconf ist installed. So some other thing must be missing.


OK, I found it, by trial and error. The 'avahi' library from gnome was
missing.

I also found this "technical article":

http://java.sun.com/developer/techni...6/desktop_api/

which says: "On the Solaris Operating System and the Linux platform,
this API is dependent on Gnome libraries". That's it. Not an overly
technical article, IMHO...

Bernd

--
Bernd Eggink
http://sudrala.de
 
Reply With Quote
 
Arved Sandstrom
Guest
Posts: n/a
 
      01-01-2009
On Wed, 31 Dec 2008 19:04:21 +0100, Bernd Eggink wrote:

> Bernd Eggink schrieb:
>> Does anybody know what exactly has to be present on Linux systems to
>> make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.) return
>> true? There appears to be no documentation on this. What I figured out
>> so far is that the 'gconf' package is required, and that the
>> information is kept in ~/.gconf/desktop/gnome/url-handlers/*. On one of
>> my systems, however, the JRE says BROWSE isn't supported although gconf
>> ist installed. So some other thing must be missing.

>
> OK, I found it, by trial and error. The 'avahi' library from gnome was
> missing.
>
> I also found this "technical article":
>
> http://java.sun.com/developer/techni...sktop/javase6/

desktop_api/
>
> which says: "On the Solaris Operating System and the Linux platform,
> this API is dependent on Gnome libraries". That's it. Not an overly
> technical article, IMHO...
>
> Bernd


I have to agree that the docs are bad...well, non-existent. If I run a
simple program to tell me what the Desktop API thinks is supported on my
Ubuntu box, I find that BROWSE, MAIL and OPEN are OK, and PRINT and EDIT
are not.

I also know that *if* gconf is involved, the Desktop API is not
necessarily looking at '~/.gconf/desktop/gnome/url-handlers/*', because I
don't have that last directory at all. Another gentleman suggested it had
something to do with the %gconf.xml files...maybe on his machine it does
- on mine every one of those files is 0-length. I also saw a suggestion
that it had to do with specific directories in '~/.gconf/desktop/gnome/
applications', like for 'browser'...perhaps, but the only directory I
have in that path is for 'window_manager'. In fact, my application
references appear to be confined to '~/.gconf/apps'.

So who knows what the Desktop API looks for. You can't (readily) get the
source for JDK 6 anymore to investigate, and while I have the source for
JDK 7, and did take a quick peek in the native code, I'm not going to
waste my time trying to find out by code inspection what Sun does.

All I know is, I have gedit, and if this API can't pick that up for EDIT,
the boys had better go back to the drawing boards...

Sun cannot expect people to adopt this API if there are such problems,
and such lack of documentation. How tough would it be to inform people,
that in order to enable option PRINT on Linux, all you need to do is
this? Not very...presumably Sun already knows what their code is looking
for.

AHS
 
Reply With Quote
 
Bernd Eggink
Guest
Posts: n/a
 
      01-01-2009
Arved Sandstrom schrieb:
> On Wed, 31 Dec 2008 19:04:21 +0100, Bernd Eggink wrote:
>
>> Bernd Eggink schrieb:
>>> Does anybody know what exactly has to be present on Linux systems to
>>> make Desktop.isSupported(Desktop.Action.BROWSE) (or MAIL, resp.) return
>>> true? There appears to be no documentation on this. What I figured out
>>> so far is that the 'gconf' package is required, and that the
>>> information is kept in ~/.gconf/desktop/gnome/url-handlers/*. On one of
>>> my systems, however, the JRE says BROWSE isn't supported although gconf
>>> ist installed. So some other thing must be missing.

>> OK, I found it, by trial and error. The 'avahi' library from gnome was
>> missing.
>>
>> I also found this "technical article":
>>
>> http://java.sun.com/developer/techni...sktop/javase6/

> desktop_api/
>> which says: "On the Solaris Operating System and the Linux platform,
>> this API is dependent on Gnome libraries". That's it. Not an overly
>> technical article, IMHO...
>>
>> Bernd

>
> I have to agree that the docs are bad...well, non-existent. If I run a
> simple program to tell me what the Desktop API thinks is supported on my
> Ubuntu box, I find that BROWSE, MAIL and OPEN are OK, and PRINT and EDIT
> are not.
>
> I also know that *if* gconf is involved, the Desktop API is not
> necessarily looking at '~/.gconf/desktop/gnome/url-handlers/*', because I
> don't have that last directory at all. Another gentleman suggested it had
> something to do with the %gconf.xml files...maybe on his machine it does
> - on mine every one of those files is 0-length. I also saw a suggestion
> that it had to do with specific directories in '~/.gconf/desktop/gnome/
> applications', like for 'browser'...perhaps, but the only directory I
> have in that path is for 'window_manager'. In fact, my application
> references appear to be confined to '~/.gconf/apps'.


On my system (Crux, non-gnome) it clearly depends on the files in
~/.gconf/desktop/gnome/url-handlers/{http,https,mailto,...}, not on the
apps branch. Each of these directories contains a file %gconf.xml
containing the relevant information. For example, the content of the
http file is

--------------------------------------------------------------------
<?xml version="1.0"?>
<gconf>
<entry name="needs_terminal" mtime="1219420034" type="bool"
value="false">
</entry>
<entry name="enabled" mtime="1219420034" type="bool" value="true">
</entry>
<entry name="command" mtime="1230481811" type="string">
<stringvalue>/usr/bin/firefox &quot;%s&quot;</stringvalue>
</entry>
</gconf>
--------------------------------------------------------------------

The files are generated / changed by using gconftool-2 (not very
comfortable), by setting the default browser in the system's control
center (if there is such a thing), or by telling the browser to be the
standard one.

I wrote a little shell script which wraps the necessary gconftool-2
invocations for browser and mail, and can send it to anybody who is
interested.

Regards,
Bernd

--
Bernd Eggink
http://sudrala.de
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Discovering actions supported by a JTextArea dalamb@cs.queensu.ca Java 2 02-09-2011 04:58 PM
Assigning value to Browse button without using browse button in HTML balakrishnan.dinesh@gmail.com Javascript 0 10-12-2007 06:45 AM
Are 'Client Callbacks' in asp.net 2.0 supported in multiple browse =?Utf-8?B?QU5lZWxpbWE=?= ASP .Net 1 10-01-2007 05:01 PM
Internet Explorer 6 Can't Browse, Other Programs Browse Fine... Ike Computer Support 1 08-02-2005 09:20 PM
twisted mail server - SMTP AUTH extension not supported Mark Carter Python 2 12-30-2003 10:16 PM



Advertisments