This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 12 - Pages: 1 - Last Post: 20-Jul-2017 09:41 Last Post By: davidekholm
karlmistelberger

Posts: 614
Registered: 5-Dec-2013
jAlbum 14.0.6 preview still annoying
Posted: 13-Jul-2017 21:53
 
  Click to reply to this thread Reply
Preview with the internal browser enabled now works perfectly for the local album and the published album. :-)

But two issues are remaining:

  • Open in external browser invokes text editor Kwrite which is not the default browser. I double checked by Open local album folder and clicking index.html which indeed invokes default Firefox. Thus Open in external browser should also invoke Firefox.

  • Upon Upload jAlbum opens the correct URL of the published album, but uses Chrome instead of default browser Firefox.
RobM

Posts: 3,206
Registered: 4-Aug-2006
Re: jAlbum 14.0.6 preview still annoying
Posted: 14-Jul-2017 23:09   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
  • Open in external browser invokes text editor Kwrite which is not the default browser. I double checked by Open local album folder and clicking index.html which indeed invokes default Firefox. Thus Open in external browser should also invoke Firefox.

  • Upon Upload jAlbum opens the correct URL of the published album, but uses Chrome instead of default browser Firefox.
Try doing a core update to get 14.0.7 as that works correctly for me on Mac OS
jGromit

Posts: 7,953
Registered: 31-Jan-2006
Re: jAlbum 14.0.6 preview still annoying
Posted: 14-Jul-2017 23:12   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I've never known jAlbum to open anything other than my default browser, neither on Win10 nor on macOS.
RobM

Posts: 3,206
Registered: 4-Aug-2006
Re: jAlbum 14.0.6 preview still annoying
Posted: 15-Jul-2017 01:07   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
I've never known jAlbum to open anything other than my default browser, neither on Win10 nor on macOS.
Well, it can, but only if you set the application association for all .HTML documents to a text editor.
karlmistelberger

Posts: 614
Registered: 5-Dec-2013
Re: jAlbum 14.0.6 preview still annoying
Posted: 15-Jul-2017 08:29   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
jGromit wrote:
I've never known jAlbum to open anything other than my default browser, neither on Win10 nor on macOS.
Well, it can, but only if you set the application association for all .HTML documents to a text editor.

Well, I am running dozens of applications using current openSUSE Tumbleweed 20170712 with KDE-Plasma 5.10.3 and all of them are aware of the default browser and the html file association.

jAlbum 14.0.7 is different:

  • It ignores switching the default browser.
  • Associating .html with Firefox is honored, but that works only for some of the items. Preview > Local > Open in external browser opens indeed Firefox. Preview > Online still opens the web page with Chrome.
  • Help pages have another htmlh file association which is set to Firefox too. But jAlbum Help does not care and opens them in Chrome.
  • Upon upload jAlbum opens the online album in Chrome.

This inconsistency of jAlbum is really annoying and should be fixed.

P.S. Some bsh for testing class desktop and method browse would be helpful.

Edited by: karlmistelberger on 15-Jul-2017 08:30
davidekholm

Posts: 3,774
Registered: 18-Oct-2002
Re: jAlbum 14.0.6 preview still annoying
Posted: 15-Jul-2017 09:30   in response to: karlmistelberger in response to: karlmistelberger
Helpful
  Click to reply to this thread Reply
As a debug step, please report whether executing the following in jAlbum's system console opens in the right browser or not (replace URLs with those you test with):
Desktop.getDesktop().browse(new URI("http://jalbum.net"));
Also, please perform the same tests using this code (replace the URL with your URLs):
edu.stanford.ejalbert.BrowserLauncher.openURL("http://jalbum.net");
RobM

Posts: 3,206
Registered: 4-Aug-2006
Re: jAlbum 14.0.6 preview still annoying
Posted: 15-Jul-2017 09:32   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
Well, I am running dozens of applications using current openSUSE Tumbleweed 20170712 with KDE-Plasma 5.10.3 and all of them are aware of the default browser and the html file association.

jAlbum 14.0.7 is different:

  • It ignores switching the default browser.
  • Associating .html with Firefox is honored, but that works only for some of the items. Preview > Local > Open in external browser opens indeed Firefox. Preview > Online still opens the web page with Chrome.
  • Help pages have another htmlh file association which is set to Firefox too. But jAlbum Help does not care and opens them in Chrome.
  • Upon upload jAlbum opens the online album in Chrome.
So, assuming all the help pages you mention are on servers, the issue seems to be with remote pages, not local ones?
karlmistelberger

Posts: 614
Registered: 5-Dec-2013
Re: jAlbum 14.0.6 preview still annoying
Posted: 15-Jul-2017 11:16   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
As a debug step, please report whether executing the following in jAlbum's system console opens in the right browser or not (replace URLs with those you test with):
Desktop.getDesktop().browse(new URI("http://jalbum.net"));
Also, please perform the same tests using this code (replace the URL with your URLs):
edu.stanford.ejalbert.BrowserLauncher.openURL("http://jalbum.net");

jAlbum 14.0.7 system console running BeanShell (BeanShell Engine)
This section captures debug prints sent to System.out and System.err
The top section evaluates expressions.
Press Strg+E to evaluate an expression. (Evaluates selected text if selection is active)
You have access to the basic jAlbum implicit objects such as engine and window
 
Sample expressions:
4*(3+2); // Basic calculations
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) System.out.println(ao); // Iterate over selected objects
window.messageBox("You can interact with any Java object");
Desktop.getDesktop().browse(new URI("http://jalbum.net"));==> null
edu.stanford.ejalbert.BrowserLauncher.openURL("http://jalbum.net");==> null


Nothing happens with jAlbum console.

Installed bsh2 and tried the same. This starts Chrome which opens the URL properly.

"I found the solution and thought I'd share it here as I didn't find the answer anywhere on the Web": here

While most applications look at .config/mimeapps.list Java looks at .local/share/applications/mimeapps.list Thus KDE settings are ignored in Java. Adding them to .local/share/applications/mimeapps.list fixes this.

So this is not a jAlbum issue but a Java issue.

Edited by: karlmistelberger on 15-Jul-2017 15:11

The above is bogus. :-)

First I deleted all the obsolete versions of mimeapps.list and kept the now relevant .config/mimeapps.list only. Double checking revealed that the real culprit is a missing setting for x-scheme-handler This can be fixed by running the following commands:
karl@hofkirchen:~> gio mime x-scheme-handler/http firefox.desktop
karl@hofkirchen:~> gio mime x-scheme-handler/https firefox.desktop
karl@hofkirchen:~> 
That's all needed for fixing the problem with jAlbum default browser.

Edited by: karlmistelberger on 18-Jul-2017 07:48
davidekholm

Posts: 3,774
Registered: 18-Oct-2002
Re: jAlbum 14.0.6 preview still annoying
Posted: 19-Jul-2017 18:25   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
The purpose with the code tests I wanted you to perform is to hear what browser did open as a result of executing these statements. Was one right and the other wrong for instance?
karlmistelberger

Posts: 614
Registered: 5-Dec-2013
Re: jAlbum 14.0.6 preview still annoying
Posted: 19-Jul-2017 20:56   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
The purpose with the code tests I wanted you to perform is to hear what browser did open as a result of executing these statements. Was one right and the other wrong for instance?

I pasted both statements into jAlbum console and nothing happened, because I erroneously chose the lower window. :-(

Then I pasted into bsh2 and that opened Chrome, which was the wrong browser:
Desktop.getDesktop().browse(new URI("http://jalbum.net"));
Then I fixed KDE by executing the following commands in bash:
gio mime x-scheme-handler/http firefox.desktop
gio mime x-scheme-handler/https firefox.desktop
The above two commands installed the missing x-scheme-handler/http and x-scheme-handler/https. I retried
Desktop.getDesktop().browse(new URI("http://jalbum.net"));
which now opened Firefox, the default browser.

erlangen:~ # gio mime x-scheme-handler/http
Default application for “x-scheme-handler/http”: firefox.desktop
Registered applications:
        firefox.desktop
        chromium-browser.desktop
Recommended applications:
        firefox.desktop
        chromium-browser.desktop
erlangen:~ # 
davidekholm

Posts: 3,774
Registered: 18-Oct-2002
Re: jAlbum 14.0.6 preview still annoying
Posted: 19-Jul-2017 21:47   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
Good. What about the BrowserLauncher script?
karlmistelberger

Posts: 614
Registered: 5-Dec-2013
Re: jAlbum 14.0.6 preview still annoying
Posted: 19-Jul-2017 21:53   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Good. What about the BrowserLauncher script?
edu.stanford.ejalbert.BrowserLauncher.openURL("http://jalbum.net");
This also opens the default browser. Both work correctly only when a x-scheme-handler/http exists.
davidekholm

Posts: 3,774
Registered: 18-Oct-2002
Re: jAlbum 14.0.6 preview still annoying
Posted: 20-Jul-2017 09:40   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
davidekholm wrote:
Good. What about the BrowserLauncher script?
edu.stanford.ejalbert.BrowserLauncher.openURL("http://jalbum.net");
This also opens the default browser. Both work correctly only when a x-scheme-handler/http exists.

Ok, good that the behavior of those two is the same anyway. Thanks for examining what it takes to make it work. Perhaps you wish to file a bug report to Oracle so they use the correct mechanism to determine the right browser?
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums