Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Perl Tk run on Android. It works

by zentara (Archbishop)
on Sep 17, 2019 at 17:46 UTC ( #11106312=CUFP: print w/replies, xml ) Need Help??

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 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

Replies are listed 'Best First'.
Re: Perl Tk run on Android. It works
by zentara (Archbishop) on Sep 18, 2019 at 11:00 UTC
    I did get the fluxbox and openbox combination to work, I was having some download problems. They work really nice. One thing though, you will have the best results using an external mouse and keyboard. TWM does seem to have touch response, but fluxbox needs a real mouse.

    I'm not really a human, but I play one on earth. ..... an animated JAPH
Re: Perl Tk run on Android. It works
by naico (Initiate) on Mar 30, 2021 at 09:01 UTC

    This could be interesting!

    YMMV indeed:
    to get the X11/X.h I did: "pkg install xorgproto"

    Instead of "pkg install Tk" I used "cpan install Tk"

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://11106312]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2022-09-30 23:24 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (126 votes). Check out past polls.