Results 1 to 14 of 14

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

Thread: How to run an ssh session in the background and use safari??

  1. #1
    Default How to run an ssh session in the background and use safari??
    At my institution we are able to log on to a wireless network, but we have to authenticate through an ssh client (we use putty on windows), after logging in we must keep the window open or minimize it (can't close). On the iphone i was able to authenticate but as soon as I press the home button to access safari, the terminal session closes...

    How do I keep this session open so i'm able to use the web??

    Please help!
    Last edited by zither99; 2007-10-02 at 08:07 AM.

  2. #2
    My iPhone is a Part of Me
    Join Date
    Jul 2007
    Davis, California
    Thanked 83 Times in 74 Posts

    I'm really not sure if it will work, but you could try using Dock to launch MobileSafari from inside of MobileTerminal (without pressing the home button) it might just do the trick..

  3. #3
    I tried launching, /Applications/ but it didn't work... otherwise it did

    and i tried dock (the sunburst in the corner) as well and it shuts it off...
    Last edited by zither99; 2007-10-03 at 12:34 AM.

  4. #4
    Try using screen. It's built to allow you to disconnect from a terminal and come back later. Might slow down MobileSafari a bit though.

    I think it's included in binutils by default. Open terminal, type screen and then enter. Press space to get past the welcome message, do whatever you need to do. When ready, just switch to safari, screen will automatically detach.

    When you come back to the terminal, use screen -d -r (the -d is optional in this case but a good habit to be in) to detach and re-attach to the session. Should be right where you left it.

  5. #5
    will try this at school for sure and get back to you, thanks for the posts!
    Last edited by Top-Fuel; 2007-10-03 at 04:40 AM.

  6. #6
    Retired Moderator jedinight's Avatar
    Join Date
    Jul 2007
    c.s. texas
    Thanked 113 Times in 89 Posts

    no on terminal on iphone .

  7. #7
    Okay I can't try this now because I'm at home but I just want to confirm the procedure:

    1. Open up terminal
    2. Type: screen (then hit enter)
    # # screen
    2007-10-02 screen [214:d03]
    SummerBoardLoader: SummerBoardService available.
    Please set a terminal type.
    # #
    3. Type my authentication login/password for my putty campus
    4.Press home button (after authentication is verified)
    5. Open Safari
    6. Press home button
    6. Click back on terminal app (to re-open)
    screen -d -r
    Or do i just type screen -d (to just detach??)

    Okay I just tried it an unsuccessful.

    Got to step 3 and once terminal said i was authenticated

    I pressed the home button and opened up safari and still nothing, my campus's authentication screen popped up on safari saying i needed to authenticate myself....
    Last edited by Top-Fuel; 2007-10-03 at 04:36 PM. Reason: Automerged Doublepost

  8. #8
    Same here, it doesn't really help, because as soon as you press home the ssh session is closed, and when you're loading a page in safari, the ssh session has to be running, even after bringing up the screen back in the ssh session, u still have to press home to go to safari, and of course, as you press home it shuts down the session...

  9. #9
    Default Start screen at boot!
    I have exactly the same problem. To work around it, I start screen at boot time, and then reconnect to it from the terminal. This way the screen process continues running after I hit the home button to switch to another app.

    To do this, add a script to /etc/init.d on the iPhone

    echo "/usr/sbin/screen -dm" > /etc/init.d/

    After a reboot (power down and back up), you should be able to connect to your `persistent' screen process from MobileTerminal. Good luck!

  10. #10
    Default Any luck
    any progress? can someone write a full guide for noobs? Possibly with screen shots?

  11. #11
    thing is that i think will be the problem is that once i authenticate myself through terminal, it won't let me type anything else afterwards as if it locks terminal for me so i cannot make any more commands. therefore i can't even type "screen -d" (to detach) after i authenticate myself.

  12. #12
    I had the same problem, and I believe I've figured it out. Check out for a tutorial. Let me know if it works for you... it works for me

  13. #13
    Cool thanks, thats actually the school I attend... heh

  14. #14
    Quote Originally Posted by brady8 View Post
    I had the same problem, and I believe I've figured it out. Check out for a tutorial. Let me know if it works for you... it works for me
    Its great that I can finally go online with my iPhone at school but I would like to know more on how this whole thing works and what exactly is "screen", what else is possible/what is its use?

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