電子發票Turnkey 3 無法在ARM cpu上執行UI介面-解決方式

Turnkey 3 linux版本,裡面的javafx並未支援aarch64 cpu的元件,原本的javafx 11版也未有可用的元件,所以可以直接把javafx 更新至17.07 LTS版本,支援jdk11 ,再向上就無法使用jdk11開啟了。

Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /home/yku/.openjfx/cache/11-ea/libprism_es2.so: /home/yku/.openjfx/cache/11-ea/libprism_es2.so: 無法開啟共用物件: 沒有此一檔案或目錄 (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)
java.lang.UnsatisfiedLinkError: /home/yku/.openjfx/cache/11-ea/libprism_es2.so: /home/yku/.openjfx/cache/11-ea/libprism_es2.so: 無法開啟共用物件: 沒有此一檔案或目錄 (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
	at java.base/java.lang.Runtime.load0(Runtime.java:768)
	at java.base/java.lang.System.load(System.java:1837)
	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
	at javafx.graphics/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:52)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:829)

可以建一個maven專案來下載需要的元件,其它classifier不使用的話會下載windows平台的元件,使用<classifier>linux</classifier>會下載AMD平台的linux元件,<classifier>linux-aarch64</classifier>就可以下載支援arm cpu的元件了,可由C:\Users\users\.m2\repository\org\openjfx找到需要的元件。

Read More

docker xrdp遠端桌面

在docker裡安裝rdp,這裡有二個範例,一個是ubuntu為範本製作的,另一個使用rockylinux為基底,基本上可使用注音及倉頡輸入法、中文字型及firefox browser。

catyku/UbuntuXRDP: with chinese input ime and firefox (github.com)

catyku/RockyLinux9XRdpDocker: RockyLinux 9 install xrdp to docker (github.com)

rockylinux (centos)為基底的image,很多UI應用程式都可以使用yum 直接安裝。

而以ubuntu為基底的image,因為ubuntu本身UI應用程式都需要使用snap都支持,安裝上就相對比較麻煩。

docker run -d --name containerName -p 3389:3389 catyku/ubuntu-xrdp:22.04 createUser password rootYesNo
docker run -d --name containerName -p 3389:3389 catyku/rockylinuxrdp createUser password rootYesNo

之後就可以使用遠端桌面連入docker裡了

ubuntu 22.04 安裝clamav防毒軟體

當在使用 Ubuntu 22.04 時,可能需要安裝 ClamAV 來檢查系統中是否有病毒和惡意軟體。在本篇文章中,將介紹如何安裝 ClamAV,以保護 Linux 系統免受惡意軟體和病毒的侵害。

  • 首先,打開終端terminal機並更新系統。請輸入以下命令:
sudo apt update && sudo apt upgrade
  • 接下來,輸入以下命令以安裝 ClamAV:
sudo apt install clamav clamav-daemon -y 
  • 安裝完成後,可以執行以下命令來更新 ClamAV 的病毒定義庫:
sudo freshclam
  • 接下來,可以使用以下命令來掃描您的系統:
sudo clamscan -r /path/to/folder
  • 如果希望 ClamAV 在系統啟動時自動運行,請使用以下命令:
sudo systemctl enable clamav-daemon

這將自動啟用 ClamAV 並在系統啟動時運行。