"...to become the leader in providing faster, friendlier, and more affordable subscription-based computer support services."

Ask Dr.Tech solution database


Start, Stop, and Restart Windows Services from Mac OS X

Monday, 4 October 2010 09:12 by Davian

Mac OS X includes Samba support by default, and this is really handy if you’d like to remotely restart and monitor services running on a Windows machine.

To list services running on the Windows machine, use this command:

net rpc service list -I IPADDRESS -U USERNAME%PASSWORD

A practical example would be:

net rpc service list -I 192.168.0.115 -U Windows%myPassword

After identifying the service you want to restart, you issue the following command to stop the service:

net rpc service stop SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD

Then you can restart (or start) the service by using the following command:

net rpc service start SERVICENAME -I IPADDRESS -U USERNAME%PASSWORD

Convert songs to MP3, AAC, M4A, or other formats in iTunes

Monday, 4 October 2010 09:01 by Davian

iTunes 9.1 and forward changed the way it handles song conversions. I’m not quite sure why but Apple made it so converting a song to a different format is no longer just a matter of right-clicking and converting. Instead, with iTunes you’ll have to make an adjustment in iTunes Preferences first.

First, select the conversion format in iTunes:
* Open iTunes Preferences
* Click on “Import Settings”
* Choose the format you want to convert to by using the ‘Import Using’ menu: AAC, AIFF, Apple Lossless Encoder (MP4 or M4A), MP3, WAV
* Click ‘OK’

Now when you want to convert any song to the new format:
* Click on the song you want converted in iTunes
* Click on the ‘Advanced’ menu
* Scroll down to ‘Create MP3 Version’ (or whatever format you selected earlier)

iTunes will then convert the song to the format you selected just as it did in any prior version. If you want to make an iPhone ringtone you’ll want to use the Apple Lossless Encoder or AAC and then rename the .m4a file extension to .m4r just as before.

 

convert-song-format-itunes.JPG

Change MAMP to default Apache and MySQL ports

Monday, 4 October 2010 08:58 by Davian

MAMP is a great app for Mac OS X that lets you quickly and easily run an entire pre-configured web server on top of Mac OS X, it’s really helpful and I use it frequently. Now my only complaint about MAMP is the port settings, by default they are set to 8888 and 8889, so instead of being able to visit localhost you have to load localhost:8888. Thankfully this is easy to change.

mamp_ports.png

  • Open up MAMP and hit the Preferences button
  • Click on the Ports tab
  • Click on “Set to default Apache and MySQL ports
  • Click OK

MAMP will restart itself with the new default ports configured. This is the first thing I do when I setup MAMP and I find it makes working with the app much more natural.

And yes, I realize that Mac OS X comes with Apache server by default, but in my opinion nothing beats MAMP for it’s simple setup.

Trim an MP3 on your Mac

Monday, 4 October 2010 08:55 by Davian

You can trim any MP3 file for free in Mac OS X thanks to QuickTime Player. Here’s how:

  • Make a copy of the MP3 file you want to trim
  • Open the MP3 file with QuickTime Player
  • Hit Command+T to open the Trim function
  • Drag the yellow sliders on the left and right side to trim down the section of the song to where you want
  • When you’re finished, click the yellow ‘Trim’ button
  • Go to File -> Save As and save as an iPhone .m4v movie file

Now the MP3 has been trimmed down the section of the song you wanted, but you’ll want to use iTunes to convert the song to MP3 format again from it’s new m4v type.

This works in the newer versions of QuickTime Player, but I’m not sure if the same function exists in older releases.

trim-mp3.jpg

Access and Mount an SMB Share via Command Line

Monday, 4 October 2010 08:47 by Davian

This first command lists the available shares at the destination IP:

smbclient -U user -I 192.168.0.105 -L //smbshare/

Now you’ll want to pass set your SMB shares mount point:

mount -t smbfs -o username=winusername //smbserver/myshare /mnt/smbshare

and finally you’ll want to gain access to the SMB share by specifying your Windows login and the machines IP address:

mount -t cifs -o username=winusername,password=winpassword //192.168.0.105/myshare /mnt/share

Easily Mount an ISO in Mac OS X

Monday, 4 October 2010 08:45 by Davian

If you’re wondering how to mount an ISO image in Mac OS X, it is very easy. For most ISO images you can mount them simply by double-clicking the ISO image file, and it will go through the auto-mounter app within OS X putting it on your desktop.

If for whatever reason that doesn’t work there are other methods to mount ISO’s within Mac OS X, and we’ll cover ways to do this with the built-in Disk Utility and a more advanced option of using the command line.

Mount ISO on Mac with Disk Utility

mount-iso-mac.JPG

You can mount ISO images in Mac OS X by using Disk Utility, located in the /Applications/Utilities/ directory. After you have launched Disk Utility, navigate from the Disk Utility menu down to “Open Image File” and select your ISO file. The ISO should now appear mounted on the Mac OS desktop. Yes, this works for other disk image files too (dmg, img, etc).

Mount ISO with Mac OS X command line

In the Terminal type the following command:

hdiutil mount sample.iso

with sample.iso being the path to the image you want to mount. After the checksum is completet, your ISO will appear mounted on your Mac OS X desktop – that’s it. You you can actually mount virtually any other disk image type with hdiutil as well, so give .dmg .img a try too.

Troubleshoot a Mac with AppleJack

Monday, 4 October 2010 08:40 by Davian

applejack.gif

AppleJack is a really handy troubleshooting utility for Mac that works even if you can’t load the Mac OS X GUI. Running in Single User Mode, it’s a simple menu-based tool to run a series of tests and repairs on the Mac OS. With AppleJack you can easily:

* Repair Disk
* Repair Disk Permissions
* Validate System Preference files
* Clear Caches
* Clear Swap Files

These are common Mac troubleshooting techniques, and really make AppleJack a handy utility in any Mac users toolkit. To use AppleJack, all you need to do is restart your Mac in Single User Mode by holding down Command+S during system start, then type applejack at the prompt. You’ll then be brought to the same menu you see in the screenshot above, where you can perform the necessary actions to get your Mac back in good health.

AppleJack is open source and free to download, highly recommended.

 

Convert DOCX to DOC for free with your Mac

Monday, 4 October 2010 08:37 by Davian

convert-docx-to-doc.jpg

If you need to convert a .docx file to .doc, don’t pay for one of the many conversion sites or utilities out there. Your Mac has the ability to handle the conversion entirely on it’s own already built in and it’s completely free. We’re going to be using the textutil command line tool to get this done:

  • Launch the Terminal (located in /Applications/Utilities/Terminal)
  • Type the following command:

textutil -convert doc /path/to/filename.docx

For example, I have a docx file located in my Documents folder that I want converted, this would be the syntax:

textutil -convert doc ~/Documents/ImportantReport.docx

The ~ signifies your home directory, and the rest is just the path to your docx file.

As just a general Terminal tip, I would highly recommend using tab completion when entering in long directory strings and complex names, it’ll save you plenty of headaches. Basically you just start typing the name of a file or directory and hit tab to auto-complete the name.

 

Take screenshots of webpages via the command line

Monday, 4 October 2010 08:31 by Davian

using a simple tool called webkit2png you can quickly take a screenshot of any webpage from the command line too. You’ll need to have Safari and Python installed on your Mac, then you just download the app and do the following from the command line:

python /path/to/webkit2png http://osxdaily.com

The screenshots of the webpage then appear in your current working directory.

You can download webkit2png at the developers home.

 

webpage-screenshot-command-line.jpg

Open any man page in Preview and save as PDF

Monday, 4 October 2010 08:28 by Davian

If you’re tired of looking over a man page within the Terminal, you can launch any man page into Preview with the following command:

man -t ipconfig | open -f -a /Applications/Preview.app

This example uses ipconfig, but just replace ‘ipconfig’ with any other man page you’d like to read within Preview and it’ll work the same.

Save the man page as PDF

Once the man page is opened within Preview, you can then use Preview to “Save As” and then create a PDF file of the man page for later viewing.

 

man-page-preview.jpg


Sign up now - $98.00 annual plan
Also available plans: 15 day money back guarantee
per-incident $37.00
month to month* $47.00
* Plans include unlimited number of support incidents

A “must-have” service


Using Ask Dr. Tech is like having your personal technician always at hand *
* for only 26 cents per day