Ultima attività 1 month ago

zyppe's Avatar zyppe ha revisionato questo gist 1 month ago. Vai alla revisione

1 file changed, 24 insertions

startlxde_debian.sh(file creato)

@@ -0,0 +1,24 @@
1 + #!/data/data/com.termux/files/usr/bin/bash
2 +
3 + # Kill open X11 processes
4 + kill -9 $(pgrep -f "termux.x11") 2>/dev/null
5 +
6 + # Prepare termux-x11 session
7 + export XDG_RUNTIME_DIR=${TMPDIR}
8 + termux-x11 :0 >/dev/null &
9 +
10 + # Wait a bit until termux-x11 gets started.
11 + sleep 3
12 +
13 + # Launch Termux X11 main activity
14 + am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity > /dev/null 2>&1
15 + sleep 1
16 +
17 + # Login in PRoot Environment. Do some initialization for PulseAudio, /tmp directory
18 + # and run LXDE as user droidmaster.
19 + # See also: https://github.com/termux/proot-distro
20 + # Argument -- acts as terminator of proot-distro login options processing.
21 + # All arguments behind it would not be treated as options of PRoot Distro.
22 + proot-distro login debian --shared-tmp -- /bin/bash -c 'export PULSE_SERVER=127.0.0.1 && export XDG_RUNTIME_DIR=${TMPDIR} && su - droidmaster -c "env DISPLAY=:0 startlxde"'
23 +
24 + exit 0
Più nuovi Più vecchi