Page 1 of 2 12 LastLast
Results 1 to 10 of 11
Discuss Springboard Icon to Run Script? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; I have a shell script I'm looking to run by pressing an icon on the ...
  1. #1
    Newbie Array

    Join Date
    Sep 2007
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Question Springboard Icon to Run Script?

    I have a shell script I'm looking to run by pressing an icon on the springboard. I've looked over some of the UIkit examples but (as I'm not overly familiar with Objective-C) I'm mostly lost. Any help with examples/code snippets would be much appreciated.

    P.S. Dev team - you guys rock! Thanks for the hard work!



  2. #2
    peu
    peu is offline
    Respected Professional Array peu's Avatar

    Join Date
    Aug 2007
    Location
    Buenos Aires Argentina (I like ribs)
    Posts
    501
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    34

    Default

    I would use an icon like the one you described, to turn on/off the ssh daemon, but to be able to do it via switches in the settings would be even cooler.
    Lets hope

  3. #3
    Newbie Array

    Join Date
    Sep 2007
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Close but not quite - I'm looking to run a curl command to login to my university's network. Right now I use a shell script on my laptop, and since the iPhone has curl, it has to be possible.

  4. #4
    Senior Professional Array dogzilla's Avatar

    Join Date
    Aug 2007
    Location
    Boston
    Posts
    106
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Doesn't the Tapp application from Erica Sadun do this? Not quite an icon on the springboard, but just one tap short.
    "Are you into S&M?"
    "Well...I'm a Red Sox fan. Does that count?"
    Go Sox!

  5. #5
    Rookie Array

    Join Date
    Sep 2007
    Posts
    27
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi guys
    its pretty easy

    i have done this, check this zip file and change de Info.plist text file with your script

    http://www.hackint0sh.org/forum/showthread.php?t=7528


    of activating /deactivating ssh or other coms, yo just need to use ULctl springboard app.


  6. #6
    Newbie Array

    Join Date
    Sep 2007
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Talking A working solution

    maestropastelero:

    Thanks for the reply - I figured it out just before I saw your reply.

    Here's what I did - if anyone is interested:

    Step 1 - Create new folder and <appname>.app
    Step 2 - Right click and "Show package contents"
    Step 3 - Add a 60x60 pixel icon with file name 'icon.png'
    Step 4 - Add a 320x460 pixel background (user will see this while script executes) with the name 'Default.png'
    Step 5 - Add an 'Info.plist', making sure to change the CFBundleExecutable string to the name of your shell script and the CFBundleIdentifier to a unique identifier. I've attached a sanitized version of my plist below
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CFBundleDevelopmentRegion</key>
    	<string>English</string>
    	<key>CFBundleExecutable</key>
    	<string>name_of_shell_script.sh</string>
    	<key>CFBundleIdentifier</key>
    	<string>com.unique.identifier</string>
    	<key>CFBundleInfoDictionaryVersion</key>
    	<string>6.0</string>
    	<key>CFBundlePackageType</key>
    	<string>APPL</string>
    	<key>CFBundleShortVersionString</key>
    	<string>0.1.0</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    </dict>
    </plist>
    Step 6 - Add your shell script!
    Step 7 - Add the <appname>.app package to the Application folder on your iPhone and restart the springboard

    Hopefully this is clear - if there are any questions feel free to ask!

  7. #7
    Newbie Array

    Join Date
    Oct 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    ok, i got "myApp.app" folder im /Applications

    it contains:

    icon.png

    Default.png

    info.plist (opened below)
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CFBundleDevelopmentRegion</key>
    	<string>English</string>
    	<key>CFBundleExecutable</key>
    	<string>main.sh</string>
    	<key>CFBundleIdentifier</key>
    	<string>com.unique.identifier</string>
    	<key>CFBundleInfoDictionaryVersion</key>
    	<string>6.0</string>
    	<key>CFBundlePackageType</key>
    	<string>APPL</string>
    	<key>CFBundleShortVersionString</key>
    	<string>0.1.0</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    </dict>
    </plist>
    main.sh (opened below)
    Code:
    mv /Applications/Calculator.app/icon.png /Applications/Calculator.app/icon.bkp
    cp /Applications/Igor.app/icon.png /Applications/Calculator.app
    exit
    on my springboatd, i can see myApp with my icon ok! but when i touch it all i get is a blank sreen and i have to kill app by holdin the home button.

    Note: if i run the sript in command line like sh main.sh its working fine.

    so what am i doing wrong ?

    thanks!

  8. #8
    Newbie Array

    Join Date
    Sep 2007
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I was having a similar problem - I ended up simply adding the command to restart the springboard before exit. Make your code like so and it should work.

    Code:
    mv /Applications/Calculator.app/icon.png /Applications/Calculator.app/icon.bkp
    cp /Applications/Igor.app/icon.png /Applications/Calculator.app
    launchctl stop com.apple.SpringBoard.plist
    exit

  9. #9
    Newbie Array

    Join Date
    Mar 2010
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi! Sorry for digging out this ancient thread, but i found the posts here really useful but i've ran into a problem i can't resolve by my self.. Maybe someone can help me. I wrote a little shellscript, that uses gpg to decrypt pgp-encrypted textfiles. The script makes a folder in which it creates three files. One in which the user must paste his/her passphrase for the private key, one where the user must paste the encrypted message and one where the decrypted message will be written into by gpg. I followed the advice here in the thread and have made an "app" witch calls the script. However a strange thing happens: If i run the app, the script is definately executed, since the three files are created. When i edit the file with the passphrase and the one with the encrypted message so that the script should work, and run the "app", the decrypted file is created but it's empty. Now you would probably think there's something wrong with the script.. However, if i run it manually in mobile terminal, the message is being decrypted. There's no user input no nothing so it can't be the reason..
    To sum up:
    App starts and executes the script, however runs the script only partially. In mobile terminal everything runs fine..

    Here's the script and the plist
    Code:
    mkdir -p /var/mobile/Documents/GPGMail
    touch /var/mobile/Documents/GPGMail/Encrypted.txt
    touch /var/mobile/Documents/GPGMail/Decrypted.txt
    touch /var/mobile/Documents/GPGMail/pass
    cat /var/mobile/Documents/GPGMail/pass | \
    gpg -d --yes -a -o \
    /var/mobile/Documents/GPGMail/Decrypted.txt \
    --passphrase-fd 0 \
    /var/mobile/Documents/GPGMail/Encrypted.txt
    launchctl stop com.apple.SpringBoard.plist
    exit
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CFBundleDevelopmentRegion</key>
    	<string>English</string>
    	<key>CFBundleExecutable</key>
    	<string>decrypt.sh</string>
    	<key>CFBundleIdentifier</key>
    	<string>com.unique.decrypt</string>
    	<key>CFBundleInfoDictionaryVersion</key>
    	<string>6.0</string>
    	<key>CFBundlePackageType</key>
    	<string>APPL</string>
    	<key>CFBundleShortVersionString</key>
    	<string>0.1.0</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    </dict>
    </plist>

  10. #10
    Board Hero Array

    Join Date
    Dec 2007
    Posts
    1,044
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    74

    Default

    Quote Originally Posted by supasnashbuhl View Post
    To sum up:
    App starts and executes the script, however runs the script only partially. In mobile terminal everything runs fine..
    At the risk of saying something obvious you have already taken care of... are you running the script in terminal as mobile? Programs launched from SpringBoard usually run as mobile.
    iPhone 3GS / 3.1.2 JB (PwnageTool) / 04.26.08 carrier-locked, Carrier Logo Fixer / Cydia / 1000 posts on Hackint0sh

    Installing Cydia programs on a phone that has no internet connection: read this.

    Editing binary .plist, .strings, .nib and .xib files:
    * on your computer: Windows tool / conversion website.
    * on your iPhone: convert those files in a terminal with plutil (installed with Erica Utilities) or edit them with iFile (Cydia links).


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. problem - running script from springboard
    By Luki14 in forum Free Toolchain Software (Cydia App's)
    Replies: 3
    Last Post: 10-02-2009, 11:17 PM
  2. output script running from springboard
    By spitphire in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 10-01-2009, 11:50 AM
  3. iPhone icon for shell script?
    By mooselander in forum iOS 3.x (iPhone OS 3.x)
    Replies: 0
    Last Post: 08-12-2009, 05:29 PM
  4. [app.icon] How to make it run a script ?
    By Nikolas.A in forum Free Toolchain Software (Cydia App's)
    Replies: 1
    Last Post: 05-30-2008, 12:51 AM
  5. Question: Run shell script from an icon?
    By KennX in forum Free Toolchain Software (Cydia App's)
    Replies: 3
    Last Post: 08-11-2007, 11:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 01:42 AM.
twitter, follow us!