• Graphical Shell with WebShell


    Graphical Shell with WebShell - WebOS Internals

    Graphical Shell with WebShell

    From WebOS Internals

    Jump to: navigation, search

    Most people are reporting that Graphical_Shell_with_ajaxPHPterm works better than this method. You might want to try that one first ...

    This article will allow you to use your web browser on your Pre for a terminal. You should have already rooted your Pre and installed an SSH server, enabled sudo and set up the optware repositories.

    1. SSH into your Pre. 2. Download Webshell:

    wget http://web-shell.googlecode.com/files/WebShell-0.9.6.zip
    

    3. Install Python:

    sudo /opt/bin/ipkg-opt install python
    

    4. Extract the contents of WebShell-0.9.6.zip:

    unzip WebShell-0.9.6.zip
    

    5. Generate a server certificate:

    cd WebShell-0.9.6
    sh ./make_certificate.sh
    

    6. Move WebShell to /opt/share/webshell:

    cd ..
    sudo mv WebShell-0.9.6/ /opt/share/webshell
    

    7. Create an upstart script "/etc/event.d/webos-webshell" with the following contents:

    start on stopped finish
    stop on runlevel [!2]
    
    console none
    
    respawn
    
    exec /opt/bin/python /opt/share/webshell/webshell.py -c "/opt/bin/ssh -p 222 -l $USER localhost" --ssl-disable
    

    where $USER is replaced by your user name.

    8. Restart the Pre.

    9. Open up your web browser and go to

    http://127.0.0.1:8022
    

    10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone.

    Note If it looks like you are seeing a bunch of text flash at the top of the screen, rotate your phone into Landscape mode, hit the enter key a bunch of times. You will either be able to see the error and can fix it through your version of SSH or you will get a disconnection message. If you do get a disconnected message, hit Refresh and try to login. It should start working then.

    Note Eventually there will be a way to disable the auto-text functions (automatic caps especially).


    Verified to work as typed by optik678 and hopspitfire.

    - webOS 1.1: Can not get this to work with the new webOS. Same error over and over:

    'import site' failed; use -v for traceback
    Traceback (most recent call last):
      File "/opt/share/webshell/webshell.py", line 8, in <module>
        import array, time, glob, optparse, random, re
      File "/opt/lib/python2.5/glob.py", line 3, in <module>
        import os
      File "/opt/lib/python2.5/os.py", line 694, in <module>
        import copy_reg as _copy_reg
      File "/opt/lib/python2.5/copy_reg.py", line 7, in <module>
        from types import ClassType as _ClassType
    ImportError: No module named types
  • 相关阅读:
    Golang——内存分区理解:代码区、数据区、堆区、栈区
    Golang基础——工程管理:同一目录和不同目录的文件引用
    Golang基础——函数,作用域,匿名函数,递归
    pandas 学习
    git学习
    Golang基础——跳转语句 break,continue,goto
    Golang基础——for循环
    Golang基础——if语句,switch语句
    while你爱不爱我
    js判断年份
  • 原文地址:https://www.cnblogs.com/lexus/p/3285324.html
Copyright © 2020-2023  润新知