termux / x11-packages

A set of packages using X11 Windows System.
Other
550 stars 145 forks source link

xfce4: script startxfce4 'exec: xinit not found' #659

Closed mguinhos closed 2 years ago

mguinhos commented 2 years ago

Problem description

The startxfce4 script is not working, but xfce4-session works

What steps will reproduce the bug?

$ startxfce4
/data/data/com.termux/files/usr/bin/startxfce4: Starting X server
/data/data/com.termux/files/usr/bin/startxfce4: 122: exec: xinit: not found

What is the expected behavior?

No response

System information

termux-info:

Application version:
0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.org/apt/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
Android version:
11
Kernel build information:
Linux localhost 4.19.87-22307827 #1 SMP PREEMPT Wed Sep 8 10:55:38 KST 2021 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-N981B
mguinhos commented 2 years ago

It is a fresh termux install.

mguinhos commented 2 years ago

Also, neither xinit and startx are there... so strange

ghost commented 2 years ago

Termux does not use native xorg display server. so to start startxfce4. you must specify DISPLAY variable or use xfce4-session

startxfce4 is a script and it starts xorg server automatically if there's no x11 server was present. then launches xfce4-session if X was initialized https://github.com/xfce-mirror/xfce4-session/blob/c7586056fbc9f2696cea0585754dfe83172b1ba4/scripts/startxfce4.in#L91

if test "x$DISPLAY" = "x"
then
  echo "$0: Starting X server"
  prog=xinit

  if test ! "x$XDG_VTNR" = "x"; then
    SERVERRC="vt$XDG_VTNR $SERVERRC"
  fi
else
  echo "$0: X server already running on display $DISPLAY"
  prog=/bin/sh
fi
mguinhos commented 2 years ago

It was working before the last update, i think it should be patched for compatibility

ghost commented 2 years ago

that's probably because you set a DISPLAY variable. but i think i can sweep out any xinit references for termux compatibilty

mguinhos commented 2 years ago

It is a fresh install! I think the problem is really the script that i got with the package. So patching will solve

ghost commented 2 years ago

I just created a fix to prevent calling xinit when no display variable is set