Saturday, March 4, 2017

Home screen icon for terminal program?


I'm using terminal-ide http://code.google.com/p/terminal-ide/ which is basically a terminal for android with all sorts of utilities. One is able to create bash scripts for example. Is there a way to create an icon on the home screen that will launch one of these scripts?



Answer




Is there a way to create an icon on the home screen that will launch one of these scripts?




There is another way (other than this one) if you happen to use Terminal Emulator for Android app. It allows a widget which can be used to execute a script.



  1. Install that app, choose Term Shortcut widget in your current launcher.


  2. Corresponding to Arguments enter:


    sh 

    In my case, the query was:


    sh  /sdcard/airdroid/dd.sh


    As for the root access, you can either provide su access from inside the script and use the aforesaid command for execution, or do:


    su -c "sh  /sdcard/airdroid/dd.sh"

    Choice is yours!


    Choose icon or shortcut label as per your needs, tap OK and an icon would be placed on the home screen.



  3. Tap the icon, the Terminal Emulator app window would open and the script would execute, just like in Desktop GNU/Linux.


We're good to go!



No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...