MoonPoint Support Logo

Geeks.com - Free Shipping



Advanced Search
February
Sun Mon Tue Wed Thu Fri Sat
     
7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      
2012
Months
FebMar
Apr May Jun
Jul Aug Sep
Oct Nov Dec


Mon, Dec 12, 2011 11:03 pm

Configuring a Mac OS X 10.6 System to Provide VNC Access

Note: These notes have been tested on systems running OS X 10.6, aka "Snow Leopard", but may apply to other versions as well.

I needed to configure a Mac system running OS X 10.6.3 to support remote access from a Virtual Network Computing (VNC) client on a Microsoft Windows system. VNC is a graphical desktop sharing system that uses the RFB protocol to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network. There are many free VNC clients, such as TightVNC, the free edition of RealVNC, etc.

Mac OS X Snow Leopard (version 10.6) comes with AppleVNCServer software. To configure the Mac OS X system for VNC access, take the following steps:

  1. Click on the Apple icon at the top left of the screen.
  2. Select System Preferences.
  3. Under Internet and Wireless, select Sharing.
  4. Ensure Remote Management is checked.

    Note: if the lock icon at the lower, left-hand corner of the screen is showing a locked padlock, you will need to click on the padlock to unlock it, which will present you with a window where you can provide the account name and password for an account with adminstrator access for the system.

  5. For "allow access for", select either "All users" or "Only these users. If you select "Only these users", click on the plus sign, i.e., "+", and click on a user account which should be granted remote management access, then click on the Select button. You will then have the opportunity to grant specific permissions from among the following:
    • Observe
      • Control
      • Show when being observed
    • Generate reports
    • Open and quit applications
    • Change settings
    • Delete and replace items
    • Start text chat or send messages
    • Restart and shut down
    • Copy items

    Pick the permissions you wish to grant, then click on OK.

  6. Click on Computer Settings.
  7. In the "VNC viewers may contrl screen with password" field, place a password to be used for VNC access.
  8. Click on OK.
  9. You will be prompted for the password of an account with administrator privileges to complete the changes. Provide an appropriate account name and password, then click on OK.

    Set VNC password under OS X

Information on the service can be obtained from the command line by obtaining a shell prompt by running the Terminal program under /Applications/Utilities then issuing the command launchctl list com.apple.ScreenSharing.server.

$ launchctl list com.apple.ScreenSharing.server
{
	"Label" = "com.apple.ScreenSharing.server";
	"LimitLoadToSessionType" = "Aqua";
	"OnDemand" = true;
	"LastExitStatus" = 0;
	"TimeOut" = 30;
	"Program" = "/System/Library/CoreServices/RemoteManagement/AppleVNCServe
r.bundle/Contents/MacOS/AppleVNCServer";
	"EnableTransactions" = true;
	"TransactionCount" = -1;
};

If you don't see it listed try launchctl list | grep -i Screen.

The program listens by default on TCP port 5900.

[/os/os-x] permanent link

Tue, Nov 29, 2011 8:23 pm

Starting OSXVnc From a Command Line

I needed to remotely start VNC server software on an Apple OS X 10.3, aka Panther, system. I had SSH access to the system.

I could tell the software wasn't currently running by checking to see if the system was listening for connections on the default port, tcp port 5900, using the netstat command.

$ netstat -a | grep 5900
$

I tried started the software running in the background by issuing the command /Applications/OSXvnc.app/OSXvnc-server & at a terminal prompt, but OSXVnc didn't start, because, though I was logged into an account with administrator privileges, I wasn't logged into the root account.

$ /Applications/OSXvnc.app/OSXvnc-server &
2011-11-29 10:22:55.218 OSXvnc-server[385] Main Bundle: /Applications/OSXvnc.app
kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
2011-11-29 10:22:55.225 OSXvnc-server[385] screen format not supported.  exiting.

So I then used sudo to assume the identity of the root account to run the coomand. When prompted for a password I entered the password for the administrator account under which I was already logged into the system I was then able to successfully start OSXvnc.

Greg-Computer:/ JDoe$ sudo -s
Password:
Greg-Computer:/ root# /Applications/OSXvnc.app/OSXvnc-server &
[1] 397
Greg-Computer:/ root# 2011-11-29 10:29:50.345 OSXvnc-server[397] Main Bundle: /Applications/OSXvnc.app
2011-11-29 10:29:50.353 OSXvnc-server[397] Waiting for clients
2011-11-29 10:29:50.353 OSXvnc-server[397] Started Listener Thread on port 5900 

By then hitting enter, I could get back to the shell prompt and check to ensure the program was listening on port 5900.

Greg-Computer:/ JDoe$ netstat -a | grep 5900
tcp4       0      0  *.5900                 *.*                    LISTEN

If you need to change the VNC password, you can use the storepasswd command in the /Applications/OSXvnc.app directory.

$ /Applications/OSXvnc.app/storepasswd -h

usage:  storepasswd <password> <filename>

Stores a password in encrypted format.
The resulting file can be used with the -rfbauth argument to OSXvnc.

The VNC password is normally stored in /Applications/OSXvnc.app/.osxvncauth.

You can change the password by using sudo to assume the identity of the root account and then using the storepasswd command, similar to the example below:

Greg-Computer:~ JDoe$ sudo -s
Password:
Greg-Computer:~ root# /Applications/OSXvnc.app/storepasswd Some-Password /Applications/OSXvnc.app/.osxvncauth
storing password succeeded.
Greg-Computer:~ root#

You can then use ps | grep OSXvnc | grep -v grep to find the process ID for the the existing OSXvnc server process, kill it with kill -9 <PID> and restart the software using the -rfbauth parameter. E.g., /Applications/OSXvnc.app/OSXvnc-server -rfbauth /Applications/OSXvnc.app/.osxvncauth & will start OSXvnc running again using the password stored in /Applications/OSXvnc.app/.osxvncauth. Putting an ampersand, &, at the end of the line puts the process running in the background, so that it will continue to run even after you log off.

Greg-Computer:~ root# ps | grep OSXvnc | grep -v grep
  397 std- S      3:12.77 /Applications/OSXvnc.app/OSXvnc-server
Greg-Computer:~ root# kill -HUP 397
Greg--Computer:~ root# /Applications/OSXvnc.app/OSXvnc-server -rfbauth /Applications/OSXvnc.app/.osxvncauth &
[1] 466
Greg--Computer:~ root# 2011-11-29 20:04:00.879 OSXvnc-server[466] Main Bundle: /Applications/OSXvnc.app
2011-11-29 20:04:00.886 OSXvnc-server[466] Waiting for clients
2011-11-29 20:04:00.887 OSXvnc-server[466] Started Listener Thread on port 5900

References:

  1. OSXvnc 1.71 Frequently Asked Questions
    Last Modified: 20 July 2006
    Redstone Software

[/os/os-x] permanent link

Thu, Nov 24, 2011 12:01 pm

Burning an ISO File to Disc with Disk Utility

Under Mac OS X, you can burn an .iso file to a blank CD using the Disk Utility application. You can open the application using the Finder. You will find Disk Utility in Applications/Utilities. When you have opened the Disk Utility application, take the following steps to burn the .iso file to a blank disc.
  1. Click on File.
  2. Click on the Burn button.
  3. Browse to the .iso file you wish to burn to disc. Click on it to select it then click on the Burn button.
  4. When you see the "Ready to burn" message, click on the Burn button. A Disk Utility Progress window should open showing you the progress of the burning process as the .iso file is burned to the blank disc. The disc will be ejected when the process is completed.

[/os/os-x] permanent link

Tue, Oct 04, 2011 5:12 pm

Determining Image Info Under Mac OS X

If you need to determine information about an image file from the command line on a Mac OS X system, you can use the file command.

If you wanted information about all of the .jpg and .png files in a directory, you could use the command file *.png *.jpg

$ file *.png *.jpg
upgrade-windows-grayed.png:         PNG image, 256 x 256, 8-bit/color RGBA, non-interlaced
Vista_Install_Type_Product_Key.jpg: JPEG image data, JFIF standard 1.01

For some image files, the file command will show the image dimensions. The command will reveal the actual image type, even if a file has been given the wrong extension as shown below.

$ cp Vista_Install_Type_Product_Key.jpg test.png
$ file test.png
test.png: JPEG image data, JFIF standard 1.01

Another useful utility for determining the dimensions of an image file is sips. You can use the -g pixelHeight and -g pixelWidth options to obtain the dimensions of an image.

$ sips -g pixelHeight -g pixelWidth example.jpg 
/Users/jsmith/Documents/example.jpg
  pixelHeight: 600
  pixelWidth: 800

References:

  1. Get the dimensions of most images from the command line UNIX
    Date: December 1, 2003
    Mac OS X Hints

[/os/os-x] permanent link

Sun, Jul 17, 2011 8:41 pm

Making a Disk Image Under OS X

If you want to make a disk image for a disk drive with Mac OS X, you can do so using the Disk Utility application that comes with the operating system. From the Finder, go to Applications/Utilities. Double-click on Disk Utility to open the application. Then, from the left side of the window, select the disk drive for which you wish to create a disk image by clicking on it to select it.

Disk Utility - select drive

Click on New Image at the top of the window. Choose where you want to save the image. The default image format is "compressed" with no encryption. You can choose from the following options:

  1. compressed
  2. read-only
  3. read-write
  4. DVD/CD master

A .dmg file will be created for all but the DVD/CD master. A .cdr file will be created for a DVD/CD master. The CDR files are ISO images and, if moved to a PC, can be renamed and burned as .iso files.

References:

  1. (Mac OS X 10.4): Creating a disk image
    Apple

[/os/os-x] permanent link

Tue, Jul 12, 2011 10:35 pm

Checking SMART Hard Drive Status under OS X

If you wish to check the health of a hard drive in a system, there is a disk monitoring capability commonly present in hard drives today called S.M.A.R.T. ( Self-Monitoring, Analysis and Reporting Technology; sometimes written as SMART). Information provided by SMART can provide an indication whether a disk drive is experiencing problems and may be likely to fail in the near future.

With Mac OS X systems, you can check the S.M.A.R.T. status of a hard drive from the command line using the diskutil command.

$ diskutil info disk0 | grep SMART
   SMART Status:             Failing

If the system has just one hard drive, the drive is generally designated as disk0. You can use diskutil list to see the drive numbers for drives in the system.

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *298.1 Gi   disk0
   1:                        EFI                         200.0 Mi   disk0s1
   2:                  Apple_HFS lledit                  297.8 Gi   disk0s2

In the above case, the command shows that disk0 is the only drive in the system.

You can also check the SMART status of a drive using the Disk Utility application, which can be found with the Finder under Applications/Utilities.

Disk Utility - SMART status shows failing

References:

  1. 10.3: Get hard disk SMART status from the command line UNIX
    Date: November 28, 2003
    Mac OS X Hints

[/os/os-x] permanent link

Fri, Apr 22, 2011 2:11 pm

Changing your keychain password

If your Mac OS X keychain password does not match your login password, you will be prompted for the keychain password when an application needs access to the keychain and your keychain is locked.

You can change your keychain password at any time by the following procedure.

  1. Using the Finder, go to the Applications folder and then look for the Keychain Access utility within the Utilities folder beneath the Applications folder.
  2. Double-click on Keychain Access to start the utility.
  3. Click on login under Keychains to select that keychain.
  4. Click on Edit and choose Change Password for Keychain "login"... .
  5. If the keychain is not already unlocked, you will be prompted to supply the current keychain password. Enter it.
  6. You will be prompted to "Enter a new password for the keychain "login." You will need to enter the current password again and the new password you wish to use. You must also type the new password a second time to verify it.

    Mac OS X - enter
keychain password

    There is a bar that shows the strength of the password you have entered. I.e., how likely the password is to be resistant to someone guessing it. If you click on Password Strength, you can have the system suggest a password for you. Make sure you pick a password that is not weak, i.e., easily guessed. You should strive for a minimum of "good", if not "excellent".

    Mac OS X - excellent
keychain password

  7. Click OK.

Note: this procedure applies to Mac OS X 10.5 and possibly other versions of Mac OS X.

References:

  1. Mac OS X 10.4 Help: Changing your keychain password
    Apple - Support
  2. Mac OS X 10.5 Help: Changing your keychain password
    Apple - Support

[/os/os-x] permanent link

Wed, Mar 30, 2011 7:37 pm

Determining File Location for an Alias

Aliases on a Mac OS X system are similar to shortcuts on a Microsoft Windows system. Just as with Windows, you will see a small arrow at the lower left side of an icon when it represents a shortcut/alias. Unlike Microsoft Windows, however OS X will keep track of the location of the original file associated with the alias, so that, if you move the file, the alias still points to the file's current location.

If you need to see the location of a file to which an alias points, right-click on the alias and choose Get Info. You will see the location for the file it points to after Original.

Alias for Parallels PVM file

If the original file has been deleted, when you click on the alias, you will see a message indicating the alias could not be opened, because the original item cannot be found. E.g., in the case of a missing Parallels .pvm file, I saw the following:

OS X Alias Not Found

You have the option to select Fix Alias, which will allow you to search for the original file, but if it has been deleted and can't be recovered from the trash, you won't be able to find it.

References:

  1. How to Use Mac Aliases
    Dummies.com

[/os/os-x] permanent link

Wed, Feb 16, 2011 10:44 pm

Adjusting Space Between Bullets and Text for PowerPoint 2008 for MAC

If there is no space between the bullet character and the text that goes with the bullets, you can insert space between the bullets and the text by takng the following steps when using Microsoft Powerpoint® 2008 for Mac:
  1. Select all of the bulleted text on the slide.
  2. Choose Format
  3. Choose Paragraph
  4. For the vaule of Special, choose Hanging and then put a value in the By field, e.g. 0.38.

    PowerPoint 2008 for MAC - adjusting bullet to text spacing

  5. Click on OK.

[/os/os-x/software/office] permanent link

Fri, Oct 01, 2010 9:23 am

Obtaining the Version of OS X from the Command Line

To obtain the version of OS X from a command line, i.e., from a Terminal window, you can use the command system_profiler SPSoftwareDataType
.
$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: Mac OS X 10.3.9 (7W98)
      Kernel Version: Darwin 7.9.0
      Boot Volume: Macintosh HD
      Computer Name: john  smith's Computer
      User Name: JOHN SMITH (jsmith)

The above command provides both the version of OS X, which is 10.3.9 in the example shown and the kernel version, which is 7.9.0. To view just the version of OS X, you can use the command sw_vers -productVersion.

$ sw_vers -productVersion
10.3.9
$

If you needed the version of the kernel, you can also use the traditional uname -a command used on Unix and Linux systems or uname -r to get just the kernel version.

$ uname -a
Darwin joe-smiths-Computer.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 2
0:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC  Power Macintosh powerpc
$ uname -r
7.9.0

To match a version number to a codename, e.g. OS X 10.3 has a codename of "Panther", see the table below.

Mac OS X Version Information
Version Codename Date Announced Release Date Most Recent Version
Mac OS X Server 1.0 Hera   March 16, 1999 1.2v3 (October 27, 2000)
Public Beta Kodiak   September 13, 2000  
10.0 Cheetah   March 24, 2001 10.0.4 (June 22, 2001)
10.1 Puma July 18, 2001[64] September 25, 2001 10.1.5 (June 6, 2002)
10.2 Jaguar May 6, 2002[65] August 24, 2002 10.2.8 (October 3, 2003)
10.3 Panther June 23, 2003[66] October 24, 2003 10.3.9 (April 15, 2005)
10.4 Tiger May 4, 2004[67] April 29, 2005 10.4.11 (November 14, 2007)
10.5 Leopard June 26, 2006[68] October 26, 2007 10.5.8 (August 5, 2009)
10.6 Snow Leopard June 9, 2008[69] August 28, 2009 10.6.4 (June 15, 2010)

References:

  1. OS X Version From Command Line
    Date: September 12, 2006
    The macosxhints Forums

[/os/os-x] permanent link

CompuVest - Notebooks

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo