Hi,this is a step by step guide, but your experience might differ.

I am using Android 7.0 Nitrogen on a Nexus 7.

(1) Go to google play store and install the termux app. Now follow the instructions for setting up a graphical environment at termux gui. I suggest using the tigervnc as the XSDL dosn't work on Android later than v4. Also install the VNC Viewer app. The instructions explain how to setup fluxbox and openbox but I had trouble getting them to load. The default TWM works fine. Basically the commands until now should be "pkg install x11-repo" followed by "pkg install tigervnc aterm"

(2) Install the cc with "pkg install clang libxorgproto" I found that X11/X.h file was in libxorgproto and is needed.

(3) While in termux, and at the prompt "pkg install mc" to naviagte and edit :-). Create and edit the file ~/.bashrc and add export DISPLAY=":1"

(4) Edit the ~/.vnc/xstartup file to say this:
##########################
aterm -geometry 80x24+10+150 -ls &
twm &
###########################

At the termux prompt, type "vncserver -localhost" and you should get a message saying :1 was started. If not do a "killall Xvnc" and try again. Once you are running, start the VNC Viewer app and enter 127.0.0.1:5901 for address. 5900 + display number

You should see a black screen in your VNC Viewer with an aterm. In the aterm type "pkg install perl" then "pkg install Tk".

The Japanese fonts don't seem to work, and the test takes long, but the Tk windows are opening.

You may find that cpan's install fails at make test, so then just navigate to ~/.cpan/build/Tk-****/ and type "make install". Then you will find that the shebang line #!/usr/bin/perl needs to be symlinked or changed to /data/data/com.termux/files/usr/bin/perl. YMMV. As an easy solution, just start all Tk programs like "perl mytkapp"

Good luck, have fun. Perl Tk is way easier than Android programming. :-)


I'm not really a human, but I play one on earth. ..... an animated JAPH

In reply to Perl Tk run on Android. It works by zentara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.