sudo command has a problem

Joined
Nov 20, 2011
Messages
6
Reaction score
0
Points
1
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
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's 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.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,943
Reaction score
578
Points
113
Location
Queensland
Your Mac's Specs
Too many devices to list
Where'd you get this copy of CS5 from?
 
OP
N
Joined
Nov 20, 2011
Messages
6
Reaction score
0
Points
1
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
 
Joined
Nov 14, 2011
Messages
19
Reaction score
0
Points
1
Location
New Brunswick, Canada
Your Mac's Specs
13" Late 2011 MBP 8GB RAM 640GB HDD
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.
 
Joined
Aug 17, 2009
Messages
446
Reaction score
4
Points
18
Location
East Bay, CA
Your Mac's 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.
 
OP
N
Joined
Nov 20, 2011
Messages
6
Reaction score
0
Points
1
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.:Lips-Are-Sealed:
 
OP
N
Joined
Nov 20, 2011
Messages
6
Reaction score
0
Points
1
Now im considering to purchase the original cs5.5 but i really want to fix this problem first.
 
Joined
Aug 17, 2009
Messages
446
Reaction score
4
Points
18
Location
East Bay, CA
Your Mac's 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.
 
OP
N
Joined
Nov 20, 2011
Messages
6
Reaction score
0
Points
1
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.
 
Joined
Feb 19, 2008
Messages
546
Reaction score
18
Points
18
Location
Kent, UK
Your Mac's Specs
11" MacBook Air / Unibody MacBook / iMac i3 21.5" / iPhone SE
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
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top