Archi Forum

Archi => General Archi Discussion => Topic started by: Xiaoqi on February 24, 2021, 21:36:19 PM

Title: How to have Archi running on Chromebook (ChromeOS)?
Post by: Xiaoqi on February 24, 2021, 21:36:19 PM
Hello all,

I noticed one old topic had mentioned ChromeOS issue of running Archi, I'd like to have a try now on my Google Pixel Book.

I downloaded the latest Archi 4.8.1 linux version from our website to Chromebook, extracted to one Archi folder, when running using my normal user, I got below error:

~/Archi$ ./Archi
xkbcommon: ERROR: Key "<CAPS>" added to modifier map for multiple modifiers; Using Mod3, ignoring Lock

Then using sudo, can see the full error:

Archi:
JVM terminated. Exit code=13
/home/[usernmae]/Archi/jre/bin/java
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area=@user.home/.archi4
-Dosgi.configuration.area=@user.home/.archi4/.config
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%user.home%/.archi4/dropins
-Declipse.p2.data.area=@config.dir/.p2
-jar /home/[usernmae]/Archi/plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/[usernmae]/Archi/Archi
-name Archi
--launcher.library /home/[usernmae]/Archi/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.0.v20200915-1442/eclipse_11201.so
-startup /home/[usernmae]/Archi/plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar
--launcher.overrideVmargs
-exitdata 1801b
-cleanConfig
-vm /home/[usernmae]/Archi/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area=@user.home/.archi4
-Dosgi.configuration.area=@user.home/.archi4/.config
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%user.home%/.archi4/dropins
-Declipse.p2.data.area=@config.dir/.p2
-jar /home/[usernmae]/Archi/plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar

Does anyone faced the same issue?

Looks like this is due to JVM and eclipse, before I find a way to manually adding any eclipse components, would like to hear some opinion and recommendation from forum here first.

Thanks a lot
Xiaoqi
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: Xiaoqi on February 24, 2021, 22:19:34 PM
Got answer from Phil at Github site: https://github.com/archimatetool/archi/issues/709, thanks
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: Xiaoqi on March 12, 2021, 21:36:09 PM
Still hope to have Archi running on my Chromebook as this is one of my primary device daily, spent further time to search solution, and here would like to share some progress so far.

As Phil mentioned, our current Archi is not formally support ChromeOS, so what I've tried is to try in the Linux subsystem within ChromeOS, which is so-called still the kind of Debian-based "simulating".

I have one another Ubuntu 20.04 LTS machine, with Archi Linux version running OK, so I use that for comparison.

Firstly, download the Archi linux package to Chromebook, you need to share your Chrome file folder with Linux within setting, then you can browse each other. Copy the package to Linux home (~/), extract that, then you get one folder like ~/Archi.

Within the folder, you need to add executing permission to file Archi via "sudo chmod +x Archi", then you can go to Linux terminal to run in the folder like "./Archi", no doubt, you'll get error message as I posted before.

Look at the first line: "jvm terminated. exit code=13".

Pointed from Phil already, that's means "Cannot run Eclipse".

I've then installed Eclipse, and when checking Java version, I've following:

openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode, sharing)

Checking the Archi.ini, one line as "-Dosgi.requiredJavaVersion=11", this is actually met.

Then comparing the file structure between ChromeOS and Linux, found after successfully opened Archi in Linux, in my home directory, there's one hidden folder called "~./archi4" created with following sub contents:

- (folder) .config
- (folder) jasper-reports
- (folder) .metadata
- models.xml

but as on Chromebook cannot run successfully, this hidden folder is not there.

Try to copy this folder from Ubuntu Linux and paste to my Chromebook's Linux home directory. But looks like no change.

Then I installed IntelliJ IDE, which I got one "eclipse" folder with subfolder "java-2020-12" in my home on ChromeOS. Check the "eclipse.ini", found first lines parameter within "openFile" as:

openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
-vmargs
-Dosgi.requiredJavaVersion=11

While those "openFile" setting in "Archi.ini" is:

openFile
-vmargs
-Dosgi.requiredJavaVersion=11

Inserted the two line:
-vm
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
to Archi.ini

Then looks like it can be executed, although some error still in Terminal.

The screenshot is what I see after Archi opened, the display is not fully smooth, but that can be my next step task to investigate.

Anyone has better experience for this topic? Thanks.

Regards, Xiaoqi
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: Jean-Baptiste Sarrodie on March 13, 2021, 10:35:18 AM
Hi,

First, I suspect that non intel based chromebooks will never run Archi (would require a rebuild on an ARM stack otherwise).

I did launched a previous version of Archi (4.6 if I remember well) on an intel based chromebook and its linux environment. It did work but was not really usable because of the graphical environment still been ChromeOS despite been ran inside linux. Newer versions requires revent version of almost everything (JRE, GTK...) and are not going to work unless you're prepared to fix yourself the issues inside the eclipse framework and you really know what you are doing.

Quote
Then comparing the file structure between ChromeOS and Linux, found after successfully opened Archi in Linux, in my home directory, there's one hidden folder called "~./archi4" created with following sub contents:

That's normal and you didn't had to copy it: this is created after Archi's first launch. In short, that's you Archi user profile folder.

Quote
Then I installed IntelliJ IDE, which I got one "eclipse" folder with subfolder "java-2020-12" in my home on ChromeOS. Check the "eclipse.ini", found first lines parameter within "openFile" as:

openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
-vmargs
-Dosgi.requiredJavaVersion=11

While those "openFile" setting in "Archi.ini" is:

openFile
-vmargs
-Dosgi.requiredJavaVersion=11

Inserted the two line:
-vm
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin
to Archi.ini

By doing so in fact you've bypassed the JRE shipped with Archi to use the native one on your chromebook's linux environment.

The best way to have Archi work (but not sure it can) is to first try to have the eclipse IDE working on the same machine. If the eclipse IDE work, then Archi will work. Check the exact version of eclipse used to build Archi on the Archi's wiki developers page and try to have it run (but again, don't expect too much as even if you succeed, it might stop working with the next version because of changes at the eclipse framework level, so this will be a neverending story).

Regards,

JB
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: Xiaoqi on March 20, 2021, 11:31:10 AM
Thanks a lot JB.

Searched further, and found in https://www.ethicalhackx.com/fix-gtk-warning-cannot-open-display/ that talking how to fix the exact error that I met "gtk-warning: cannot open display: :1".

Just tried one single command: xhost +

Which the result is: access control disabled, clients can connect from any host

And then I can open Archi with: sudo ./Archi

Display is now look perfect in my ChromeBook! As attached.

Will further testing.

Regards, Xiaoqi
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: johmut on January 13, 2024, 14:10:19 PM
An old thread, I know but perhaps still relevant?

I just successfully launched Archi 5.2.0 on my Intel-based Chromebook Linux container.

>xhost +    did the trick indeed
./Archi/sh  launched the UI that is working fine AFAICS

Getting a few errors and warnings on the console:
WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
(Archi:10635): Gtk-CRITICAL **: 15:01:13.875: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(Archi:10635): Gtk-WARNING **: 15:02:15.272: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

Not sure if anything can be done?

Kind Regards,
jomut
Title: Re: How to have Archi running on Chromebook (ChromeOS)?
Post by: Phil Beauvoir on January 13, 2024, 20:36:20 PM
Quote from: johmut on January 13, 2024, 14:10:19 PMGetting a few errors and warnings on the console:
WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
(Archi:10635): Gtk-CRITICAL **: 15:01:13.875: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(Archi:10635): Gtk-WARNING **: 15:02:15.272: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkToggleButton)

You can safely ignore those warnings. It's standard stuff.