phoenixbyrd / Termux_XFCE

438 stars 57 forks source link

Cannot start xfce, Java error - Looper Prepare not called #36

Closed licryle closed 5 months ago

licryle commented 6 months ago

Hi there, I get the following error when trying to run "start" from termux on a fresh successful installation of termux_xfce

java.lang.ExceptionInInitializerError at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:536) at com.termux.x11.Loader.main(Loader.java:24) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:402) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Can't create handler inside thread Thread[main,10,main] that has not called Looper.prepare() at com.termux.x11.CmdEntryPoint.createContext(CmdEntryPoint.java:180) at com.termux.x11.CmdEntryPoint.<clinit>(CmdEntryPoint.java:39) ... 5 more Caused by: java.lang.RuntimeException: Can't create handler inside thread Thread[main,10,main] that has not called Looper.prepare() at android.os.Handler.<init>(Handler.java:261) at android.app.ResourcesManager$1.<init>(ResourcesManager.java:153) at android.app.ResourcesManager.<init>(ResourcesManager.java:153) at android.app.ResourcesManager.getInstance(ResourcesManager.java:332) at android.app.ContextImpl.<init>(ContextImpl.java:3664) at android.app.ContextImpl.createSystemContext(ContextImpl.java:3465) at android.app.ActivityThread.getSystemContext(ActivityThread.java:3621) at com.termux.x11.CmdEntryPoint.createContext(CmdEntryPoint.java:178) ... 6 more xfce4-session: Cannot open display: . Type 'xfce4-session --help' for usage.

licryle commented 6 months ago

For me the solution was to update the termux-x11-nightly deb and apk directly from apt & https://github.com/termux/termux-x11/releases/tag/nightly .

Note that you'll want to remove the hold with: apt-mark unhold termux-x11-nightly before upgrading with pkg

phoenixbyrd commented 5 months ago

Hopefully this should be resolved now.