Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Script help

  1. #1
    Default Script help
    Okay so I really like my layout and want to use shell scripts to swap out my 'floating' icon depending on what application I want to use.

    Here's my home screen with VRecorder on it.

    Here's a sample script, for NES application:
    ------
    #!/bin/bash
    echo ""
    echo "This will activate the NES"
    echo " application in the #11 spot"
    echo ""
    echo "It will then restart SpringBoard"
    echo "to load the new icon"
    echo ""

    rm /System/Library/CoreServices/SpringBoard.app/DisplayOrder.plist

    cp /var/root/Media/docs/NESDisplayOrder.plist /System/Library/CoreServices/SpringBoard.app/DisplayOrder.plist

    kill -9 `ps wwx | grep SpringBoard | grep -v grep | sed -e s/\?.*//`
    -----
    Everything works great. I snagged it from the iDecor script and it's supposed to locate the SpringBoard application and kill it, forcing a restart which will reload my updated DisplayOrder.plist file and as such, show the new icon on the home screen.

    To allow the script to work I've made several versions of my DisplayOrder.plist file and saved them to my iPhone in the /var/root/Media/docs folder. I've also created several shell.sh srcipts that I can simply type "tic.sh" in my terminal window and it will activate my TicTacToe DisplayOrder.plist and (eventually) restart SpringBoard.


    Edit2: Allen Porter (creator of Terminal app) replied to my email and provided the quick resolution. Use the 'wwx' for the 'ps' command and it list a wide version. All my scripts work GREAT! Thanks Allen - you ROCK!!
    Last edited by CyberGreg; 07-25-2008 at 04:06 PM.

  2. #2
    Owner / Founder - ModMyi
    aka poetic_folly
    Kyle Matthews's Avatar
    Join Date
    May 2007
    Location
    Tampa, Florida, United States
    Posts
    8,482
    Thanks
    570
    Thanked 4,808 Times in 1,228 Posts

    Awesome. Looking forward to some more info on this... share some scripts.
    .


    ↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews

  3. #3
    Okay, I believe I have found the cause of the script failure. The number of columns in the iPhone Terminal app is set to 41. This truncates the output of ps and causes the rest of the 'greping' to fail. It would also explain why it works through ssh, the terminal columns is set to 80.

    I have contacted the developer to ask for an update. Allen Porter has replied with a resolution.


    PF - please delete this post.
    Last edited by CyberGreg; 08-09-2007 at 11:36 AM.

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •