Results 1 to 11 of 11
  1. #1
    sudo command has a problem

    Member Since
    Nov 20, 2011
    Posts
    6
    sudo command has a problem
    I've got a huge problem with my sudo command
    I like to run cs5 on my mac LION 10.7.2
    and I go to
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts
    and put 127.0.0.1 blah blah blah
    but somehow I did something wrong and when I put sudo command in the Terminal it shows:


    Nov 21 00:10:02 Piyawan-Thaipetkuls-MacBook-Pro.local TextEdit[2672] <Error>: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID -1
    Nov 21 00:10:02 Piyawan-Thaipetkuls-MacBook-Pro.local TextEdit[2672] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    Nov 21 00:10:02 Piyawan-Thaipetkuls-MacBook-Pro.local TextEdit[2672] <Error>: kCGErrorIllegalArgument: CGSSetWindowShadowAndRimParametersWithStretch: Invalid window 0xffffffff
    2011-11-21 00:10:17.659 TextEdit[2672:2107] NSTrackPersistentURLs: LSSharedFileListInsertItemURL() failed at inserting URL file://localhost/etc/hosts (/etc/hosts)


    Anyone knows how to fix this?
    Thanks

  2. #2
    sudo command has a problem
    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    Try this instead


    sudo open -t /etc/hosts


    it's not a problem with sudo. It's just a bad command structure in the first place.

    That said, make sure you understand what you're doing in /etc/hosts, or you can really screw things up. Also, shouldn't have anything to do with cs5 in the first place.
    mike
    This machine kills fascists
    Got # ? phear the command line!

  3. #3
    sudo command has a problem
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Where'd you get this copy of CS5 from?
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  4. #4
    sudo command has a problem

    Member Since
    Nov 20, 2011
    Posts
    6
    Thank you very much
    but can you tell me how to fix these errors or make everything becomes normal?
    and I have tried this

    sudo open -t /etc/hosts

    it shows like something that should come up when i press this command
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts
    what does this command(sudo open -t /etc/hosts) do? can you explain abit more?
    btw, i bought the copy of cs5 from the shop in Thailand

  5. #5
    sudo command has a problem
    Scott64's Avatar
    Member Since
    Nov 14, 2011
    Location
    New Brunswick, Canada
    Posts
    19
    Specs:
    13" Late 2011 MBP 8GB RAM 640GB HDD
    Quote Originally Posted by nan.piyawan View Post
    btw, i bought the copy of cs5 from the shop in Thailand
    If the software you purchased is having you modify /etc/hosts to force attempted connections with Adobe's servers to point to your local machine (and therefore fail), chances are you bought a pirated copy.
    -Scott

  6. #6
    sudo command has a problem
    ImageX's Avatar
    Member Since
    Aug 17, 2009
    Location
    East Bay, CA
    Posts
    440
    Specs:
    17" MBP C2D 2.8 4GB OS X 10.8 | iPhone 5
    I too had to access and edit the hosts file for something similar. I used
    Code:
    sudo nano /etc/hosts
    and was able to get into the hosts file after it asked for my password in Terminal and use up/down arrows to navigate through the text in it. When you're done editing it, hit Ctrl+X to exit and it will ask if you want to save hit "Y" and then enter to save the file name as the same. Done. Good luck.

    PS - Sorry you paid for this.
    "The early bird gets the worm, but the second mouse gets the cheese."

    Remember to use the Reputation System!

  7. #7
    sudo command has a problem

    Member Since
    Nov 20, 2011
    Posts
    6
    Quote Originally Posted by ImageX View Post
    I too had to access and edit the hosts file for something similar. I used
    Code:
    sudo nano /etc/hosts
    and was able to get into the hosts file after it asked for my password in Terminal and use up/down arrows to navigate through the text in it. When you're done editing it, hit Ctrl+X to exit and it will ask if you want to save hit "Y" and then enter to save the file name as the same. Done. Good luck.
    Actually i did like what you have done, but when i hit ctrl+O to save it said about the file name so i changed to
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts instead of save the file name as the same then i hit "Y" and it said that there's the error about the file name then i hit Ctrl+X to exit (Obviously i ignored the error). After that i opened Terminal to check sudo/application command there are errors.
    Btw, does it work well with ur cs5 then? is cs5 keep asking for ur serial no.?

    Need helps to make everything becomes normal.

  8. #8
    sudo command has a problem

    Member Since
    Nov 20, 2011
    Posts
    6
    Now im considering to purchase the original cs5.5 but i really want to fix this problem first.

  9. #9
    sudo command has a problem
    ImageX's Avatar
    Member Since
    Aug 17, 2009
    Location
    East Bay, CA
    Posts
    440
    Specs:
    17" MBP C2D 2.8 4GB OS X 10.8 | iPhone 5
    You're not supposed to change the name to anything. When it asks about the save name, just hit enter. Do not change it. No, my CS5 does not keep asking for my serial number.
    "The early bird gets the worm, but the second mouse gets the cheese."

    Remember to use the Reputation System!

  10. #10
    sudo command has a problem

    Member Since
    Nov 20, 2011
    Posts
    6
    Thanks for all comments
    but still i can't figure it out how to solve the error so anyone has a solution pls come and share.

  11. #11
    sudo command has a problem
    hugtheslug's Avatar
    Member Since
    Feb 19, 2008
    Location
    Kent, UK
    Posts
    522
    Specs:
    2013 MacBook Air i5 13" / 2014 MacBook Air i5 11" / iMac C2D 2.16 GHz 20" / iMac G5 1.6 GHz 17"
    If yours is a legit copy I would uninstall it completely (might need a Google here to find out all the files to remove), then download a trial CS5 from Adobe and apply your serial number.

    Cheers

    Hugh
    A little knowledge is a dangerous thing.
    Warning - this user has only a little knowledge

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need Help Undoing Sudo Command
    By sonic123 in forum OS X - Operating System
    Replies: 4
    Last Post: 10-28-2014, 10:46 AM
  2. Auto Type password for sudo command from crontab
    By aceofsplades in forum OS X - Operating System
    Replies: 1
    Last Post: 09-19-2014, 10:59 PM
  3. sudo: ports: command not found
    By inflexion in forum OS X - Development and Darwin
    Replies: 16
    Last Post: 06-11-2012, 01:16 PM
  4. Running sudo command as _www user
    By jamessw in forum OS X - Operating System
    Replies: 3
    Last Post: 03-18-2010, 02:43 PM
  5. Need help!! how do I enter the command sudo port -v selfupdate?
    By madmaster420 in forum OS X - Operating System
    Replies: 1
    Last Post: 09-09-2008, 12:21 PM

Posting Permissions

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