Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Perl Tk run on Android. It works

by zentara (Archbishop)
on Sep 17, 2019 at 13: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 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

Replies are listed 'Best First'.
Re: Perl Tk run on Android. It works
by zentara (Archbishop) on Sep 18, 2019 at 07: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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2019-10-21 19:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?