Results 1 to 7 of 7
Discuss Mobile Terminal and bash autostart? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; I must be missing something incredibly trivial, but I still haven't figured out a way ...
  1. #1
    Rookie Array

    Join Date
    Aug 2007
    Posts
    22
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Mobile Terminal and bash autostart?

    I must be missing something incredibly trivial, but I still haven't figured out a way to have Mobile Terminal launch bash when it starts up. Granted I'm using an older version, but still.

    Anyone have any ideas on how to accomplish this, as its a major pain in the ass to type /bin/bash everytime when it boots up in sh and there is no god damm backspace



  2. #2
    Newbie Array

    Join Date
    Aug 2007
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    you need to set the shell preference for root in /etc/master.passwd and then make sure that login is in your /bin directory. once the terminal starts up it will use login to read roots sh preference and will start up bash. you can configure bash however you like by creating a ~/.profile file and adding aliases/exports/whatever to it.

    hope that helps

  3. #3
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    187
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    16

    Default

    You will need to create a new file in /etc called shells. This will allow /bin/bash to be set as a shell. Mine looks like this:

    iPhone:/var/root$ cat /etc/shells
    # Begin Shells

    /bin/sh
    /bin/bash

    # End Shells


    Also, as previously mentioned, edit /etc/master.passwd so the last part of the line is changed from:

    <blah>:/var/root:/bin/sh

    to


    <blah>:/var/root:/bin/bash


    The bash profile is read from .bash_profile in your HOME, or /var/root/.bash_profile if unchanged.

    Good luck!

  4. #4
    Rookie Array

    Join Date
    Aug 2007
    Posts
    22
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Yeah, thats the stuff that I tried. Nothing seemed to work =(

    I only changed the login shell for root, should I also change it for one of the other users?

  5. #5
    Rookie Array

    Join Date
    Aug 2007
    Posts
    22
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hmm, just figured out why. For some reason, a .bash_profile was never created, while a .bash_history was.

    Kinda odd that it would happen like that, but I just created an empty .bash_profile in /var/root/ and now its working.

    Thanks for reminding me to check the profile phattie


  6. #6
    Rookie Array

    Join Date
    Jul 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    So that's how your supposed to do it. I replaced the sh binary with the bash binary. It worked fine, except it claimed to be sh instead of bash...

    Thank you very much, now I can do it in a slightly more sane way!

    Ben

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

    Actually, it turns out that the iPhone recognizes .shrc and .bashrc files as well. I've put aliases in there to make life easier - big help when typing characters is at a premium. Also, I wasn't sure if messing with the default shell would cause probs, so I put a simple command at the end of my .shrc that launches /bin/bash - makes it trivial to back out of.

 

 

Similar Threads

  1. Mobile Terminal crashes iOS 4.0 3GS
    By unclemiltie in forum iOS 4.x (iPhone OS 4.x)
    Replies: 2
    Last Post: 10-12-2010, 01:18 PM
  2. [Mobile Terminal]
    By pakal in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 09-08-2008, 08:23 PM
  3. [1.1.4][Mobile Terminal][Solved]Terminal Hangs.. what's my next move .. ?
    By wackotm in forum Free Toolchain Software (Cydia App's)
    Replies: 1
    Last Post: 05-15-2008, 05:04 AM
  4. mobile terminal
    By mcluca in forum General
    Replies: 0
    Last Post: 09-24-2007, 07:56 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 09:13 AM.
twitter, follow us!