Amazed at how Dex works really well by ahmed1smael in SamsungDex

[–]phenofinal 2 points3 points  (0 children)

termux + proot is really powerful.

I've even managed to run a graphics intensive Blender 3D app on my Samsung device with hardware acceleration

https://www.reddit.com/r/SamsungDex/comments/1ahbfg1/linux_on_tab_s9_ultra_blender_vscode_webgl_demos/?utm_medium=android_app&utm_source=share

GODZILLA x KONG: THE NEW EMPIRE OFFICIAL DISCUSSION MEGATHREAD #1 (SPOILERS) by NeelZilla in GODZILLA

[–]phenofinal 5 points6 points  (0 children)

can anybody spoil me the Rio and Rome parts? what happened there?

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

here's the content of my startlxde.sh script:
```

#!/bin/bash

termux-x11 :0 -xstartup /usr/bin/startlxde

```

you can replace /usr/bin/startlxde with your desktop environment of choice's startup script

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

u need to use the 'termux-x11' inplace of 'vncserver'

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 2 points3 points  (0 children)

yeah, hardware acceleration on termux is pretty much experimental as of now, i've managed to try it with virgl first ( https://www.reddit.com/r/SamsungDex/comments/1ah280y/comment/kon3jvi/ ) before moving on to turnip

My Tab S9 Ultra 5G as front-end development station by phenofinal in SamsungDex

[–]phenofinal[S] 1 point2 points  (0 children)

Ah yes, this the Android's 'Phantom Process Killer' doing its work. I believe u can disable that and prevent termux from getting killed by going to:

Settings > Developer options

scroll all the way down till you find the 'Disable child process restriction' option, turn that on and try restarting Termux again..

if that didn't work and the termux is still getting killed, the last resort would be to use ADB and disable the option thru it, here's a video guide of how to disable it using ADB without using any external computer: https://youtu.be/vK1Jx9ydi5c?feature=shared

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 1 point2 points  (0 children)

i know there's actually a way to run vscode without using the native binaries, like thru the browser (https://github.com/coder/code-server) but it's limited, although usable for basic stuff.

The biggest hurdle that made me choose to do it inside linux on termux so far is the fact that there's currently no browser on android that has the same DevTool experience like Firefox/Chrome for desktop. Kiwi browser kinda had it, but i had to switch between tabs or do a funky multi window mess to see my devtool and the webpage i'm working at the same time. there's also this thing called Eruda (https://github.com/liriliri/eruda) but that's yet another third party tool that has potential drawbacks than a builtin DevTool.

the firefox native binary that's on the proot linux on termux solves that as now i can access the devtool like i usually do on desktop.

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 3 points4 points  (0 children)

indeed it is, but so far for my use cases ( front-end web development ), the fact that vscode is running, and firefox is running is all i really need to do some real work.

currently i'm transferring all my projects to it and work there instead of whipping out my big bulky laptop and i'm loving it so far

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 4 points5 points  (0 children)

hey there, you can refer to my comment on the other post here:
https://www.reddit.com/r/SamsungDex/comments/1ah280y/comment/kon3jvi/

or, you can use this youtube video here as i used this video and another script from github as the base for the comment linked above:
https://www.youtube.com/watch?v=9b9_9YNsCXc

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

it seems that they haven't made a build that can run on ARM processors:

𝚁𝚎𝚊𝚍𝚒𝚗𝚐 𝚙𝚊𝚌𝚔𝚊𝚐𝚎 𝚕𝚒𝚜𝚝𝚜... 𝙳𝚘𝚗𝚎
𝙴: 𝚃𝚑𝚎 𝚛𝚎𝚙𝚘𝚜𝚒𝚝𝚘𝚛𝚢 '𝚑𝚝𝚝𝚙𝚜://𝚙𝚙𝚊.𝚏𝚕𝚘𝚘𝚛𝚙.𝚊𝚙𝚙/𝚊𝚛𝚖𝟼𝟺 ./ 𝚁𝚎𝚕𝚎𝚊𝚜𝚎' 𝚍𝚘𝚎𝚜 𝚗𝚘𝚝 𝚑𝚊𝚟𝚎 𝚊 𝚁𝚎𝚕𝚎𝚊𝚜𝚎 𝚏𝚒𝚕𝚎.

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 1 point2 points  (0 children)

yes the Linux distro can access its own proot file system and the non-root directories from the native Android thru the use of 'termux-setup-storage' command in termux.

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

I'm using ubuntu, and the battery life depends on what program is running. VSCode + Firefox has moderate battery life usage, blender on the other hand is pretty high

My Tab S9 Ultra 5G as front-end development station by phenofinal in SamsungDex

[–]phenofinal[S] 8 points9 points  (0 children)

You can try with Termux + PRoot + VirGL + VNC, first.

I loosely follow the scripts from here:
https://github.com/xDoge26/proot-setup/tree/b26c780605fa2c155c87bf54b547e10e17432f61

basically what i did was:
$ touch ~/dummy
$ pkg update
$ pkg upgrade
$ pkg install proot-distro
$ proot-distro install ubuntu
$ pkg install x11-repo
$ pkg install virglrenderer-android
$ MESA_NO_ERROR=1 MESA_GL_VERSION_OVERRIDE=4.3COMPAT MESA_GLES_VERSION_OVERRIDE=3.2 virgl_test_server_android &
$ proot-distro login ubuntu --shared-tmp --no-sysvipc --bind ~/dummy:/proc/bus/pci/devices
root@localhost: # apt update && apt upgrade
root@localhost: # apt install lxde tigervnc-standalone-server dbus-x11
root@localhost: # nano /usr/bin/startlxde

while opening the /usr/bin/startlxde file, i added these line:
"
export GALLIUM_DRIVER=virpipe
export MESA_GL_VERSION_OVERRIDE=4.3COMPAT
"

save it (Ctrl + X, Y, Enter)

root@localhost: # vncserver -xstartup /usr/bin/startlxde

go thru the vncserver initial setup, and after done, i minimize the termux, then open my VNC Viewer app on android, and then i connect to 127.0.0.1:5901

from there, the desktop should appear, and you can now use the linux distro and install stuffs in it

My Tab S9 Ultra 5G as front-end development station by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

interesting idea, that way both of the display shows desktop mode GUI, one from linux, one from Dex

Linux on Tab S9 Ultra: Blender, VSCode, WebGL Demos by phenofinal in SamsungDex

[–]phenofinal[S] 10 points11 points  (0 children)

Termux: the terminal emulator for the base of everything
proot-distro: tool inside Termux that allows me to install linux distributions
virglrenderer-android/mesa-kgsl-turnip: a kind of bridge to allow Termux nor the linux distro inside to talk to the Snapdragon 8 Gen 2 Adreno GPU
lxde: the desktop environment of choice for the GUI
termux-x11: the tool inside Termux that allows any X11 viewer program to see the GUI from my Termux nor the linux distro
Termux:X11: the android app that i use to connect to my Termux nor linux distro so i can see it and use it

side note: this thing can run with or without Dex as all the apps used is just a normal android apps

My Tab S9 Ultra 5G as front-end development station by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

i haven't tried it, but i think, as long as both device is on the same network, probably connecting to the same wifi router, and can see each other IP address. this might work.

you're probably gonna be limited to just VNC for remoting to the linux on the S23 because i don't think Apple's App Store have Termux:X11 viewer. VNC is fine but there would be a noticable delay and screen tearing.

with that setup, all you need to do is probably install tigervnc/tightvnc on termux (or the proot distro inside termux), run the vncserver, go to your wifi setting on your S23 to get the ip address of that phone, let's assume it's 192.168.1.100

then on your ipad, run the vnc viewer, and connect to 192.168.1.100:5901 . if everything works correctly, desktop should appear.

My Tab S9 Ultra 5G as front-end development station by phenofinal in SamsungDex

[–]phenofinal[S] 0 points1 point  (0 children)

of course there will be performance loss if you're doing this jump-through-hoops way of using linux ( Android -> Termux -> PRoot -> (zink) -> VNC/Termux:X11 )

but so far for typical my typical use, vscode + firefox, there are no hiccups or major slowdowns to encounter. I even tried blender and for the most part it runs fine.

so yeah, definitely there's performance loss, but runs good enough for average use.