Closed himslm01 closed 1 year ago
Are you running Ubuntu under X11 or Wayland?
How would I tell?
\<EDIT> Google tells me to check this way:
$ loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}' x11
I think the default for Ubuntu is Wayland. You need to run Archi with export GDK_BACKEND=x11
as in the Archi-Ubuntu.sh
file included.
Do you have the "Hints" tab open or closed. Hints are stored in html files like the name in your screenshot.
Is it all tooltips? In the tree? On a diagram?
Thanks for the quick feedback.
The hints tab was closed. It was all tooltips, in the pallet, on the tree, on the diagram, etc.
Even though the command above suggested I was running under x11, changing my desktop shortcut to run the Archi-Ubuntu.sh
shell script appears to have fixed the issue for tooltips.
But since you mentioned the hints tab, if I have the hints tab open the same issue occurs - this time you can see the tooltip and the save
dialogue.
The Hints tab is displaying a local HTML page when you hover over the palette, or select a component in the Tree or in a diagram.
The Hints tab is basically an embedded WebKit browser. When it displays a hint it sets the embedded browser URL to something like file:///<pathto>/hintfile.html
This is standard practice for displaying a local file URL.
As to why it is opening a save dialog I have no idea. If you can offer any further clues that would be helpful, at this stage there's nothing I can change in Archi's code.
FWIW, I installed a fresh install of Ubuntu 22.0.4.1 and didn't see this issue. Perhaps different versions of Webkit? Configuration? Permissions?
This was a fresh install of Ubuntu 20.04 about a month ago, although the /home
partition was preserved from a previous install so $HOME/.local
and other places configuration is kept will have been preserved from previous years of running various Ubuntus.
I'm new to Archi, but I have never seen the issue - downloading instead of displaying web pages - in other Java based GUI apps.
I don't know where to find any config which might change how webkit behaves, but is this useful in any way?
$ dpkg -l|grep webkit
ii gir1.2-webkit2-4.0:amd64 2.36.6-0ubuntu0.22.04.1 amd64 Web content engine library for GTK - GObject introspection data
ii libwebkit2gtk-4.0-37:amd64 2.36.6-0ubuntu0.22.04.1 amd64 Web content engine library for GTK
I have the same webkit versions.
I start Ubuntu when logging in with the option Ubuntu on XOrg
available from the bottom right corner of the log-in screen. I tried Archi with this and using Wayland, with and without the Archi-Ubuntu.sh
script and all is OK.
Did you try with the Hints tab closed? It shouldn't trigger that dialog.
Another place where the internal webkit browser (it's an Eclipse SWT Browser component) is used is in the Tools -> Preview HTML Report
main menu item. Does this do the same thing when the preview report tab opens?
I think I may have found what's happening here, assuming this only happens with Hints files:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=534113
It concerns the mime type of the html file which may be reported as application/xhtml+xml
. The solution is to fix that mime type association (I don't know how).
Actually, the above may not be exactly correct. I was confusing Archi's help files (which use XHTML) with the Hints files which are normal HTML. But there may be a clue there. Might be worth checking mime types associations.
You could try this command:
file --mime-type <pathto>/business_actor.html
<pathto>
is the location of Archi's help plugin which is:
Archi/plugins/com.archimatetool.help_4.9.3.202203221030/hints
Currently:
With the hints tab closed and running the Archi-Ubuntu.sh
script I see no issues.
With the hints tab open and running the Archi-Ubuntu.sh
script I see this issue.
Tools -> Preview HTML Report
main menu item causes four save
dialogues to appear.
As far as I can see, no preview report tab opens.
Both the hints tab and the preview report use the webkit browser with a local url set to file:///path_to/somefile.html
So this means that webkit is not seeing these files as HTML files. Might be a mime type association as mentioned above.
With the hints tab closed and running the Archi-Ubuntu.sh script I see no issues.
I don't think using Archi-Ubuntu.sh
will make any difference. It's the Hints tab being open that causes this.
$ file --mime-type $HOME/Applications/Archi/plugins/com.archimatetool.help_4.9.3.202203221030/hints/business_actor.html
/home/mdsh/Applications/Archi/plugins/com.archimatetool.help_4.9.3.202203221030/hints/business_actor.html: text/html
Looking at the comments in https://bugs.eclipse.org/bugs/show_bug.cgi?id=534113 I traced the internal Eclipse WebKit code. It seems that a decision to either display the html file or show a download dialog is based solely on how the Eclipse code determines the mime type of the file which it queries from the system. As this issue has not been reported before it's likely that a WebKit config of mime types is different on your system. I don't know how to investigate that further.
I'll close this one as there's nothing we can change in the Archi code.
Version of Archi
v4.9.3
Archi Plug-ins
None
Operating System
GNU Linux Ubuntu 22.04.1 LTS
Expected Behaviour
Tooltips should pop-up when I hover over icons and objects
Actual Behaviour
A "save" window opens offering me to save the \<icon-type>.html page to disk.
Steps to Reproduce the Behaviour
There are no error logs and this happens with all .archimate files.