Results 1 to 10 of 10
  1.    #1  
    Hey everybody, sorry for the amateurish question, but how do you get a file open from within the command line?

    For instance, i want to edit the devmode enabler to make it visible, and i know i have to edit this file: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.jsjsjs


    but, when i enter the command
    root@castle:/home/user# vi /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.jsjsjs

    it simply displays the contents within the command window, leaving me unable to edit it. How do I get them to open within a text editor or something?
  2. buyrihn's Avatar
    Posts
    449 Posts
    Global Posts
    453 Global Posts
    #2  
    I was wondering the same thing. I was going to enable SFTP, but I don't think I should have to, just to edit a file.
  3.    #3  
    I'm just rooting via usb on a mac. Hopefully it won't have to get that complicated. Most of the instructions i see imply that no file browser is needed.
  4. #4  
    You just have to learn how to use vi, it has an insert mode to change the actual file. I would suggest finding a vi tutorial online if you really want to learn the basics of how it works.
  5.    #5  
    So if i install a VI client, entering

    vi /usr/palm/applications/com.palm.app.devmodeswitcher/appinfo.json

    should open the file within Vi instead of just displaying the contents in the terminal window?
  6. #6  
    Quote Originally Posted by sspster View Post
    So if i install a VI client, entering

    vi /usr/palm/applications/com.palm.app.devmodeswitcher/appinfo.json

    should open the file within Vi instead of just displaying the contents in the terminal window?
    when you see the contents you are using vi - vi defaults to command mode - move to the location where you want to make an edit and press i to change to insert mode - start by googling: vi how to
  7. #7  
    Quote Originally Posted by sspster View Post
    So if i install a VI client, entering

    vi /usr/palm/applications/com.palm.app.devmodeswitcher/appinfo.json

    should open the file within Vi instead of just displaying the contents in the terminal window?
    sspster,
    It has vi built in. You just need to know what to type to edit what its displaying is what I meant.

    I found a tutorial on youtube:

    (vi on the pre won't have the line numbers like theirs but it should work the same)

    vi in 10 minutes - part 1
    There are lots more tutorials on the web if that ones not clear enough.
  8. #8  
    Does the pre allow sftp connections? I was trying to transfer some files but couldn't seem to connect. If I transfer a file through usb where is this in root so I can move the file?
  9. #9  
    Personally, I find vi incredibly difficult to use (the thing you're missing is both having perms to edit the file -- sudo will fix this, and you need to hit i in vi in order to enter INSERT mode).
    But jove (a slimmed down emacs build) is available in the optware repo, so I would recommend that if you're looking for something a little easier. And nano is there as well, which I would say is the simplest of the unix command line editors.
  10. buyrihn's Avatar
    Posts
    449 Posts
    Global Posts
    453 Global Posts
    #10  
    Quote Originally Posted by apolzon View Post
    Personally, I find vi incredibly difficult to use (the thing you're missing is both having perms to edit the file -- sudo will fix this, and you need to hit i in vi in order to enter INSERT mode).
    But jove (a slimmed down emacs build) is available in the optware repo, so I would recommend that if you're looking for something a little easier. And nano is there as well, which I would say is the simplest of the unix command line editors.
    I tried to use nano on the Pre, but it didn't work. You mention it being available in the optware repository- could you explain?

Posting Permissions