osascript -e 'tell app "ARDAgent" to do shell script "whoami"';
Archives for MacOSX category
http://darwinports.com/
22 Feb
How To Run vmware-console Remotely With Apple’s X11 -
Posted in MacOSX by carlosap | No Comments
Created on Apr 10, 2007, 23:25 by Rui Carmo, not updated since.
Update: Mark Wilson has gone through this with a more recent version of VMware, and his article is likely to be more useful.Regarding this piece, thanks to Chris Dagdigian for pointing out the need for trusted Xforwarding.
One of the biggest issues with managing VMware Server for me has always been not having a native Mac OS X remote administration client (or a Mac OS X anything, but that’s another story).So, with every release, I kept trying to find a way to both see and control my virtual machine consoles by running vmware-console on the server and forwarding the X display to myMac - which never seemed to work due to various X11 quirks - either the application bombed instantly, or there were masses of debug logging - but never a working remote console.However, after months of virtual head-banging, Chris Dagdigian e-mailed me a note saying that he had got his vmware-console running by using trusted X forwarding, and after a while I had the rest figured out - keyboard mappings and all.The following notes assume you have a Linux-based VMware Server host (running build 22088) and that you can access it over SSH from a Mac with X11 installed.
On The VMware Host
Keyboard detection doesn’t work properly when you’re using X11.app, so you have to go to/usr/lib/vmware/xkeymap and pick a suitable keyboard map (see this for more info).You then have to edit ~/.vmware/preferences to set that keyboard map:
xkeymap.language="pt104"
…and pay attention to the vmware-console output.
On Mac OS X:
Start X11.app, open an xterm and SSH to the VMware Server using trusted X forwarding:
monotith:~ user$ ssh -Y user@vmware Last login: Sun Mar 12 21:42:49 2006 from monolith.internal.taoofmac.com [user@vmware ~]$ vmware-console
And presto, it should appear on your X11 display. There is a very important point that needs stressing, though -
If VMware is unable to detect your keyboard settings, you won’t be able to control guest virtual machines properly - you won’t even be able to see the console.
Hence the importance of setting the keymap properly. You might also want to remember that some key combos are slightly different on the Mac - for instance, Ctrl+Alt to exit a VM is actually Ctrl+Command, etc., etc.Regarding xauth and X11.app in other contexts, some people have noted that xauthusually works for them after issuing the following command in xterm:
xauth generate :0 . trusted
Although I’ve yet to establish a relationship, it seems to have helped me as well.
Terminal solutionIf you don’t mind using Terminal, you can kill all pending print jobs with one simple command:
cancel -a -
Every time you execute a command by using only the command’s name (for example, ls or pwd), your shell looks for the command in a list of directories. That list is stored in the PATH environment variable. The PATH list provides a shortcut for finding commands.
If it weren’t for the PATH list, you would have to type /bin/ls instead of ls, and /usr/bin /vi instead of vi. The command-line utilities supplied with the Mac OS X Developer Tools are located in /Developer/Tools (some of those utilities, such as CpMac and MvMac, are described in Chapter 2, “Using the Command Line”). The /Developer/Tools directory is not normally in your PATH, so if you use any of the commands in /Developer/Tools, you need to type their full pathnames, unless you add the directory /Developer/Tools to your PATH. Here’s how to do that.
Adding a directory to your PATH in tcsh:
- Start by editing your ~/.tcshrc file. (Review Chapter 5, “Using Files and Directories,” about editing files from the command line.) If you are using vi, the command is vi ~/.tcshrc
- Add a line that says
set path = ( $path /Developer/Tools )
This may seem a little odd. After all, you are trying to set the PATH environment variable, not path. What’s going on? Well, tcsh uses an unusual method to set the PATH variable.
Tcsh requires that you set the shell variable path, and then tcsh sets the actual PATH environment variable. As discussed earlier, shell variables are variables created in your shell that are available only in the shell you are currently using. They are not passed on to child processes as environment variables are.
Also notice how the command line includes the existing $path value in the new definition, thus adding the new directory to the list. Without $path in the command line, the result would be to replace the old PATH with the single new directory—not at all what you want.
- Save your file (the command will depend on which editor you’re using).
- Quit the editor (this command will also depend on which editor you’re using). The change will take effect in the next shell you start.
- Open a new Terminal window to test the change.
- echo $PATHYou’ll see the new directory at the end of the list.
- Test using one of the developer tools without typing its full path—for example,
GetFileInfo "/Applications (Mac OS →9)/SimpleText"
Figure 7.7 shows the output from the GetFileInfo command.
Figure 7.7 Using the GetFileInfo command once it is in your PATH. If you are using the bash shell or the sh shell, then you add a directory to your PATH by directly setting the PATH environment variable. Putting this setting in your ~/.profile ensures that it takes effect each time you start a new shell.
Adding a directory to your PATH in bash or sh:
- Edit your ~/.profile file.If you are using the vi editor, the command is
vi ~/.profile
- Add a line to the file that says
export PATH="$PATH:/Developer/Tools"
Notice how the new value includes the current value of $PATH, then a colon (no spaces!), and then the new directory.
- Save the file.
- Quit the editor.The change takes effect immediately.
- You can check it with
echo $PATH
Adds native support for many popular video formats.
http://perian.org/
Command + Shift + 3 Completa
Command + Shift + 4 Partes
Command + Shift + 4 + Space Bar Camera
The other day, one of my coworkers called me up with this question, so I thought I would share it here. She wanted
to know if there was a Mac function similar to the Print Screen button on Windoze. In PeeCee land, for those of
you who don’t know, the Print Screen button on the keyboard copies the content of the current screen, so that it can be
pasted into a document or program for editing, printing, etc. In Mac, there is an easy key combination to achieve
the same effects and more. Simply hit the Command key (the Apple key next to the space bar), the Shift key, and
the number 3 key simultaneously. This takes a screen shot of the current screen and saves it to the Desktop as a
pdf file.
Now, if you only want to copy a segment of the screen, hit Command + Shift + 4, and the mouse cursor will change from
an arrow into cross hairs. Simply click and drag the cross hairs over the area of the screen of which you want to
take a picture. When you release the mouse button, you will hear a clicking sound reminiscent of a camera shutter
and a new file will appear on your desktop in pdf format. Most Macs these days come with a free copy of
GraphicConverter, which you can use to convert the resulting pdf
file into JPEG, GIF, PNG, or whatever image format you like the best. Have fun!
UPDATE: Dave notes in the comments: “For even MORE fun, once you use cmd + shift + 4, press the
space bar and the cursor turns into a camera. Move over any window and you can take a snapshot of JUST that window. :)”
Thanks, Dave!
’NOTHER UPDATE: DF adds, “If you add the control key to any of the OS X screenshot keyboard shortcuts, the
screenshot is copied to the clipboard instead of being saved to a file; you can then paste it into any graphics
application — such as OS X’s Preview — and save it in any format you prefer.” Thanks, DF!
PATH=”$PATH:/Library/Application Support/VMware Fusion”
ex 4: vmware-vdiskmanager -x 36Gb myDisk.vmdk
Heres a recap for everyone to Install HP LaserJet 1020 on Mac OSX. 1)
Download; http://www.narc.ca/1601-LJ_1022_Series_OSX.dmg (Old version)
2)If you have anything for the HP 1020 in “/Library/Reciepts” delete it.
3) Delete anything for the HP 1020 in Printer in “Printer Setup Utility”
4) Add new printer in “Printer Setup Utility”, select HP LaserJet 1020, driver should come up, click ADD Then you should be able to print.. glad we finally got around this one.. and one big FU to HP.


