index.html 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
  7. <title>Termux</title>
  8. <script type="text/javascript">
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
  31. <nav>
  32. </nav>
  33. </header>
  34. <br />
  35. <div class="container">
  36. <h1 class="title">Termux
  37. <br>
  38. <span class="subtitle"></span>
  39. </h1>
  40. <ul class="tags">
  41. </ul>
  42. <p>Only the termux versions provided along with uweb browser can work seamlessly.</p>
  43. <h4 id="termux-bookmarks">Termux bookmarks</h4>
  44. <p>Long pressing the following links then either &quot;commands&quot;-&gt;&quot;<a href="../urls/index.html">bookmark</a>&quot; to add bookmarks or &quot;open in new tab&quot; to execute.<br>
  45. <a href="c:bc -l">GNU bc (basic calculator)</a><br>
  46. <a href="c:bc -l *.bc">bc with all extensions</a></p>
  47. <h4 id="click-the-following-links-to-install-termux-configurations">Click the following links to install termux configurations:</h4>
  48. <p><a href="i:0h/data/data/com.termux/files/home/.bashrc:https://fastly.jsdelivr.net/gh/torappinfo/uweb/termux/bashrc">.bashrc</a></p>
  49. <p><a href="i:0h/data/data/com.termux/files/home/.inputrc:https://fastly.jsdelivr.net/gh/torappinfo/uweb/termux/inputrc">.inputrc</a></p>
  50. <p><a href="i:0h/data/data/com.termux/files/home/z.sh:https://fastly.jsdelivr.net/gh/rupa/z/z.sh">z.sh</a></p>
  51. <p><a href="i:0h/data/data/com.termux/files/home/commacd.sh:https://fastly.jsdelivr.net/gh/shyiko/commacd/commacd.sh">commacd.sh</a></p>
  52. <p><a href="i:0h/data/data/com.termux/files/home/.profile:https://fastly.jsdelivr.net/gh/torappinfo/uweb/termux/profile">.profile</a> : only for kshell with naked termux (no initial packages, need the following fix for termux quick crash to be launched)</p>
  53. <h4 id="copy-existing-termux-installation-to-other-devices">Copy existing termux installation to other devices</h4>
  54. <p>Using uweb to copy (Long pressing the following links and &quot;open in new tab&quot; to fix/send/receive):</p>
  55. <ul>
  56. <li>target device: install termux app.</li>
  57. <li>(optional)<a href="d::mkdir -p /data/data/com.termux/files/home/.termux;cd /data/data/com.termux/files;mkdir usr;cd home/.termux;ln -s /system/bin/sh shell:">fix termux quick crash</a></li>
  58. <li>both devices: uweb to checke option &quot;Use termux&quot; in UI configuration page for long time tranferring. Uweb itself does not hold any wakelock thus may have issues for huge data transmission.</li>
  59. <li>source device: uweb to visit &quot;files:///data/data/com.termux/&quot;, long click &quot;files&quot; folder to send to network.</li>
  60. <li>target device: uweb to visit &quot;files:///data/data/com.termux/&quot;, long click &quot;right arrow&quot; button to receive from network.</li>
  61. </ul>
  62. <h5 id="using-ssh-to-copy">Using ssh to copy</h5>
  63. <ul>
  64. <li>target device: install termux app, then run &quot;apt install openssh&quot; inside the termux.</li>
  65. <li>source device: Send the &quot;~/.ssh&quot; folder with uweb browser to the network.</li>
  66. <li>target device: Uweb to visit &quot;file://data/data/com.termux/files/home/&quot; to reach the folder, then receive the data sent by the above source device.</li>
  67. <li>source device: Run &quot;sshd&quot;.</li>
  68. <li>target device: Run the command &quot;scp -P 8022 -r [source ip]:.. ..&quot;</li>
  69. </ul>
  70. <h4 id="tips">Tips</h4>
  71. <p>File system navigation:<br>
  72. With <a href="https://github.com/rupa/z">z.sh</a> and <a href="https://github.com/shyiko/commacd">commacd</a>, user can reach any folder with few key stokes. Run &quot;v&quot; to launch uweb file manager on the current working directory, long click any file link to share.</p>
  73. </div>
  74. </body>
  75. </html>