termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
2.12k stars 314 forks source link

unable to start termux x11 #151

Closed pawn343 closed 2 years ago

pawn343 commented 2 years ago

i've installed the latest Termux:X11 apk and deb files from the latest artefact and running pkg install x11-repo termux-x11 xwayland (the last 2 packages are my solution but still doesnt works) and executing the commands to start the service like export XDG_RUNTIME_DIR=${TMPDIR} and termux-x11 :1 &

but shown an error: Screenshot_2022-08-20-18-48-08-403_com.termux.jpg

note: ./x11 is script contains commands to start the X11 GUI service the whole errors is shown in screenshot

twaik commented 2 years ago

Duplicate #146

pawn343 commented 2 years ago

Duplicate #146

i see, is it a bug? and still not fixed yet?

twaik commented 2 years ago

Yes. It is already in TODO list.

twaik commented 2 years ago

Can you please check it again with the latest artifact?

pawn343 commented 2 years ago

Can you please check it again with the latest artifact?

yups its worked fine now :)

but got new error when i was trying to check for the other bug (no display and only a blank screen on x11 app when i exited from the x11 app) which is the new error is this error:

termux-x11
Loading shared library: /data/data/com.termux/files/usr/libexec/termux-x11/starter.apk!/lib/arm64-v8a/libx11-starter.so
$XDG_RUNTIME_DIR is unset.
Exporting default value (/data/data/com.termux/files/usr/tmp).
res = 0
Activity is started
Got getWaylandFD
{ParcelFileDescriptor: java.io.FileDescriptor@2a3cdbd}
Lorie requested fd
Got getLogFD
{ParcelFileDescriptor: java.io.FileDescriptor@59c5fb2}
Got finish request
App sent finishing command
Starting Xwayland
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

i closed the x11 app and then type termux-x11 and popup show Service was created, but in termux showed that error.

twaik commented 2 years ago

That is Xwayland error. You should erase $TMPDIR and then create it again

rm -rf $TMPDIR
mkdir -p $TMPDIR

And then force-stop com.termux application in Android settings.

pawn343 commented 2 years ago

so, am trying to test for the other bug which is "no display on x11 app when i closed the x11 app" but unfortunately got that error.

twaik commented 2 years ago

Can you please try again and post here new logs?

pawn343 commented 2 years ago

That is Xwayland error. You should erase $TMPDIR and then create it again

rm -rf $TMPDIR
mkdir -p $TMPDIR

And then force-stop com.termux application in Android settings.

ok now it worked again :) so i've to always remove the TMPDIR and recreate it and force-close then termux-x11 when i encountered that error?

i was trying to use x11 app for displaying proot-distro archlinux and its successful now :)

but what am really want to do is using GPU acceleration thru the x11 app is that possible? i saw vulkan-tools in apt upgrade, what is it? and btw how to resize the x11 app so that it doesnt looks small in my device? when i use XServer XSDL/VNC Client i can do that.

twaik commented 2 years ago

so i've to always remove the TMPDIR and recreate it and force-close then termux-x11 when i encountered that error?

I can explain why this happens and you will understand why I adviced this... Shortly. When Xwayland or any other Xserver starts it creates lockfile somewhere in $TMPDIR (do not remember file name), opens Unix socket in $TMPDIR/.X11-unix/X0 (for DISPLAY=:0) and one more socket on TCP port 6000 (for DISPLAY=:0). Usually those are being removed after finishing Xwayland/Xserver process, but sometimes something goes wrong and it does not happen. I do not know why but rm -rf $TMPDIR/ (to clean Unix socket and lock file) did not work for me, only rm -rf $TMPDIR; mkdir -p $TMPDIR. Cleaning TCP socket is a bit harder, even after killing Xwayland process it was unavailable, but I succeed to clean it by force-stopping com.termux.

i was trying to use x11 app for displaying proot-distro archlinux and its successful now :)

Nice.

but what am really want to do is using GPU acceleration thru the x11 app is that possible?

No. Prooted environment can not use Android components.

i saw vulkan-tools in apt upgrade, what is it?

Have no idea... Sorry.

and btw how to resize the x11 app so that it doesnt looks small in my device?

There is no way in current versions... But you can try to change scale in DE. You can see how to do this in KDE in Readme.md