Setup gui for tkinter in termux
Hey this is Kcubeterm
So here's few requirements, just execute following command in termux.
Yea, only two things , if you are willing to install more things, then install any vncviewer client from playstore. https://play.google.com/store/apps/details?id=com.realvnc.viewer.android
now let's setup gui in termux side
Now just open terminal and set DISPLAY environment. Don't worry, just use your copy-paste skill
Note: if vncserver ask for password setup, don't negotiate with it, you are not buying clothes in market, just put and go forward. And yes legend never forget password, so remember it.
Now let's do hello world with tkinter.
Again use your copy paste skill here.
from tkinter import *
root = Tk()
Label(root, text="Hello, world! Lol").pack()
root.mainloop()
save that file with any name like
lol.py and then run it, by python
python lol.py
Now open vncviewer app and rock on, I mean add address and name there, you can use any name but address , just use this address
After connected you can see hello world there, so now make new tkinter script and run that in same ways.
Disclaimer: if you don't get expected outcomes or any error don't forget to report it here or any other termux community, fortunately members are very generous on all Community .
Hey this is Kcubeterm
So here's few requirements, just execute following command in termux.
pkg install python-tkinter tigervnc
Yea, only two things , if you are willing to install more things, then install any vncviewer client from playstore. https://play.google.com/store/apps/details?id=com.realvnc.viewer.android
now let's setup gui in termux side
Now just open terminal and set DISPLAY environment. Don't worry, just use your copy-paste skill
export DISPLAY=:1
vncserver :1
Note: if vncserver ask for password setup, don't negotiate with it, you are not buying clothes in market, just put and go forward. And yes legend never forget password, so remember it.
Now let's do hello world with tkinter.
Again use your copy paste skill here.
from tkinter import *
root = Tk()
Label(root, text="Hello, world! Lol").pack()
root.mainloop()
save that file with any name like
lol.py and then run it, by python
python lol.py
Now open vncviewer app and rock on, I mean add address and name there, you can use any name but address , just use this address
localhost:5901
After connected you can see hello world there, so now make new tkinter script and run that in same ways.
Disclaimer: if you don't get expected outcomes or any error don't forget to report it here or any other termux community, fortunately members are very generous on all Community .
Google Play
RealVNC Viewer: Remote Desktop - Apps on Google Play
Remotely control a desktop anywhere in the world from your Android device!
Use following command for Installation of matplotlib in termux
export LDFLAGS=" -lm -lcompiler_rt"
pip install cython
pip install matplotlib
export LDFLAGS=" -lm -lcompiler_rt"
pip install cython
pip install matplotlib
How I learned UNIX ages ago:
- read the man page for every command
- run each command with its help flag (typically -h or --help)
- try to use the command to do something
- once you figure out what the command does and how to run it, make a note of it. Writing stuff down helps you memorize it.
In Termux you can get a list of commands with the shell just by hitting tab twice. Or start with a-tab-tab, then b-tab-tab, etc...
Your default shell (command line and scripting language) is "bash", you can "man bash" or run "help" to get some pointers. Plenty of bash tutorials out there.
Another big part of the Termux environment is BusyBox, so you can read tutorials for that too.
Note: I refer to reddit user u/randomqhacker
- read the man page for every command
- run each command with its help flag (typically -h or --help)
- try to use the command to do something
- once you figure out what the command does and how to run it, make a note of it. Writing stuff down helps you memorize it.
In Termux you can get a list of commands with the shell just by hitting tab twice. Or start with a-tab-tab, then b-tab-tab, etc...
Your default shell (command line and scripting language) is "bash", you can "man bash" or run "help" to get some pointers. Plenty of bash tutorials out there.
Another big part of the Termux environment is BusyBox, so you can read tutorials for that too.
Note: I refer to reddit user u/randomqhacker
Forwarded from Mishizu
GitHub
GitHub - sindresorhus/awesome: 😎 Awesome lists about all kinds of interesting topics [NOTE: Pull requests are temporarily disabled…
😎 Awesome lists about all kinds of interesting topics [NOTE: Pull requests are temporarily disabled until I have a chance to catch up with the existing ones] - sindresorhus/awesome
Tmux 2 by Brian p Hogan.pdf
1.5 MB
Tmux 2 : productive mouse free development by Brian p. Hogan
Map in terminal
press A = zoomin
press Z = zoom out
press C = to quite
use arrow keys to goto left right up down
telnet mapscii.mepress A = zoomin
press Z = zoom out
press C = to quite
use arrow keys to goto left right up down
Setup ssh public key in github with termux
It will copy your key to the clipboard (use
I actually got bored of this this procedure, so wrote a Github Gist with everything needed (SSH / GPG / KeyBase)
Hope it helps!
https://gist.github.com/9ee93151f76da3015abf101612a50c3f
I refer to reddit/github user 5c0tt-b0t
termux-clipboard-set < $HOME/.ssh/id_rsa.pub && xdg-open https://github.com/settings/keysIt will copy your key to the clipboard (use
termux-clipboard-set/get, not xclip etc) and after it will open github security settings page in your default browser, right where you need to paste it! :)I actually got bored of this this procedure, so wrote a Github Gist with everything needed (SSH / GPG / KeyBase)
Hope it helps!
https://gist.github.com/9ee93151f76da3015abf101612a50c3f
I refer to reddit/github user 5c0tt-b0t
Here, How you can run and install ngrok in termux
--------------------------------------------------------
Update: Now you can run ngrok over ssh like used to do with serveo and localhost.run
Please visit wiki: https://wiki.termux.com/wiki/Bypassing_NAT#Using_Ngrok_over_SSH
--------------------------------------------------------
Execute following command for installing things.
Now setup ngrok authtoken. Visit ngrok.com if you don't have authtoken.
First method.
Just use
Use.
You just need to put "termux-chroot" at beggining, that's it.
Second method.
Second method for that scenario where ngrok is inbuilt in any tool which you are using, so here, you just need to execute
Why ngrok don't work without termux-chroot in termux
So here, ngrok use /etc/resolv.conf for dns lookup, but as you know /etc/resolv.conf is missing in android. So here termux can't do anything, when you use termux-chroot, it emulate file system where /etc/resolv.conf is available and ngrok works as expected.
# Video tutorial.(asciinema)
https://asciinema.org/a/367862
--------------------------------------------------------
Update: Now you can run ngrok over ssh like used to do with serveo and localhost.run
Please visit wiki: https://wiki.termux.com/wiki/Bypassing_NAT#Using_Ngrok_over_SSH
--------------------------------------------------------
Execute following command for installing things.
pkg in python,proot, resolv-conf
pip install pyngrok
Now setup ngrok authtoken. Visit ngrok.com if you don't have authtoken.
ngrok authtoken TOKEN_HEREFirst method.
Just use
termux-chroot to run ngrok. Suppose i want to forward port 8080, now instead of using "ngrok http 8080" .Use.
termux-chroot ngrok http 8080 .You just need to put "termux-chroot" at beggining, that's it.
Second method.
Second method for that scenario where ngrok is inbuilt in any tool which you are using, so here, you just need to execute
termux-chroot and run that tool as you run in termux before.Why ngrok don't work without termux-chroot in termux
So here, ngrok use /etc/resolv.conf for dns lookup, but as you know /etc/resolv.conf is missing in android. So here termux can't do anything, when you use termux-chroot, it emulate file system where /etc/resolv.conf is available and ngrok works as expected.
# Video tutorial.(asciinema)
https://asciinema.org/a/367862