 |
 |
Safari.app parameters ?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2002
Status:
Offline
|
|
I went into Safari's package contents (/Applications/Safari.app/Contents/MacOS) and executed Safari from the command line:
./Safari
2005-09-07 02:34:29.532 Safari[1163] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x3003, name = 'com.apple.Safari.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2005-09-07 02:34:29.551 Safari[1163] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (com.apple.Safari.ServiceProvider)
These errors occur at every Safari startup, what are they? All good apps take parameters so why is Safari any different.Can Safari take parameters ? I tried google but to no avail, also tried Safari.app --help , no luck 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
You are trying this with sudo or when ssh'ed in, arn't you. Safari is a GUI AppKit app, and thus needs a connection to the Window Server. I have no idea what you are thinking, but Safari will take a command line argument, and use it as a file reference. I don't know why you think you should be using Safari from the command line.
If you are trying to script it into doing something, you should be using AppleScript. But that will still not get you past the requirement for a connection to the Window Server.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status:
Offline
|
|
It can take a file name to open.
The 'strings' command can be useful for determining such things. There are strings like '--page-load-test' and '--test-commands' in Safari, but they don't seem to do anything when given as options.
Maybe Mr. Hyatt is lurking here?? If you don't think he is, try asking him: http://webkit.opendarwin.org
|
pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2002
Status:
Offline
|
|
Originally Posted by larkost
You are trying this with sudo or when ssh'ed in, arn't you. Safari is a GUI AppKit app, and thus needs a connection to the Window Server. I have no idea what you are thinking, but Safari will take a command line argument, and use it as a file reference. I don't know why you think you should be using Safari from the command line.
If you are trying to script it into doing something, you should be using AppleScript. But that will still not get you past the requirement for a connection to the Window Server.
Nope, running this as a regular admin user not root.Safari opens and everything is fine but I'm just wondering what these messages the console outputs are.
Originally Posted by Tesseract
It can take a file name to open.
The 'strings' command can be useful for determining such things. There are strings like '--page-load-test' and '--test-commands' in Safari, but they don't seem to do anything when given as options.
Maybe Mr. Hyatt is lurking here?? If you don't think he is, try asking him: http://webkit.opendarwin.org
Thanks for the strings tip.I did a man strings but can't figure out how to search for strings that are proceeded by -- or -
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status:
Offline
|
|
Pipe the output of strings into grep. Like so: 'strings Safari | grep ^-'
PS. It is possible to run apps from the command line as root. 'sudo /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences' and 'sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit' are especially useful.
|
pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Mar 2002
Status:
Offline
|
|
Originally Posted by Tesseract
Pipe the output of strings into grep. Like so: 'strings Safari | grep ^-'
Excellent, thanks.What does the ^ do ?
PS. It is possible to run apps from the command line as root. 'sudo /Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences' and 'sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit' are especially useful.
Why is it useful to run TextEdit.app as root ?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status:
Offline
|
|
The ^ forces the match to be at the beginning of the string. If you were to just do 'grep -', it would find any line with a '-' anywhere in the line. The grep man page explains what special characters you can use when writing a regular expression. If you are going to do much work at the command line, becoming familiar with regular expressions will be most valuable.
(Perhaps obviously) you shouldn't run TextEdit as root for everyday editing. But if you are trying to implement a 'hack' or for some other reason need to edit files as root, and you don't want to use a command-line editor, using TextEdit as root is very effective.
|
pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|