New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

sudo command has a problem


Post Reply New Thread Subscribe

 
Thread Tools
nan.piyawan

 
Member Since: Nov 20, 2011
Posts: 6
nan.piyawan is on a distinguished road

nan.piyawan is offline
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
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
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!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,237
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
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
QUOTE Thanks
nan.piyawan

 
Member Since: Nov 20, 2011
Posts: 6
nan.piyawan is on a distinguished road

nan.piyawan is offline
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
QUOTE Thanks
Scott64

 
Scott64's Avatar
 
Member Since: Nov 15, 2011
Location: New Brunswick, Canada
Posts: 20
Scott64 is on a distinguished road
Mac Specs: 13" Late 2011 MBP 8GB RAM 640GB HDD

Scott64 is offline
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
QUOTE Thanks
ImageX

 
ImageX's Avatar
 
Member Since: Aug 17, 2009
Location: East Bay, CA
Posts: 440
ImageX will become famous soon enough
Mac Specs: 17" MBP C2D 2.8 4GB OS X 10.8 | iPhone 5

ImageX is offline
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!
QUOTE Thanks
nan.piyawan

 
Member Since: Nov 20, 2011
Posts: 6
nan.piyawan is on a distinguished road

nan.piyawan is offline
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.
QUOTE Thanks
nan.piyawan

 
Member Since: Nov 20, 2011
Posts: 6
nan.piyawan is on a distinguished road

nan.piyawan is offline
Now im considering to purchase the original cs5.5 but i really want to fix this problem first.
QUOTE Thanks
ImageX

 
ImageX's Avatar
 
Member Since: Aug 17, 2009
Location: East Bay, CA
Posts: 440
ImageX will become famous soon enough
Mac Specs: 17" MBP C2D 2.8 4GB OS X 10.8 | iPhone 5

ImageX is offline
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!
QUOTE Thanks
nan.piyawan

 
Member Since: Nov 20, 2011
Posts: 6
nan.piyawan is on a distinguished road

nan.piyawan is offline
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.
QUOTE Thanks
hugtheslug

 
hugtheslug's Avatar
 
Member Since: Feb 19, 2008
Location: Kent, UK
Posts: 518
hugtheslug is a jewel in the roughhugtheslug is a jewel in the rough
Mac Specs: 2013 MacBook Air i5 13" / 2014 MacBook Air i5 11" / iMac C2D 2.16 GHz 20" / iMac G5 1.6 GHz 17"

hugtheslug is offline
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
QUOTE Thanks

Post Reply New Thread Subscribe


« Hard Drive fuller than it actually seems to be. | acrobat adobe reader »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Problem with copy and paste that does not paste the more recent copy? pcortez Switcher Hangout 22 08-01-2012 02:28 PM
What are the differences between a logic board problem and an nvidia chip problem? iggibar Apple Notebooks 4 12-31-2010 06:19 PM
could this be an OS problem? Anyuta OS X - Operating System 0 11-22-2010 05:50 PM
Strange iweb problem Anyuta Web Design and Hosting 0 09-27-2010 01:46 PM
2009 MBP - Possible Trackpad Problem tricky10 Apple Notebooks 6 09-09-2010 08:01 AM

All times are GMT -4. The time now is 04:40 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?